Correlation is a measure of how strongly two variables move together in a straight-line pattern. In a positive correlation both rise together; in a negative correlation one rises as the other falls. The correlation coefficient r runs from −1 to 1: values near ± 1 are strong and values near 0 are weak. Correlation does not prove causation.
In Spanish
correlación
Also called
correlation coefficient, r value, association, linear correlation
The direction of the cloud gives the sign of r, and how tightly it hugs a line gives the size of r.
Formal definition and notation
For paired data(x1, y1), …, (xn, yn), the Pearson correlation coefficientr (formula below) is the sum of the products of the paired deviations from the means, divided by the square root of the product of the two sums of squared deviations, and always satisfies −1 ≤ r ≤ 1. The sign of r matches the sign of the slope of the least-squares line, and |r| measures how closely the points in the scatter plot cluster around that line. r = ± 1 only when every point lies exactly on a line. r measures linear association only, and it has no units.
the coefficient of determination: the share of the variation in y explained by the line
Key facts
Positive:r > 0, the points trend up. Negative:r < 0, the points trend down. None:r near 0, no linear trend.
The sign shows direction and the size shows strength: r = −0.9 is a stronger correlation than r = 0.6.
r measures only straight-line patterns. Points on a U-shaped curve can have r = 0 and still be closely related.
One outlier can raise or lower r a lot, so always look at the scatter plot.
Correlation is not causation. Ice cream sales and sunburns rise together because both increase in hot weather, a lurking (confounding) variable.
Correlation coefficient formula
Correlation coefficient formula
r = Σ (x − x)(y − y)√Σ (x − x)2 · Σ (y − y)2
x, y
the means of the x-values and of the y-values
Σ
add over every data pair
r
a number from −1 to 1 with no units
Calculators and spreadsheets (CORREL) compute r for you. A common rough guide: |r| above 0.7 is strong, 0.3 to 0.7 moderate, below 0.3 weak.
Correlation examples, step by step
Example 1: A perfect correlation
Warm-up
The points (1, 8), (2, 6), (3, 4) and (4, 2) are plotted. Describe the correlation and give r.
As x goes up by 1, y goes down by 2 every time.
So every point lies on one straight line that falls to the right.
A perfect downward line has r = −1.
Answer: A perfect negative correlation, r = −1.
Example 2: Compute r by hand
Core
Find r for the data x: 1, 2, 3, 4, 5 and y: 2, 4, 5, 4, 5.
Means: x = 3 and y = 4.
Deviations: x gives −2, −1, 0, 1, 2; y gives −2, 0, 1, 0, 1.
Sum of products: 4 + 0 + 0 + 0 + 2 = 6. Sums of squares: 10 for x and 6 for y.
r = 6√10 · 6, which is 6√60 ≈ 0.77.
Answer:r ≈ 0.77, a fairly strong positive correlation.
Example 3: Related, but r = 0
Test-style
The points (−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4) all lie on y = x2. A student finds r = 0 and says x and y are not related. Is that right?
x = 0 and y = 2.
Products of deviations: (−2)(2) + (−1)(−1) + 0(−2) + 1(−1) + 2(2) = 0, so r = 0.
But every y is exactly x2: the relationship is perfect, just not a straight line.
r measures only linear association.
Answer: No. r = 0 only means there is no straight-line trend; y is completely determined by x through y = x2.
Common mistakes
✗ MistakeConcluding from r = 0.8 between hours of TV and test scores that TV raises scores.
✓ InsteadSay the two variables are positively associated; only a controlled experiment can show that one causes the other.
A third, lurking variable or plain coincidence can produce a correlation.
✗ MistakeSaying r = −0.9 is weak because it is negative.
✓ Insteadr = −0.9 is strong; the minus sign only means y falls as x rises.
Strength is the distance from 0, the absolute value |r|; the sign is direction.
✗ MistakeReading r = 1 as “the slope is 1”.
✓ Insteadr = 1 means every point is on a rising line, whatever its slope: (1, 10), (2, 30), (3, 50) has r = 1 and slope 20.
r measures how tightly the points fit a line, not how steep the line is.
Not to be confused with
Correlationvs.Causation
Causation means one variable changes the other. Correlation only says they move together; shoe size and reading level are correlated in children because both grow with age.
A scatter plot is the graph of the paired data; correlation is the pattern or the number r that describes it.
Quick check: 3 questions
Question 1 of 3
Which correlation coefficient shows the strongest linear relationship?
Show answer and explanation
Answer: D. Strength is how close |r| is to 1: |−0.92| = 0.92 is the largest. Choosing 0.65 treats positive as stronger, which is not how r works.
Question 2 of 3
What is r for the points (1, 3), (2, 5), (3, 7)?
Show answer and explanation
Answer: B. All three points lie on the rising line y = 2x + 1, so r = 1. 2 is the slope, which is not r; −1 would need a falling line; 0 means no trend.
Question 3 of 3
Among children aged 5 to 12, shoe size and reading score have r = 0.8. What is the best conclusion?
Show answer and explanation
Answer: C. A strong correlation can come from a third variable that drives both. Age explains both measures, so neither causes the other; the data can be correct.
Correlation: frequently asked questions
What does a correlation of 0 mean?
It means there is no straight-line trend: knowing x does not help you predict y with a line. It does not always mean the variables are unrelated. Points on a U-shaped curve, like y = x2 for x from −2 to 2, can have r = 0 even though y is completely determined by x.
Is a negative correlation bad?
No. Negative only describes direction: as one variable goes up, the other goes down. Outdoor temperature and heating cost have a negative correlation, and that is simply how they behave. A correlation of −0.9 is just as strong as 0.9, only in the opposite direction.
Why does correlation not imply causation?
Two variables can rise and fall together because a third variable drives both, because of coincidence, or because the cause runs the other way. Ice cream sales and swimming accidents both rise in summer heat. To show cause and effect, researchers use randomized experiments that control the other variables.
DataData are facts or values collected to answer a question, such as survey answers, measurements or counts. Numerical data are numbers you measure or count, like heights; categorical data are labels or groups, like favorite colors. Data are organized in tables and shown in graphs so patterns are easy to see.Statistics · Grade 2, Grade 3, Grade 6Correlation CoefficientThe correlation coefficient, r, is a number from −1 to 1 that measures how closely the points of a scatter plot follow a straight line. The sign gives the direction (positive slopes up, negative slopes down), and the size gives the strength: near ± 1 is strong, near 0 is weak or none.Statistics · Algebra 1, StatisticsSquare RootA square root of a number is a value that, multiplied by itself, gives that number. The square root of 36 is 6 because 6 × 6 = 36. Every positive number has two square roots, such as 6 and −6, but the radical sign √ means the principal square root, which is the non-negative one.Number System · Grade 8, Algebra 1SlopeSlope is a number that measures how steep a line is: the change in y divided by the change in x between any two points on the line, often called rise over run. A positive slope rises from left to right, a negative slope falls, and a horizontal line has slope 0.Algebra · Grade 8, Algebra 1Line of Best FitA line of best fit is a straight line drawn through a scatter plot that shows the overall trend of the data as closely as possible. It passes through the middle of the points, with about as many above it as below. Its equation, ŷ = mx + b, lets you predict one variable from the other.Statistics · Grade 8, Algebra 1, StatisticsScatter PlotA scatter plot displays paired numerical data as points on a coordinate plane, one point for each pair. It helps show whether two quantities have a pattern or relationship: points rising from left to right show a positive association, points falling show a negative association, and a shapeless cloud shows no association.Statistics · Grade 8, Algebra 1SampleA sample in statistics is a part of a population that is actually observed or measured, such as 60 students surveyed out of a school of 900. You use the sample to estimate facts about the whole population. A random sample, where every member has the same chance to be chosen, tends to represent the population fairly.Statistics · Grade 7, Statistics, Algebra 1CoefficientA coefficient is the number multiplied by a variable in a term. In 4a the coefficient is 4, in −3x it is −3, and in x it is 1, because x = 1x. The sign in front belongs to the coefficient. A number standing alone, with no variable, is a constant instead.Algebra · Grade 6, Grade 7, Grade 8OutlierAn outlier is a data value that is far away from most of the other values in a set. In 4, 5, 6, 7, 50, the value 50 is an outlier. A common test flags any value more than 1.5 times the interquartile range below the first quartile or above the third. Outliers pull the mean strongly.Statistics · Grade 6, Grade 7, Grade 8CausationCausation means a change in one variable directly produces a change in another: the first is the cause and the second is the effect. Two variables can be correlated without causation, because a lurking variable or chance may link them. A well-designed randomized experiment is the standard way to show causation.Statistics · Grade 8, Algebra 1, StatisticsSquareA square is a quadrilateral with four equal sides and four right angles. It is a special rectangle and a special rhombus at the same time. For a square with side s, the perimeter is 4s, the area is s2, and each diagonal is s√2.Geometry · Kindergarten, Grade 2, Grade 3Absolute ValueThe absolute value of a number is its distance from zero on the number line, so it is never negative. It is written with two vertical bars: |−6| = 6 and |6| = 6. A positive number and 0 keep their value; a negative number loses its minus sign.Number System · Grade 6, Grade 7, Grade 8NumberA number is an amount or value used to count, measure, order and compare. We write numbers with digits (7), words (seven) or other symbols, but the number itself is the amount: 7 dots, the word seven and the numeral 7 all show the same number. Numbers include whole numbers, fractions, decimals and negatives.Number System · Kindergarten, Grade 1, Grade 2Ordered PairAn ordered pair is two numbers written to locate a point on the coordinate plane. It is written as (x, y): the x-value comes first, and the y-value comes second. From the origin, move x units across, then y units up or down. The order matters: (2, 5) and (5, 2) are different points.Geometry · Grade 5, Grade 6, Grade 7MeanThe mean is the sum of the values divided by the number of values. It is the arithmetic average: add every value and divide by how many there are. For 3, 7, 5 and 9, the mean is 24 ÷ 4 = 6. The mean is the balance point of the data, so one outlier can pull it far.Statistics · Grade 5, Grade 6, Grade 7Mathematical ModelA mathematical model represents a real situation using numbers, equations, diagrams, or graphs, well enough to make predictions. The equation C = 15 + 9m can model the cost of a subscription after m months. Every model simplifies, and knowing what a model leaves out is as important as knowing what it includes.Problem Solving · Grade 6, Grade 7, Grade 8Standard DeviationStandard deviation is a number that measures how spread out data values are from their mean: roughly, the typical distance of a value from the mean. A small standard deviation means the values cluster near the mean; a large one means they are spread out. It is the square root of the variance.Statistics · Algebra 1, StatisticsTwo-Way TableA two-way table shows counts for two categorical variables collected from the same group, with one variable in the rows and the other in the columns. Each inside cell is a joint frequency, and the totals in the margins are marginal frequencies. Dividing a cell by a row or column total gives relative frequencies that reveal associations.Statistics · Grade 8, Algebra 1