Excel - Simple Linear Regression

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys in this video I'm going to show you a very quick way to analyze bivariate data so what is bivariate data will dive area data is two variables measured on each observation or object in your sample so if you're taking a statistics class every member of your sample not only do you measure a one variable on that observation or member but you also ask a follow-up question or make a follow-up measurement okay so in this case these were cars are our observations were of cars and so here we you see we have about 50 observations where we measured the speed in miles per hour and the distance in feet that it took for the vehicle to stop from speed of 4 miles an hour ok so here we have 50 observations and the way I can quickly tell that is to highlight the number of variables and down here in the corner I get these summary statistics here so you see we have a count of 50 okay so let's first make a scatter plot of speed versus distance let's see if distance speed sorry is a good predictor of distance so in terms of X's and Y's speed would be our X and distance would be our Y and that's because speed is our independent variable okay and that makes why our dependent variable and these go by other names as well so X is often called the predictor or the explanatory variable and Y is also called the response variable in this case okay so just a whole bunch of synonyms now let's run a regression first let's create a scatterplot of distance versus speed y versus X so we go to insert we go over here to scatter and we'll pick the first one starts us with a nice blank spread a chart area let's click select data add X values this is where you'll put the speed numbers and for our Y values this is where we'll put distance and that's all we need to feed Excel and so we would want to title this of course let's go up let's just add a quick chart title scatter plot of distance versus speed so we want to see if distance is a good predictor speed and we see from these points the general flow of these points is definitely positive right and it's pretty tightly packed right so it's a strong positive relationship you could argue that the shape of this relationship is a little curved this way or maybe even this way okay actually I think it would be more appropriate to go a little curb this way but you can also see perhaps it's mostly linearly related okay we're going to run both these I'm going to do an a video right here where I'm just going to do the linear simple linear regression on this data and then I'll do another video where I do a polynomial specifically a quadratic regression a second-order polynomial regression okay so let's quickly do the regression so the way you can quickly do this is you click on the plot go over to layout on the chart tools section up here and click on trendline then go down to more trend lines well and select linear select display equation and let's get our square as well which is the coefficient of determination okay and there we go we have our regression line and you can move that around so that it's more visible okay we could also do get this same regression line and more regression output by going over to data data analysis scrolling down to regression inputting our Y variable with the label in putting our X variable with its label remember we're using speed to predict the distance stopping distance click label because I included these guys when I highlighted them here okay there's a bunch of more options we'll leave that to another video I'm going to select output range to be on this same spreadsheet let's click OK let's move the chart aside and let's take a look at what we got the things were interested there's a lot about put here but the things we're most interested in are the coefficients and we want to make sure that these guys match with these guys and you see that they do here's the 3.9 and here's the negative 17 that's the slope is negative 17 point five seven nine perfect okay so this matches with this and also before I forgot to mention we also got a nice overlay of the regression line on top of our scatterplot now let's check the r-square of this model Oh point six five point six five that says that 65% of the variability in distance is explained by the regression line or by the regression of distance on speed okay so that's not bad that's not great but it's definitely not bad okay it's it's saying the model is decent okay I have a hunch that this model would be improved if we ran a polynomial regression because it looks like these points have a slight curved pattern in them I don't know that's the gut feeling that I'm getting so I'm going to run this polynomial regression and add in video in Part B of this series of videos so make sure to check the continuation of this app so till next time have a great day subscribe and watch Part B
Info
Channel: Jalayer Academy
Views: 653,209
Rating: 4.814599 out of 5
Keywords: regression, excel, simple linear regression, slr, linear model, statistics, statistics with excel, Microsoft Excel (Software)
Id: Cltt47Ah3Q4
Channel Id: undefined
Length: 7min 56sec (476 seconds)
Published: Thu Apr 18 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.