math.wiki
Statistics › Bivariate data › Correlation › The correlation coefficient
Open on the map
Algebra 1 · S.ID.C.8

The correlation coefficient

Two clouds of dots both climb. Which one keeps closer to a straight line, and can a single number say so?

Where you are 3 in Correlation

Why this exists

When you describe a scatter plot by eye, you name its direction, its form and its strength. Direction and form are usually easy to agree on. Strength is not: one person calls a cloud “fairly tight”, another “quite loose”, and neither can say which of two climbing clouds is tighter when they look alike. A Line of best fit shows the trend, but not how closely the points keep to it.

The correlation coefficient settles this with one number, r, that measures how closely the points cluster about a straight line. It is for two numerical variables measured on the same individuals. When both variables sort people into categories, the tool is association in a two-way table instead.

Definition

The correlation coefficient r of a set of paired numerical data is a number from -1 to 1 that measures how closely the points of its scatter plot cluster about a straight line.

  • Its sign gives the direction: r > 0 when the cloud climbs from left to right, r < 0 when it falls. The sign of r always matches the sign of the slope of the line of best fit.
  • Its size, the distance of r from 0, gives the strength. r = 1 or r = -1 only when every point lies on one straight line. r near 0 means there is no straight-line pattern.

In practice r is found with technology: a graphing calculator, a spreadsheet or a statistics app takes the list of pairs and reports r, often alongside the line of best fit. A formula for r exists, built from standardized values of the two variables, and is met in a statistics course (Correlation from standardized values). In this lesson r is always rounded to two decimal places.

Intuition

Figure 1 is a gallery. Each plot is labeled with its r, computed from the dots drawn.

r = 1.00
r = 0.98
r = 0.54
r = 0.04
r = -0.67
r = -1.00
Figure 1A gallery of scatter plots, each labeled with the value of r computed from its own dots (made-up data).

Read along the top row. At r = 1.00 every dot sits on one rising line. At 0.98 the dots wander a little off a line but stay close to it. At 0.54 the cloud still climbs, but in a wide band. Along the bottom row, at 0.04 the dots rise and fall with no direction at all, at -0.67 the cloud falls in a loose band, and at -1.00 every dot sits on one falling line.

So r measures tightness about a line, with a sign for the direction. The closer r is to 1 or -1, the thinner the band; the closer to 0, the less a straight line describes the cloud.

Putting a value of r into words is a judgment, not a rule. One rough way to say it: a size of about 0.8 or more is strong, about 0.5 to 0.8 moderate, about 0.3 to 0.5 weak, and below about 0.3 there is little or no straight-line pattern. Other books draw these lines in other places, and a value near a boundary can fairly be described either way. What is not a judgment is the order: r = -0.9 shows a stronger straight-line relationship than r = 0.6, because its size is larger.

Results

  • -1 \le r \le 1 for every set of paired data.
  • r > 0 for a cloud that climbs and r < 0 for one that falls; the sign of r matches the sign of the slope of the line of best fit.
  • r = 1 or r = -1 exactly when all the points lie on one straight line.
  • r measures only how closely the points follow a straight line. A strong curved pattern can have r near 0, and a curved pattern can also have r near 1.
  • r says nothing about how steep the cloud is.
Why it is true

Technology builds r from how far each point sits from the center of the cloud: the point whose coordinates are the mean of the x-values and the mean of the y-values. Draw a vertical and a horizontal line through the center and the plot splits into four boxes. A point in the top-right or bottom-left box (both values above their means, or both below) pushes r up. A point in the top-left or bottom-right box (one value above its mean, one below) pushes r down. The farther a point is from the center lines, the harder it pushes, and a point on a center line pushes neither way.

A climbing cloud puts most of its points top-right and bottom-left, so r comes out positive; a falling cloud does the reverse. That is why the sign of r matches the direction. A cloud with no direction spreads its points over all four boxes, the pushes largely cancel, and r lands near 0.

The boxes also show why r reads only straight lines. An arch that rises and then falls has as much push down on one side as push up on the other, so r can be 0 even when the points follow a perfect curve (Example 4). The two facts about size, that r never leaves the interval from -1 to 1 and reaches an end only when every point is on one line, come from the formula and are proved where the formula is met.

