00:01
All right, so here we have a table that reports the distance in miles as well as the airfare in dollars from baltimore, maryland to six destinations, atlanta, boston, chicago, dallas, detroit, and denver.
00:13
And what we're going to do is find the linear least squares model for the data, and we're going to answer some questions about it.
00:19
All right, so the first, let's get our equation.
00:23
Y bar is going to equal a plus bx, where a is the intercept term, b is our slope term.
00:30
And the way we're going to calculate today is the slope term is going to be the correlation coefficient multiplied by the standard deviation of y divided by the standard deviation of x.
00:40
And the intercept term is found by taking the mean of the ys minus b that we find here times the mean of the xs.
00:47
There's different formulas for this, and you get the same answer, but i'm going to use our spreadsheet to do this work for us, so let's go ahead and do that.
00:56
So here we go.
00:57
Here are the means and standard deviations of the variables, and i use the average function of the spreadsheet.
01:06
These are just the cell references for where you'll find where the formulas would find the data.
01:13
And you would just change the columns here to denote the distance column and the airfare column.
01:18
Same thing for the sample standard deviation.
01:19
Make sure you do .s to denote the sample standard deviation formula.
01:23
Correlation coefficient, you put in the xs, the ys, or ys, the xs.
01:27
It doesn't matter because the correlation between distance and airfare is the same regardless of whether you have the distance as the independent or airfare as the independent variable.
01:40
All right, so let's go ahead and substitute those values in, and along the way, we're going to take that r value and square it.
01:47
We'll talk about that in a second.
01:48
Here's our formula.
01:50
And i didn't round at all when i substituted these values into our formulas here, so just be aware of that.
01:58
I'm going to round to our equation though just so we can get some common answers here.
02:07
The intercept term is 83 .9588, i'm going to round to four decimals, plus 0 .1281x, where x is the distance and then the y value, what we'll get out is the airfare.
02:29
And the coefficient of determination, that's this part.
02:32
So the one question that's asking us about the coefficient of determination, and that is this.
02:38
This is the coefficient of determination.
03:06
And it's 0 .7069, and this is actually a percent, so the coefficient of determination.
03:19
It is that decimal value, 0 .7069, but we interpret it as a percent, 70 .69%, which means that 70 .69 % of the variation we see in airfare is explained by the variation we see in the distance.
03:38
That's what that is.
03:41
And now we're going to make a prediction.
03:43
To the nearest dollar by how much does the regression all predict airfare to rise for each additional 100 miles you fly? so let's go ahead and look at our equation here.
03:54
I'm going to get rid of these formulas, we don't need these anymore.
03:58
We're going to look at this.
04:02
So x is in dollars, or excuse me, sorry, y is in dollars, x is in distance, and this is just miles, straight up miles.
04:14
So for each additional 100 miles you fly, so this is the per mile cost...