Step by step
The question
Question: find the correlation coefficient r for (20, 30), (22, 35), (24, 37), (26, 43), (28, 45).
r is a number from negative 1 to 1.
It tells how close the points are to a straight line, going up or down.
1 Find the means
The mean of the x numbers: 120 divided by 5 is 24.
The mean of the y numbers: 190 divided by 5 is 38.
2 Make the table
A table with the points.
How far each point is from the means.
20 minus 24 is −4, and 30 minus 38 is −8.
These distances always add up to 0.
A good check.
The product: the two distances multiplied.
−4 times −8 is 32.
Why multiply?
Up and right of the means, both distances are positive: the product is positive.
Down and left, both are negative: positive again.
Those points make an uphill line.
The other points give negative products: downhill.
And each distance squared.
−4 squared is 16.
−8 squared is 64.
The squares show how spread out x and y are.
We add the last three columns: 76, 40 and 148.
3 Put them in the rule
The rule: the total of the products, over the square root of the two totals of squares multiplied.
Dividing by the spread keeps r between negative 1 and 1, whatever the numbers.
We put the totals in: 76 on top.
40 times 148 under the root.
Careful!
Do not forget the square root.
Without it, r comes out far too small.
4 Work it out
40 times 148 is 5920.
With a calculator, the square root of 5920 is about 76.942.
So r is about 76/76.942.
Divided: about 0.988, to 3 decimal places.
5 What r tells us
On a scale from negative 1 to 1.
r is here, at 0.988.
Positive: as x goes up, y goes up.
Close to 1: strong.
A strong positive correlation.
6 Check
Let's check.
The products add up to 76, so r must be positive.
It is.
And r is between negative 1 and 1.
So it makes sense!
Let's look back.
First: find the means.
Then: make the table.
Then: put them in the rule.
Then: work it out.
Then: what r tells us.
Last: check.