Worked examples

Example 1

A mountain walk

Halvard records the altitude and the air temperature at nine points on a mountain walk (made-up data), as pairs (altitude in meters, temperature in degrees Celsius): (300, 17.0), (500, 16.4), (700, 14.5), (900, 14.9), (1100, 12.2), (1300, 12.0), (1500, 11.3), (1700, 8.7), (1900, 8.9). Technology gives r = -0.98. Describe the relationship.

200 600 1000 1400 1800 6 8 10 12 14 16 18 altitude (m) air temperature (°C)
Figure 2Halvard’s mountain walk (made-up data). Here r = -0.98.
Solution

The sign is negative, so the cloud falls from left to right: the higher Halvard climbs, the colder the air tends to be. Figure 2 agrees, and a line of best fit through these points would have a negative slope.

The size, 0.98, is very close to 1, so the points cluster tightly about a straight line. They do not lie exactly on one, since r is not -1: between 700 m and 900 m the temperature even rises a little, from 14.5 to 14.9 degrees. The relationship is strong, negative and linear.

Example 2

Hands and feet

Jarmila measures the hand length and foot length of twelve adults (made-up data), in centimeters: (16.8, 23.5), (17.2, 22.6), (17.5, 24.8), (17.9, 23.4), (18.3, 25.9), (18.6, 24.0), (19.0, 24.2), (19.4, 26.4), (19.8, 24.9), (20.1, 27.0), (20.5, 25.2), (21.0, 26.1). Technology gives r = 0.71. What does it say?

16 17 18 19 20 21 22 22 23 24 25 26 27 28 hand length (cm) foot length (cm)
Figure 3Hand and foot lengths of twelve adults (made-up data). Here r = 0.71.
Solution

The sign is positive: adults with longer hands tend to have longer feet. The size, 0.71, is well away from 0 but well short of 1, so the points climb in a band that is clearly there but wide. In words, this is a moderate positive linear relationship. Someone else might call it fairly strong; that difference is the judgment the words always involve, and the number itself is what both would report.

“Tend to” matters. The second adult has a longer hand than the first, 17.2 cm against 16.8 cm, but a shorter foot, 22.6 cm against 23.5 cm. A positive r describes the cloud as a whole, not every pair of points.

Example 3

Birth month and height

Iolo lists the birth month (1 for January up to 12 for December) and the height in centimeters of twelve adults, one born in each month (made-up data): (1, 165), (2, 172), (3, 158), (4, 169), (5, 176), (6, 161), (7, 170), (8, 163), (9, 174), (10, 160), (11, 168), (12, 166). Technology gives r = -0.04. Are people born later in the year shorter?

1 2 3 4 5 6 7 8 9 10 11 12 150 155 160 165 170 175 180 birth month (1 = January) height (cm)
Figure 4Birth month and height for twelve adults (made-up data). Here r = -0.04.
Solution

No. A value as close to 0 as -0.04 means there is no straight-line pattern: the dots zigzag up and down across the year. The minus sign carries no direction worth reporting when the size is this small. Figure 4 shows no curve either, so these twelve adults show no association between birth month and height.

Example 4

A thrown ball

Konstantin tosses a ball straight up from the ground and records its height every half second until it lands (made-up data), as pairs (time in seconds, height in meters): (0, 0), (0.5, 6.25), (1, 10), (1.5, 11.25), (2, 10), (2.5, 6.25), (3, 0). Technology gives r = 0.00. Does that mean time and height are unrelated?

0 0.5 1 1.5 2 2.5 3 0 2 4 6 8 10 12 time (s) height (m)
Figure 5A ball tossed straight up (made-up data). The dashed lines pass through the center of the cloud. Here r = 0.00.
Solution

No. The points lie on a perfect arch: the time tells you the height exactly. What r = 0.00 says is only that no straight line, rising or falling, fits them.

