Step by step
The question
Question: find the correlation coefficient r for (10, 20), (20, 30), (30, 25), (40, 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: 100 divided by 4 is 25.
The mean of the y numbers: 120 divided by 4 is 30.
2 Make the table
A table with the points.
How far each point is from the means.
10 minus 25 is −15, and 20 minus 30 is −10.
These distances always add up to 0.
A good check.
The product: the two distances multiplied.
−15 times −10 is 150.
And each distance squared.
−15 squared is 225.
−10 squared is 100.
We add the last three columns: 350, 500 and 350.
3 Put them in the rule
The rule: the total of the products, over the square root of the two totals of squares multiplied.
We put the totals in: 350 on top.
500 times 350 under the root.
Careful!
Do not forget the square root.
Without it, r comes out far too small.
4 Work it out
500 times 350 is 175000.
With a calculator, the square root of 175000 is about 418.330.
So r is about 350/418.330.
Divided: about 0.837, to 3 decimal places, like the books.
5 What r tells us
On a scale from negative 1 to 1.
r is here, at 0.837.
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 350, 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.