### Video Transcript

Suppose that the sum of π₯ equals six, the sum of π¦ equals 21, sum of π₯ squared equals 76, the sum of π¦ squared equals 91, the sum of π₯π¦ equals 56, and π equals six. Part a, find the correlation coefficient between the values of π₯ and π¦.

A correlation coefficient is a way of quantifying the strength of any linear relationship that exists between two variables. The product moment correlation coefficient or PMCC, which is often denoted using the letter π, is given by ππ₯π¦ over the square root of ππ₯π₯ multiplied by ππ¦π¦, where ππ₯π₯, ππ¦π¦, and ππ₯π¦ are all as given below. Donβt worry about attempting to learn this formula off by heart. You will most likely be given it in a formula booklet. Weβll now go through the calculation of each of these quantities, ππ₯π₯, ππ¦π¦, and ππ₯π¦, step by step, using the summary that we were given at the start of the question.

For ππ₯π₯, first of all then, weβre told that the sum of π₯ squared is 76. The sum of π₯ is six. And π is also six. So we have 76 minus six squared over six. There is an important distinction to be made between the sum of π₯ squared and the sum of π₯ all squared. For the sum of π₯ squared, we square the individual π₯-values first and then add them up. For the sum of π₯ all squared, we sum the π₯-values first and then square the result. Make sure that youβre clear on the difference between these two pieces of notation. Now, six squared is 36. And 36 divided by six is six. So our calculation of ππ₯π₯ simplifies to 76 minus six, which is equal to 70.

For ππ¦π¦ next, we have that the sum of π¦ squared is 91. And the sum of π¦ is 21. So our calculation is 91 minus 21 squared over six. This simplifies to 91 minus 73.5, which is equal to 17.5. Finally, for ππ₯π¦, we have that the sum of π₯π¦, which means the product of all of the individual π₯-values multiplied by their corresponding π¦-values and then summed, is 56. We have that the sum of π₯ is six. And the sum of π¦ is 21 and again is six. So we have 56 minus six multiplied by 21 over six. The sixes in the numerator and denominator of the fraction cancel. So weβre left with 56 minus 21, which is 35.

Now, we just need to substitute the values that weβve calculated for ππ₯π₯, ππ¦π¦, and ππ₯π¦ into the formula for our correlation coefficient. So we have 35 over the square root of 70 multiplied by 17.5. 70 multiplied by 17.5 is 1225. And the square root of 1225 is in fact 35. So we have 35 over 35, which is equal to one. A correlation coefficient of one means that the values π₯ and π¦ are in perfect positive linear correlation. If we were to plot a graph of π₯ against π¦, then the points would lie exactly on a straight line with positive gradient.

Part b), find the equation of the regression line of π¦ on π₯.

The equation of the regression line of π¦ on π₯ is the equation of the straight line π¦ equals π plus ππ₯, which best fits the data values. Usually, the values of π and π would be chosen to minimise the sum of squares of the residuals, which means the differences between the actual π¦-values and their values if we were to predict them using the straight line. However, as the correlation coefficient between our values of π₯ and π¦ is one, this means that the points all lie exactly on a straight line. So weβre just looking to find the equation of this line.

In either case, there are standard formulae that we can apply to calculate the values of π and π. π is equal to ππ₯π¦ over ππ₯π₯, where both these quantities are defined as they were in part a). π is equal to π¦ bar, thatβs the mean of the π¦-values, minus ππ₯ bar, the mean of the π₯-values. So because we use π in the calculation of π, we have to calculate π first. Looking back at our working for part a), we can see that ππ₯π¦ was equal to 35. And ππ₯π₯ was equal to 70. So π is equal to 35 over 70. Now, 35 is actually half of 70. If we divide 35 by 35, we get one. And if we divide 70 by 35, we get two. So our value of π just simplifies to one-half.

To calculate π, we first need to calculate π₯ bar and π¦ bar. Remember, π₯ bar is the mean of the π₯-values. So we need to divide their sum by how many there are. The sum of the π₯-values is six. And there are six of them. So π₯ bar is equal to one. For π¦ bar, the sum of the π¦-values is 21. And again, there are six of them. So π¦ bar is equal to 21 over six, which is 3.5. So substituting the values of π¦ bar, π₯ bar, and π into our formula for π, we have that π is equal to 3.5 minus one-half multiplied by one. Now, a half multiplied by one is just a half, which as a decimal is 0.5. So we have 3.5 minus 0.5, which is three.

Finally, we substitute the values of π and π that weβve just calculated into the equation of our line. And we have that the equation of the regression line of π¦ on π₯ is π¦ equals three plus a half π₯. We could use this regression line to make predictions about the value of π¦ for given values of π₯.