Video Transcript
For a given data set, 𝑥 bar equals 30.8, 𝑦 bar equals 27.5, 𝑆 𝑥𝑥 equals 4,407, 𝑆 𝑦𝑦 equals 228, and 𝑆 𝑥𝑦 equals 752. Find the equation of the regression line of 𝑦 on 𝑥 in the form 𝑦 equals 𝑚𝑥 plus 𝑏, giving 𝑚 and 𝑏 correct to two decimal places.
The equation that describes the least squares regression line of 𝑦 on 𝑥 is 𝐲 hat equals 𝑎 plus 𝑏𝑥. We’ll compare this with the general form 𝑦 equals 𝑚𝑥 plus 𝑏 at the end. In the equation for 𝐲 hat equals 𝑎 plus 𝑏𝑥, 𝑏 is the slope. And it’s found by dividing 𝑆 𝑥𝑦 by 𝑆 𝑥𝑥. Then, once we have a value for 𝑏, we can find a value for 𝑎, which is the 𝑦-intercept, by calculating 𝑦 bar minus 𝑏 times 𝑥 bar.
So we begin by calculating the value of 𝑏. We’re given 𝑆 𝑥𝑦 is equal to 752 and 𝑆 𝑥𝑥 is 4,407. So 𝑏 is 752 divided by 4,407. That’s 0.17063 and so on, which correct to two decimal places is 0.17.
Now that we have a value for 𝑏, we can calculate 𝑎. 𝑦 bar is 27.5. We just calculated 𝑏, and we’re going to use the exact value for 𝑏. And 𝑥 bar is 30.8. So 𝑎 is 27.5 minus 752 over 4,407 times 30.8, which is 22.2443 and so on. Correct to two decimal places, that’s 22.24.
Substituting these back into the equation 𝐲 hat equals 𝑎 plus 𝑏𝑥, and we get 𝐲 hat equals 22.24 plus 0.17𝑥. Now, we’ve been in fact been told to give this in the form 𝑦 equals 𝑚𝑥 plus 𝑏. So we switch the 𝑥-term and the constant. 𝑦 equals 0.17𝑥 plus 22.24.