Here r is exactly 0, and the four boxes show why. The mean time is 1.5 s. The seven heights add to 0 + 6.25 + 10 + 11.25 + 10 + 6.25 + 0 = 43.75, so the mean height is \displaystyle \frac{43.75}{7} = 6.25 m, and the center lines are the dashed lines in Figure 5. The points (1.5, 11.25), (0.5, 6.25) and (2.5, 6.25) sit on a center line and push neither way. The point (1, 10) is top-left and pushes r down; (2, 10) is top-right, at the same distances from the two lines as (1, 10), and pushes r up by exactly as much. The pair (0, 0) and (3, 0) cancel in the same way. Every push is matched.

So r near 0 means “no straight-line pattern”, not “no relationship”. Look at the plot before reading r.

Example 5

A pendulum’s swing

Taini hangs a weight on a string and times one full swing, out and back, for eight lengths of string (made-up data), as pairs (length in meters, time in seconds): (0.25, 1.00), (0.5, 1.42), (0.75, 1.74), (1, 2.01), (1.25, 2.24), (1.5, 2.46), (1.75, 2.66), (2, 2.84). Technology gives r = 0.99. Does that show length and swing time are linked by a straight line?

0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 length (m) time for one swing (s)
Figure 6Swing time of a pendulum at eight lengths (made-up data). Here r = 0.99, yet the points lie on a curve.
Solution

No. The lengths go up by the same 0.25 m each time, but the swing time grows by 0.42, 0.32, 0.27, 0.23, 0.22, 0.20 and 0.18 s, a smaller step each time. Points on a straight line would grow by the same step each time, so these points lie on a curve that flattens to the right.

Why is r so large, then? Over this range the curve bends only gently, so a straight line passes close to all eight points, and r measures exactly that closeness. A large r says a line comes close; it does not say a line is the right shape. Figure 6 shows the bend, and a residual plot is the tool that brings a bend like this into plain view.

Example 6

Same strength, different steepness

Figure 7 shows two plots, P and Q, on identical axes. Both have r = 0.92. Which shows the stronger straight-line relationship, and which the steeper one?

0 2 4 6 8 0 10 20 30 P
r = 0.92
0 2 4 6 8 0 10 20 30 Q
r = 0.92
Figure 7Two plots with the same r and very different steepness.
Solution

Neither is stronger. Equal values of r mean the two clouds cluster equally closely about their own straight lines.

P is far steeper. Across the plot P climbs from 4 to 28, a rise of 24, while Q climbs from 9 to 15, a rise of 6. Steepness is what the slope of a line of best fit measures, and r does not see it: a steep cloud can have a small r, and a nearly flat one a large r.

Boundaries

  • r needs two numerical variables measured in pairs on the same individuals. Categories, such as eye color, have no r.
  • r cannot be found when every x-value is the same or every y-value is the same. The points then sit on a vertical or horizontal line, and there is no spread in one variable for r to compare with the other.
  • r measures straight-line strength only. A curve can give r near 0 (Example 4) or near 1 (Example 5), so r is read together with the scatter plot, never instead of it.
  • r is not a percentage. r = 0.5 does not mean half the points are on a line or that half of anything happens; it is a position on the scale from -1 to 1.
  • r does not measure cause. Two variables can climb together because a third drives both, the subject of Correlation is not causation: lurking and confounding variables.
  • r has more properties, among them that it has no units and how one far-off point can move it; those are in Properties of the correlation coefficient.

Where this goes next

When you fit a function to data with technology, the same tool reports r next to the line it fits, so every fitted line arrives with a measure of how closely the data follow it. Residual plots then check the form that r cannot see. In a statistics course, Correlation from standardized values opens up the formula behind r, and Slope from r and the spreads, and regression to the mean shows how the slope of the line of best fit is built from r together with the spreads of the two variables.

Exercises

Reading a value of r

  1. A set of paired data has r = -0.85. Describe the direction and strength of its straight-line relationship.
  2. A set of paired data has r = 0.32. Describe the direction and strength of its straight-line relationship.
  3. A set of paired data has r = 1. What must be true of its scatter plot?
  4. Which shows the stronger straight-line relationship, r = 0.6 or r = -0.9? Explain.
  5. A calculator shows r = 1.3 for a set of data. What can you conclude?

