Question Video: Calculating a Least Squares Regression Model from a Sum of Squares | Nagwa Question Video: Calculating a Least Squares Regression Model from a Sum of Squares | Nagwa

# Question Video: Calculating a Least Squares Regression Model from a Sum of Squares Mathematics • Third Year of Secondary School

## Join Nagwa Classes

For a given data set, π₯ bar = 30.8, π¦ bar = 27.5, π_(π₯π₯) = 4,407, π_(π¦π¦) = 228, and π_(π₯π¦) = 752. Find the equation of the regression line of π¦ on π₯ in the form π¦ = ππ₯ + π, giving π and π correct to two decimal places.

02:07

### 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.

## Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

• Interactive Sessions
• Chat & Messaging
• Realistic Exam Questions