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.