What is going on?
Pearson’s r measures the direction and strength of a linear association. It runs from −1 to +1. Positive values describe points tending upward together; negative values describe one variable tending down as the other rises. Values near zero indicate little linear association, not necessarily no relationship.
Work through it
- Begin with a pattern or enter your own x,y pairs.
- Drag a point to change the data. Keyboard users can focus a point and move it with the arrow keys.
- Compare the scatterplot with the value of r. Try adding an outlying point or selecting the curved example.
Put numbers to the idea
The points (1,2), (2,4), and (3,6) lie on a straight rising line, so r = 1. For (1,6), (2,4), and (3,2), r = −1. A symmetric U-shaped pattern can have r = 0 even though y clearly depends on x.
A little more clarity
Does correlation imply causation?
No. Two variables can move together because of a third factor, reverse causation, selection effects, or chance. Establishing causation requires additional evidence and study design.
Can one outlier change the result?
Yes. Because the calculation uses products of deviations, a distant point can have a large effect. Always inspect the plot as well as the coefficient.
Why does a flat dataset give an undefined result?
If all x values or all y values are identical, one of the squared-deviation sums is zero. The correlation formula then divides by zero.