# Video: Determining the Pearson’s Correlation Coefficient and Type of Correlation between Two Variables

The table shows the marks that 10 students received in history and geography. Calculate the Pearson’s correlation coefficient and determine the type of correlation.

04:51

### Video Transcript

The table shows the marks that 10 students received in history and geography. Calculate the Pearson’s correlation coefficient and determine the type of correlation.

Let’s start by recalling the equation for the Pearson’s correlation coefficient. So we have that the Pearson’s correlation coefficient or 𝑟 is equal to 𝑛 timesed by the sum from one to 𝑛 of 𝑥𝑖 times 𝑦𝑖 minus the sum from one to 𝑛 of 𝑥𝑖 timesed by the sum from one to 𝑛 of 𝑦𝑖 all over the square root of 𝑛 lots of the sum from one to 𝑛 of 𝑥𝑖 squared minus the sum from one to 𝑛 of 𝑥𝑖 all squared multiplied by 𝑛 timesed by the sum from one to 𝑛 of 𝑦𝑖 squared minus the sum from one to 𝑛 of 𝑦𝑖 all squared.

Now this looks very scary. So we’ll calculate each component individually and then substitute them back into the equation to find our answer. Now let’s redraw our table. But this time, we’ll include columns for 𝑥𝑖 times 𝑦𝑖, 𝑥𝑖 squared, and 𝑦𝑖 squared.

Here is our table. We have labelled the history results as 𝑥𝑖 and the geography results as 𝑦𝑖. Now let’s quickly note that 𝑛 is just a number of students. And so in our case, 𝑛 equals 10. Now let’s fill out some of the columns in our table. For 𝑥𝑖𝑦𝑖, we simply take the history result 𝑥𝑖 and multiply it by the geography result 𝑦𝑖 for each individual student. This is what it will look like.

Next, let’s work out 𝑥𝑖 squared. So we simply take every 𝑥𝑖 value and square it. This is what we will get. Now let’s work out the final column, which we get by squaring the 𝑦𝑖 values. Now this is what our completed table should look like. And we’re now ready to calculate the values in the equation.

So for the sum from one to 𝑛 of 𝑥𝑖𝑦𝑖, we simply add together all the values in the 𝑥𝑖𝑦𝑖 column in the table. So that’s this column here. This gives us 65061.

Next, we’ll calculate the sum from one to 𝑛 of 𝑥𝑖. So we simply add together all of these values in the table, since they are in the 𝑥𝑖 column. This gives us 784.

Now for the sum from one to 𝑛 of 𝑦𝑖, we simply add together all the values in the 𝑦𝑖 column of the table. This gives us 837.

Now for the sum from one to 𝑛 of 𝑥𝑖 squared, we simply add together the 𝑥𝑖 squared terms in the table. So that’s this column here. And this gives us 62752.

Now for the sum from one to 𝑛 of 𝑦𝑖 squared, we simply add together all the values in the 𝑦𝑖 squared column. So that’s this column here. And this gives us 70565. We will also need to calculate the sum from one to 𝑛 of 𝑥𝑖 all squared and the sum from one to 𝑛 of 𝑦𝑖 all squared. And we do this by squaring the values which we’ve already calculated for the sum from one to 𝑛 of 𝑥𝑖 and the sum from one to 𝑛 of 𝑦𝑖. And this gives us 614656 and 700569.

So now we have calculated all the components of our Pearson’s correlation coefficient equation. And so we can put them into the equation to find our coefficient. So substituting these values in, we get that 𝑟 is equal to 10 times 65061 minus 784 times 837 all divided by the square root of 10 lots of 62752 minus 614656 times 10 lots of 70565 minus 700569.

Now we just need to type this into our calculator to give us an answer of 𝑟 is equal to minus 0.6924. Now we are also asked to determine the type of correlation. And since our answer is negative, therefore, this means there is an inverse correlation.