The Pearson correlation coefficient, written as r, measures how strongly two quantitative variables are related in a straight-line pattern. It also tells the direction of that relationship, using positive values for variables that tend to increase together and negative values for one variable increasing while the other decreases. Correlation is important because it gives a compact numerical summary of patterns seen in a scatterplot.
It is widely used in science, economics, psychology, and engineering to compare data sets and test for linear trends.
The value of r always lies between -1 and +1. Values near +1 show a strong positive linear relationship, values near -1 show a strong negative linear relationship, and values near 0 show little or no linear relationship. Pearson correlation is based on how each data point varies from the mean of x and the mean of y, then scales that shared variation by the spread of each variable.
A high correlation can support prediction, but it does not prove that one variable causes the other.
Key Facts
- Pearson correlation coefficient r measures the strength and direction of a linear relationship between two quantitative variables.
- The range is -1 ≤ r ≤ 1.
- r = 1 means a perfect positive linear relationship, and r = -1 means a perfect negative linear relationship.
- r = 0 means no linear correlation, but a nonlinear pattern may still exist.
- Formula: r = Σ((xi - x̄)(yi - ȳ)) / sqrt(Σ(xi - x̄)^2 Σ(yi - ȳ)^2).
- The sign of r gives direction, while the magnitude |r| gives strength.
Vocabulary
- Pearson correlation coefficient
- A statistic, written as r, that measures the strength and direction of a linear relationship between two quantitative variables.
- Scatterplot
- A graph that displays paired data values as points on an x-y coordinate plane.
- Positive correlation
- A relationship in which larger values of one variable tend to occur with larger values of the other variable.
- Negative correlation
- A relationship in which larger values of one variable tend to occur with smaller values of the other variable.
- Linear relationship
- A pattern in data that is well described by a straight line.
Common Mistakes to Avoid
- Saying r = 0 means there is no relationship at all is wrong because r only measures linear relationships, so curved patterns can have little linear correlation.
- Treating correlation as causation is wrong because a strong r value does not prove that one variable directly causes changes in the other.
- Using r for categorical data is wrong because Pearson correlation requires paired quantitative measurements.
- Ignoring outliers is wrong because a single extreme point can greatly change the value of r and make the linear relationship look stronger or weaker than it is.
Practice Questions
- 1 A data set has r = 0.82 between hours studied and exam score. Describe the direction and strength of the linear relationship.
- 2 For the paired data (1, 2), (2, 4), (3, 6), and (4, 8), what is the Pearson correlation coefficient r?
- 3 A scatterplot curves upward in a clear U-shape, but its Pearson correlation coefficient is close to 0. Explain why r can be close to 0 even when the variables are related.