Question Video: Calculating a Least Squares Regression Model from Summary Statistics | Nagwa Question Video: Calculating a Least Squares Regression Model from Summary Statistics | Nagwa

Question Video: Calculating a Least Squares Regression Model from Summary Statistics Mathematics

For a given data set, βˆ‘π‘₯ = 102, βˆ‘π‘¦ = 1092, βˆ‘π‘₯Β² = 1382, βˆ‘π‘¦Β² = 100392, βˆ‘π‘₯𝑦 = 8656, and 𝑛 = 12. Find the equation of the regression line of 𝑦 on π‘₯ in the form 𝑦 = π‘šπ‘₯ + 𝑏, giving π‘š and 𝑏 correct to two decimal places.

02:49

Video Transcript

For a given data set, the sum of π‘₯ equals 102, the sum of 𝑦 equals 1092, the sum of π‘₯ squared is 1382, the sum of 𝑦 squared is 100392, sum of π‘₯𝑦 is 8656, and 𝑛 equals 12. Find the equation of the regression line of 𝑦 on π‘₯ in the form 𝑦 equals π‘šπ‘₯ plus 𝑏, giving π‘š and 𝑏 correct to two decimal places.

Remember, the least squares regression line for a set of bivariate data with variables π‘₯ and 𝑦 is given as 𝑦 hat equals π‘Ž plus 𝑏π‘₯. 𝑏 is essentially the slope or gradient of the line of best fit and is given by 𝑆 π‘₯𝑦 over 𝑆 π‘₯π‘₯, where 𝑆 π‘₯𝑦 is found by subtracting the sum of π‘₯ times the sum of 𝑦 over 𝑛 from the sum of π‘₯𝑦. And 𝑆 π‘₯π‘₯ is the sum of π‘₯ squared minus the sum of π‘₯ all squared divided by 𝑛. And π‘Ž is the 𝑦-intercept. It’s 𝑦 bar minus 𝑏π‘₯ bar, where 𝑦 bar and π‘₯ bar are the means of 𝑦 and π‘₯, respectively.

We’ve been given all of the values we need to be able to calculate each of these. Let’s begin with 𝑆 π‘₯𝑦, which is the sum of π‘₯𝑦, that’s 8656, minus the sum of π‘₯ times the sum of 𝑦 divided by 𝑛. In other words, it’s 8656 minus 102 times 1092 over 12, which is negative 626. Similarly, 𝑆 π‘₯𝑦 is 1382, that’s the sum of π‘₯ squared, minus the sum of π‘₯ squared, which is 102 squared, divided by 12. That’s 515. 𝑏 is the quotient of these, so it’s negative 626 divided by 515, or negative 1.22 correct to two decimal places.

Now that we have the slope, we can work out the value of the 𝑦-intercept by using the formula π‘Ž equals 𝑦 bar minus 𝑏 times π‘₯ bar. 𝑦 bar is the sum of all of the 𝑦-values divided by 12, so 1092 divided by 12, which is equal to 91. Similarly, the mean of π‘₯ is 102 divided by 12, which is 8.5. Then, π‘Ž is 𝑦 bar minus 𝑏 times π‘₯ bar. So it’s 91 minus negative 626 over 515 times 8.5, which correct to two decimal places is 101.33. And so the regression line can be written as 𝑦 bar equals 101.33 minus 1.22π‘₯, or equivalently 𝑦 equals negative 1.22π‘₯ plus 101.33.

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

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy