WEBVTT
00:00:02.740 --> 00:00:06.040
The table shows the relation between the variables π₯ and π¦.
00:00:06.170 --> 00:00:11.150
Find the equation of the regression line in the form π¦ hat is equal to π plus ππ₯.
00:00:11.420 --> 00:00:14.310
Approximate π and π to three decimal places.
00:00:14.520 --> 00:00:21.080
In this question, weβre given a table of data points which show a relationship between two variables, the variable π₯ and the variable π¦.
00:00:21.290 --> 00:00:25.390
We need to use this table to find the equation of the regression line linking π₯ and π¦.
00:00:25.420 --> 00:00:26.660
Thatβs the line of best fit.
00:00:26.990 --> 00:00:30.750
Weβre told to give our answer in the form π¦ hat is equal to π plus ππ₯.
00:00:30.990 --> 00:00:35.760
Weβre also told we only need to approximate the value of π and π to three decimal places.
00:00:36.040 --> 00:00:42.280
To answer this question, letβs start by recalling how we find the least squares regression line linking two variables π₯ and π¦.
00:00:42.540 --> 00:00:47.950
We recall to find the least squares regression line between two variables π₯ and π¦, we can use the following formula.
00:00:48.100 --> 00:00:59.370
π will be equal to π sub π₯π¦ divided by π sub π₯π₯, where π sub π₯π¦ is a measure between the covariance of π₯ and π¦ and π sub π₯π₯ is a measure of the variance of π₯.
00:00:59.550 --> 00:01:08.480
And our value of π is going to be equal to π¦ bar minus π times π₯ bar, where π₯ bar is the mean π₯-value and π¦ bar is the mean π¦-value.
00:01:08.910 --> 00:01:12.050
Of course, this alone is not quite enough to find the values of π and π.
00:01:12.050 --> 00:01:17.120
We also need the formula for π sub π₯π¦, π sub π₯π₯, and π¦ bar and π₯ bar.
00:01:17.380 --> 00:01:29.180
First, we recall π sub π₯π₯ is equal to the sum of π₯ squared minus the sum of π₯ all squared over π and π sub π₯π¦ is the sum of π₯ times π¦ minus the sum of π₯ times the sum of π¦ over π.
00:01:29.520 --> 00:01:32.620
Similarly, we know how to find the average value of π₯ and π¦.
00:01:32.990 --> 00:01:38.570
The mean value of π₯ will be the total of all of our data points of π₯ divided by the number of data points.
00:01:38.570 --> 00:01:39.910
Thatβs the sum of π₯ over π.
00:01:40.210 --> 00:01:43.740
Similarly, the mean value of π¦ will be the sum of π¦ over π.
00:01:44.130 --> 00:01:47.400
Weβre now ready to start finding the equation of our regression line.
00:01:47.430 --> 00:01:49.670
However, thereβs a lot of things we need to take in.
00:01:49.800 --> 00:01:53.950
First, although this seems very complicated, there are only five things we need to find.
00:01:53.950 --> 00:02:00.230
We need to find the value of π, the sum of π₯, the sum of π¦, the sum of π₯ times π¦, and the sum of π₯ squared.
00:02:00.480 --> 00:02:06.410
Once weβve found these five values, we just need to substitute these into our formulae to find the values of π and π.
00:02:06.710 --> 00:02:08.070
Weβll do these one at a time.
00:02:08.100 --> 00:02:09.690
Letβs start with the value of π.
00:02:09.750 --> 00:02:11.820
π is the number of data points.
00:02:12.030 --> 00:02:14.370
We can actually see this directly from our table.
00:02:14.400 --> 00:02:17.750
We can see that there are only six data points in this example.
00:02:18.150 --> 00:02:20.870
So our value of π is equal to six.
00:02:21.050 --> 00:02:24.250
We can also find the sum of π₯ and the sum of π¦ from our table.
00:02:24.450 --> 00:02:25.740
Letβs start with the sum of π₯.
00:02:25.740 --> 00:02:28.540
We just need to add all of the π₯-values in our table together.
00:02:28.820 --> 00:02:35.170
So in this case, the sum of π₯ is 10 plus 22 plus 22 plus 13 plus 16 plus 21.
00:02:35.430 --> 00:02:36.710
And we can calculate this.
00:02:36.710 --> 00:02:38.770
We see that itβs equal to 104.
00:02:38.950 --> 00:02:41.690
And we can then do exactly the same thing to find the sum of π¦.
00:02:41.690 --> 00:02:45.030
We just want to add all of the values of π¦ in our table together.
00:02:45.380 --> 00:02:52.420
So in this case the sum of π¦ is going to be 25 plus 18 plus 24 plus 25 plus 12 plus 17.
00:02:52.690 --> 00:02:54.110
And then we can calculate this.
00:02:54.110 --> 00:02:57.100
We get that the sum of π¦ is equal to 121.
00:02:57.460 --> 00:03:01.820
This means weβve so far managed to find the values of π, the sum of π₯, and the sum of π¦.
00:03:02.090 --> 00:03:03.960
We have two more things we need to calculate.
00:03:03.960 --> 00:03:06.340
Next, letβs find the value of the sum of π₯ squared.
00:03:06.450 --> 00:03:12.300
To find the sum of π₯ squared, we need to square all of our values of π₯ in the table and then add these together.
00:03:12.610 --> 00:03:22.310
So in our table, we get the sum of π₯ squared is equal to 10 squared plus 22 squared plus 22 squared plus 13 squared plus 16 add 21 squared.
00:03:22.620 --> 00:03:26.300
And if we calculate this, we get 1934.
00:03:26.480 --> 00:03:28.310
Thereβs only one more thing we need to calculate.
00:03:28.310 --> 00:03:30.640
We need to find the sum of π₯ multiplied by π¦.
00:03:30.810 --> 00:03:36.340
This is more tricky because we need to find the sum of π₯ multiplied by π¦ for each of the data points in our table.
00:03:36.440 --> 00:03:38.610
So letβs start with the first column in our table.
00:03:38.640 --> 00:03:41.430
The π₯-value is 10, and the π¦-value is 25.
00:03:41.460 --> 00:03:44.420
We need to multiply these together to get 10 times 25.
00:03:44.600 --> 00:03:46.970
We need to do the same with the second column in our table.
00:03:47.020 --> 00:03:49.780
The π₯-value is 22, and the π¦-value is 18.
00:03:49.810 --> 00:03:52.820
We need to multiply these together to get 22 times 18.
00:03:52.920 --> 00:03:55.470
And we need to add this to our previous product.
00:03:55.630 --> 00:04:01.540
And we need to follow this process for all of the columns in our table, giving us the following expression for the sum of π₯π¦.
00:04:01.810 --> 00:04:07.460
And if we calculate this expression, we see we get the sum of π₯π¦ is equal to 2048.
00:04:07.610 --> 00:04:15.150
Now that we found the value of π, the sum of π₯, the sum of π¦, the sum of π₯ squared, and the sum of π₯ times π¦, weβre ready to find the values of π and π.
00:04:15.400 --> 00:04:21.080
And itβs worth pointing out we should always start with the value of π because we need the value of π to find the value of π.
00:04:21.320 --> 00:04:26.750
And of course to find the value of π, we first need to find π sub π₯π₯ and π sub π₯π¦.
00:04:26.980 --> 00:04:28.790
Letβs start with π sub π₯π₯.
00:04:28.820 --> 00:04:30.480
First, we need the sum of π₯ squared.
00:04:30.510 --> 00:04:33.440
And we know this is equals to 1934.
00:04:33.600 --> 00:04:36.950
Then we need to subtract the sum of π₯ all squared divided by π.
00:04:36.980 --> 00:04:39.400
Remember the sum of π₯ is equal to 104.
00:04:39.430 --> 00:04:43.420
We then need to square this, and we need to divide this by the value of π, which is six.
00:04:43.650 --> 00:04:50.710
Therefore, weβve shown that π sub π₯π₯ is equal to 1934 minus 104 squared over six.
00:04:50.940 --> 00:04:52.170
And we can calculate this.
00:04:52.170 --> 00:04:54.920
Itβs equal to 394 divided by three.
00:04:54.920 --> 00:05:01.060
And itβs important we find this value exactly because we donβt want to round until the end because this might make our answer incorrect.
00:05:01.300 --> 00:05:03.960
We can then do exactly the same to find π sub π₯π¦.
00:05:04.010 --> 00:05:08.670
We need to substitute in our values for the sum of π₯π¦, the sum of π₯, the sum of π¦, and π.
00:05:09.010 --> 00:05:16.410
Doing this, we get that π sub π₯π¦ is equal to 2048 minus 104 times 121 over six.
00:05:16.410 --> 00:05:20.840
And if we calculate this expression exactly, we get negative 148 divided by three.
00:05:21.200 --> 00:05:22.910
And now we can find the value of π.
00:05:22.940 --> 00:05:25.530
Remember, this is the quotient of these two values.
00:05:25.810 --> 00:05:29.390
π is equal to π sub π₯π¦ divided by π sub π₯π₯.
00:05:29.420 --> 00:05:35.610
So in this case, π is equal to negative 148 over three divided by 394 over three.
00:05:35.810 --> 00:05:38.130
And we could evaluate this by using our calculator.
00:05:38.240 --> 00:05:44.220
Or we could remember that to divide two fractions, we can also multiply it by the reciprocal of our second fraction.
00:05:44.420 --> 00:05:49.490
Either way, we get our value of π is negative 74 divided by 197.
00:05:49.670 --> 00:05:52.690
And remember, itβs important to find this value exactly.
00:05:52.720 --> 00:05:54.370
Weβll round our values at the end.
00:05:54.580 --> 00:05:57.770
Weβre now ready to find the value of π, but letβs first clear some space.
00:05:57.910 --> 00:06:02.510
To find the value of π, we first need to find the mean value of π₯ and the mean value of π¦.
00:06:02.790 --> 00:06:04.380
Letβs start with the mean value of π₯.
00:06:04.380 --> 00:06:09.970
Thatβs the total value of π₯ divided by the number of data points, in this case, 104 over six.
00:06:10.160 --> 00:06:17.010
And in this case, we can cancel the shared factor of two in the numerator and denominator to get that π₯ bar is equal to 52 over three.
00:06:17.330 --> 00:06:19.620
We can do the same to find the mean value of π¦.
00:06:19.650 --> 00:06:25.030
Thatβs the total value of π¦ divided by the number of data points, in this case, 121 over six.
00:06:25.220 --> 00:06:27.520
And this fraction doesnβt simplify any further.
00:06:27.580 --> 00:06:29.490
Weβre now ready to find the value of π.
00:06:29.800 --> 00:06:35.330
Remember π is equal to the mean value of π¦ minus π multiplied by the mean value of π₯.
00:06:35.460 --> 00:06:44.560
So in our case, π is going to be equal to 121 over six minus negative 74 over 197 multiplied by 52 over three.
00:06:44.810 --> 00:06:46.630
And we can simplify this expression.
00:06:46.660 --> 00:06:50.510
First, subtracting a negative number is the same as just adding a positive number.
00:06:50.910 --> 00:06:57.170
Next, we can simplify the second term in this expression by just multiplying the numerators and multiplying the denominators.
00:06:57.350 --> 00:07:03.850
This gives us 121 over six plus 3848 divided by 591.
00:07:04.070 --> 00:07:07.030
And now we could find our value of π exactly as a fraction.
00:07:07.060 --> 00:07:13.310
However, itβs not necessary to answer this question since we only need to find the values of π and π to three decimal places.
00:07:13.310 --> 00:07:14.710
So weβll write this as an expansion.
00:07:14.740 --> 00:07:19.370
π is equal to 26.6776, and this expansion continues.
00:07:19.650 --> 00:07:21.630
We want to round this to three decimal places.
00:07:21.630 --> 00:07:24.250
So we need to look at the fourth decimal place in our expansion.
00:07:24.510 --> 00:07:27.220
This is equal to six, which is greater than or equal to five.
00:07:27.220 --> 00:07:28.360
So we need to round up.
00:07:28.630 --> 00:07:32.990
This gives us that π is equal to 26.678 to three decimal places.
00:07:33.190 --> 00:07:35.680
We can do exactly the same with our value of π.
00:07:35.870 --> 00:07:38.460
We write out the value of π as a decimal expansion.
00:07:38.490 --> 00:07:42.460
We get negative 0.3756, and this expansion continues.
00:07:42.690 --> 00:07:44.240
We want this to three decimal places.
00:07:44.240 --> 00:07:46.080
So we need to look at the fourth decimal place.
00:07:46.080 --> 00:07:47.320
This is also equal to six.
00:07:47.320 --> 00:07:48.620
So weβre going to need to round up.
00:07:48.830 --> 00:07:53.670
So to three decimal places, our value of π is negative 0.376.
00:07:53.850 --> 00:07:54.640
But weβre not done yet.
00:07:54.640 --> 00:07:59.830
Remember, the question wants us to give our answer in the equation of a line, π¦ hat is equal to π plus ππ₯.
00:08:00.050 --> 00:08:11.520
Substituting the values of π and π into this equation for a line and writing the π₯-term first, we get π¦ hat is equal to negative 0.376π₯ plus 26.678, which is our final answer.
00:08:11.850 --> 00:08:17.330
Therefore, in this question, we were able to find the least squares regression line between the variables π₯ and π¦.
00:08:17.550 --> 00:08:20.750
And we found the values of π and π to three decimal places.
00:08:20.780 --> 00:08:26.710
We got that π¦ hat will be equal to negative 0.376π₯ plus 26.678.