Video: EG19M1-Statistics-Q10B

EG19M1-Statistics-Q10B

04:44

Video Transcript

If the sum of π‘₯ equals 21, the sum of 𝑦 equals negative three, the sum of π‘₯ squared equals 91, the sum of 𝑦 squared equals 19, the sum of π‘₯𝑦 equals negative 28, and 𝑛 equals six, find the regression line equation of 𝑦 on π‘₯.

The regression line equation of 𝑦 on π‘₯ is of the form 𝑦 equals π‘Ž plus 𝑏π‘₯, where π‘Ž and 𝑏 are constants. And it describes the equation of the straight line which most closely fits the given data. The values of π‘Ž and 𝑏 are chosen so that the sum of the squares of the residuals, which are the differences between each actual value and the value as predicted by the line, is made as small as possible. It is minimised. There are standard formulae that we can apply in order to calculate the values of π‘Ž and 𝑏. 𝑏 is equal to 𝑠π‘₯𝑦 over 𝑠π‘₯π‘₯, where 𝑠π‘₯𝑦 and 𝑠π‘₯π‘₯ are defined as follows. 𝑠π‘₯𝑦 is equal to the sum of π‘₯𝑦 minus the sum of π‘₯ multiplied by the sum of 𝑦 over 𝑛. And 𝑠π‘₯π‘₯ is equal to the sum of π‘₯ squared minus the sum of π‘₯ all squared over 𝑛.

Notice that there is a key difference between the two pieces of notation used in the definition of 𝑠π‘₯π‘₯. The sum of π‘₯ squared means that we square each individual π‘₯-value first and then find the sum. Whereas the sum of π‘₯ all squared means that we find the sum of the π‘₯-values first and then square the result. We must be clear on the distinction between these two things. Once we found the value of 𝑏, we can work out the value of π‘Ž by recalling that one point which will always lie on this straight line is the point π‘₯ bar, 𝑦 bar. That’s the point whose π‘₯-coordinate is the mean of the π‘₯-values and whose 𝑦-coordinate is the mean of the 𝑦-values.

If this point lies on the line, then its coordinates satisfy the equation of the line. So we have 𝑦 bar is equal to π‘Ž plus 𝑏π‘₯ bar. By subtracting 𝑏π‘₯ bar from each side, and here I’ve swapped the two sides of the equation around, we have an equation that we can use to calculate π‘Ž. π‘Ž is equal to 𝑦 bar minus 𝑏π‘₯ bar. We’ve been given all of the summaries that we need to work out each of these quantities in the question. So let’s begin.

For 𝑠π‘₯𝑦 first of all, the sum of π‘₯𝑦 is equal to negative 28. The sum of π‘₯ is equal to 21, and the sum of 𝑦 is equal to negative three. 𝑛 is equal to six. So we have negative 28 minus 21 times negative three over six. This simplifies to negative 28 plus 63 over six, which is equal to negative 17.5. In our calculation of 𝑠π‘₯π‘₯ next, we have the sum of π‘₯ squared which is equal to 91. We then subtract the sum of π‘₯ all squared, so that’s 21 squared, over 𝑛, which is equal to six, giving 91 minus 21 squared over six. That simplifies to 91 minus 441 over six, which is equal to 17.5.

So now we have the values of 𝑠π‘₯𝑦 and 𝑠π‘₯π‘₯. We can substitute into the formula for calculating 𝑏. This gives negative 17.5 over 17.5, which simplifies to negative one.

Next, we need to calculate the value of π‘Ž. And to do this, we first need to work out the values of π‘₯ bar and 𝑦 bar. To do so, we recall that to find the mean of a set of data we add them all up and divide by how many pieces of data there are. So π‘₯ bar is equal to the sum of π‘₯ over 𝑛. And 𝑦 bar is equal to the sum of 𝑦 over 𝑛. For π‘₯ bar, we have 21 over six which is equal to 3.5. And for 𝑦 bar, negative three over six which is equal to negative 0.5. We can now substitute the values of 𝑦 bar, 𝑏, and π‘₯ bar into the formula for calculating π‘Ž. And it gives π‘Ž equals negative 0.5 minus negative one multiplied by 3.5. That’s negative 0.5 plus 3.5 which is equal to three.

Finally, we substitute the values that we found for π‘Ž and 𝑏 into the equation of our straight line. π‘Ž is equal to three, and 𝑏 is equal to negative one. So our equation is 𝑦 equals three minus π‘₯. We can, of course, write the equation the other way round if we wish. 𝑦 equals negative π‘₯ plus three. So we found the equation of the regression line of 𝑦 on π‘₯. It’s equal to 𝑦 equals three minus π‘₯. As this line has a gradient of negative one, it means that there is negative correlation between π‘₯ and 𝑦.

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