Matching plots and values

Figure 8 shows four plots. Their values of r, in mixed order, are 0.19, -0.95, 0.98 and -0.72. Match each plot to its value and give a reason.

A B C D
Figure 8Four plots for Exercises 6 to 9.
  1. Plot A.
  2. Plot B.
  3. Plot C.
  4. Plot D.

Finding r with technology

  1. Six towns at different distances from the coast (made-up data), as pairs (distance in kilometers, yearly rainfall in centimeters): (20, 150), (40, 130), (50, 135), (70, 100), (80, 95), (100, 75). Find r and describe the relationship.
  2. Six households (made-up data), as pairs (number of people, liters of milk bought a week): (1, 2), (2, 5), (3, 3), (4, 6), (5, 5), (6, 8). Find r and describe the relationship.
  3. Take only the first four pairs of Example 4, while the ball is rising. Find r. Is a straight line the right description of the ball’s rise?
  4. The points are (1, 9), (2, 4), (3, 1), (4, 0), (5, 1), (6, 4), (7, 9). Find r, and describe the relationship in words.

Reasoning

  1. Explain why r = 0.5 does not mean that half of the points lie on the line.
  2. Plot X climbs much more steeply than plot Y. Must X have the larger r? Explain.
  3. A set of data has r = 0.97. Does that show the data follow a straight line? What should you look at before saying so, and why?
  4. Describe a situation in which two variables are closely related but r is near 0.
  5. Using the four boxes about the center of a cloud, explain why a cloud that falls from left to right has a negative r.
Answers
  1. Negative and strong. The cloud falls from left to right and keeps close to a straight line.
  2. Positive and weak. The cloud climbs a little, in a wide band; “weak” is a judgment, and some would say “little straight-line pattern”.
  3. Every point lies on one straight line that rises from left to right.
  4. r = -0.9. Strength is the size of r, its distance from 0, and 0.9 is larger than 0.6. The signs only give the directions.
  5. That something went wrong, such as a data entry or reading error. r always lies from -1 to 1, so 1.3 is impossible.
  6. r = 0.98. A climbs in the thinnest band, so it takes the value closest to 1.
  7. r = 0.19. B barely climbs and is loose, so it takes the small positive value.
  8. r = -0.72. C falls, but in a loose zigzag, so it takes the negative value further from -1.
  9. r = -0.95. D falls in a thin band, so it takes the negative value closest to -1.
  10. r = -0.98. Strong, negative and linear: towns farther from the coast tend to get less rain, and the points keep close to a straight line.
  11. r = 0.83. Positive and fairly strong: larger households tend to buy more milk, though the points zigzag about the trend.
  12. r = 0.96, but no. In each half second the height grows by 6.25, 3.75 and 1.25 m, less each time, so the points bend. A straight line passes close to four points on a gentle bend, which is why r is large.
  13. r = 0.00. The points lie on a U shape, falling to (4, 0) and rising again in step, so the pushes on r cancel exactly. The relationship is strong but curved, with no straight-line pattern.
  14. r is not a percentage or a share of points. r = 0.5 says only that the cloud climbs, in a band much wider than one with r near 1. It may have no point exactly on the line of best fit.
  15. No. r measures how closely the points cluster about a line, not how steep the line is. Two plots can have the same r and very different slopes, as in Example 6, and a flatter plot can have the larger r.
  16. No, not on its own. Look at the scatter plot, and better still a residual plot. A curve that bends gently can still give r near 1, as in Example 5; only the shape of the points shows whether a line is the right form.
  17. The height of a thrown ball over its whole flight: the time fixes the height exactly, yet the points rise and then fall in a symmetric arch, so r is 0, as in Example 4.
  18. In a falling cloud, points with x above its mean tend to have y below its mean, and points with x below its mean tend to have y above. So most points sit in the top-left and bottom-right boxes, which push r down, and few sit in the boxes that push it up. The total push is downward, so r < 0.
kg1128 · updated 2026-10-10 · CC-BY-SA-4.0