
Correlation Coefficient: Why Zero Can Hide a Pattern
A correlation coefficient measures the direction and strength of an association between two variables. Pearson’s r, the most common version, summarizes a straight-line relationship on a scale from −1 to +1. The puzzle is that a value of zero can still describe two measurements linked by an exact rule.
In This Article
- What Does the Number Tell You?
- How Is It Calculated?
- A Worked Example With Four Pairs
- Which Measure Fits Your Data?
- How Do You Calculate It in a Spreadsheet?
- What Can Make the Result Misleading?
- What Is Required for Statistical Inference?
- Key Takeaways
- Frequently Asked Questions
- Read the Pattern Behind r
What Does the Number Tell You?
Height and weight illustrate a positive association: taller people tend to weigh more. Speed and journey time over a fixed distance illustrate a negative association: greater speed means less time. The sign tells you which way the measurements move together, not whether the relationship is desirable.
Strength is a separate question. Values of +1 and −1 mean the points lie exactly on a straight line; zero means no linear association. Calling Pearson’s r a linear correlation coefficient matters because a curved pattern can escape that summary.
The sample result is written r; the population correlation it estimates is written ρ. Neither has measurement units. A sample gives you an observed pattern, while the population parameter describes the relationship you want to understand beyond those observations.
How Is It Calculated?
Think of a scatterplot with a vertical line through the mean of x and a horizontal line through the mean of y. Points above both means or below both means support a positive association. Points above one mean but below the other pull toward a negative result. Multiplying each pair’s deviations captures that distinction.
For n pairs $(x_i,y_i)$, with means $\bar{x}$ and $\bar{y}$, Pearson’s formula is:
$$ r=\frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\left[\sum_{i=1}^{n}(x_i-\bar{x})^2\right]\left[\sum_{i=1}^{n}(y_i-\bar{y})^2\right]}} $$
The numerator totals those signed products. The denominator scales the total by the variation in both variables, keeping the result within its bounds. Equivalently, divide sample covariance by the product of the sample standard deviations: the factors involving n − 1 cancel. If either standard deviation is zero, the denominator is zero and r is undefined.
A Worked Example With Four Pairs
Suppose the observations are (1, 2), (2, 1), (3, 4), and (4, 3). These invented data keep the arithmetic visible. Each pair belongs together; independently sorting one variable would answer a different question.
Both means are 2.5. The deviations are:
- For x: −1.5, −0.5, 0.5, 1.5.
- For y: −0.5, −1.5, 1.5, 0.5.
The corresponding products are all 0.75, so their sum is 3. Each variable’s squared deviations add to 5:
$$ r=\frac{3}{\sqrt{5\times5}}=0.60 $$
All four products are positive, but their total is smaller than the denominator: the points move together without falling on one line. Whether 0.60 deserves the label strong correlation depends on the field and purpose. Four observations establish this sample result, not a precise estimate of the population relationship.
Which Measure Fits Your Data?
Suppose an analyst codes preferred brands as 1, 2, and 3, then calculates Pearson’s r against spending. Changing which brand receives which number can change the answer without changing anyone’s purchases. The numbers supplied an ordering the brands never had.
That mistake starts before the formula. Pearson’s r uses numerical distances; Spearman’s rho applies Pearson’s calculation to ranks, describing monotonic movement even along a curve. Spearman’s name does not refer to the population Pearson parameter ρ. Kendall’s tau compares agreement and disagreement in pair ordering; tau-b handles ties, making it useful for ordered categories.
The table also covers binary and unordered data, where choosing the measurement type comes first.
| Correlation coefficient | Best for: data types | Association measured | Pros | Cons / cautions |
|---|---|---|---|---|
| Pearson’s r | Two numeric variables; e.g., height and weight | Linear; −1 to +1 | Uses actual numeric distances; familiar effect-size scale | Sensitive to outliers; r ≈ 0 can hide a strong curved relationship |
| Spearman’s rho (ρ) | Two ordinal or numeric variables; e.g., satisfaction rank and spending | Monotonic; −1 to +1 | Captures increasing or decreasing curved patterns using ranks | Discards numeric distances; ties need average ranks; misses non-monotonic patterns |
| Kendall’s tau-b (τb) | Two ordinal variables, especially with ties; e.g., two 5-point ratings | Rank concordance; −1 to +1 | Adjusts for tied pairs; compares agreement in ordering | Magnitude is not directly interchangeable with Pearson’s r or Spearman’s rho |
| Point-biserial r (rpb) | One binary variable and one numeric variable; e.g., treatment group and blood pressure | Binary–numeric association; −1 to +1 | Equivalent to Pearson’s r with binary coding of 0 and 1 | Reversing binary coding flips the sign; dichotomizing numeric data loses information |
| Phi (φ) | Two binary variables; e.g., smoking yes/no and disease yes/no | 2 × 2 table association; −1 to +1 | Equivalent to Pearson’s r for two 0/1 variables | Sign depends on coding; marginal proportions can restrict attainable magnitude |
| Cramér’s V | Two nominal variables; e.g., region and preferred brand | Categorical association strength; 0 to 1 | Handles contingency tables larger than 2 × 2; no ordering required | No positive or negative direction; small samples can inflate uncorrected V |
How Do You Calculate It in a Spreadsheet?
Excel and Google Sheets provide CORREL(range1, range2). Put the worked example’s x values in A2:A5 and y values in B2:B5, then enter =CORREL(A2:A5,B2:B5) to obtain 0.60.
Use equal-sized ranges with one pair per row, accounting for missing entries so the intended pairs stay aligned. Then make a scatterplot from those rows. The formula gives the answer to a linear question; the plot shows whether that was the right question.
What Can Make the Result Misleading?
For x values −2, −1, 0, 1, and 2, let y = x². Pearson’s r is zero, although x determines y exactly. The downward and upward parts cancel in the linear summary. A weak correlation can therefore conceal a fully predictable curve.
A distant point can instead dominate the summary because the calculation uses distances from the means. Investigate its origin before deciding whether it belongs. Restricting the range also changes what you can see: people of very similar heights reveal less about the height–weight relationship than a broader sample.
Even an unmistakable line cannot establish causation. Ice cream sales and heat-related illness can rise together because hot weather affects both. Separating a direct effect from a shared cause, or establishing which variable comes first, requires subject knowledge and an appropriate study design.
What Is Required for Statistical Inference?
The correlation coefficient r describes your sample; inference asks what it supports beyond that sample. Suppose two studies both find r = 0.25, one with 20 independent pairs and another with 200. Under the usual Pearson test assumptions, only the larger study’s result is statistically significant at the 5% level. The estimated strength is identical; the evidence against zero is not.
That test assumes independent observation pairs and bivariate normality. Independence applies between pairs, not between x and y within a pair. Repeated measurements on one person generally need a method that accounts for dependence. Merely calculating descriptive r does not require those testing assumptions, only suitable numerical pairs with nonzero variation.
For the null hypothesis of zero population correlation:
$$ t=r\sqrt{\frac{n-2}{1-r^2}} $$
Under the null and those assumptions, this follows a t distribution with n − 2 degrees of freedom. The p-value measures evidence against the null, not practical importance. Report the number of pairs and a 95% confidence interval alongside r; a wide interval exposes uncertainty that the point estimate alone hides.
Key Takeaways
- Choose the measure from the data type and relationship you want to describe.
- Read Pearson’s sign as direction and its absolute value as linear strength.
- Inspect the scatterplot for curves and influential points.
- Keep statistical evidence separate from practical importance and causation.
Frequently Asked Questions
Is r or r^2 the correlation coefficient?
The correlation coefficient is r. In ordinary least-squares regression with one predictor and an intercept, r² is the coefficient of determination: the proportion of sample response variation accounted for by the fitted line. Reporting only the square loses the direction.
Is a correlation coefficient of 0.25 strong?
A coefficient of 0.25 is usually called a weak positive linear association, though no universal strength scale applies. Its importance depends on the subject and consequences, and measurement quality affects the magnitude you can observe.
Does changing measurement units change Pearson’s r?
Ordinary unit conversions, such as meters to centimeters or Celsius to Fahrenheit, leave Pearson’s r unchanged. Adding a constant or multiplying by a positive constant preserves it; multiplying just one variable by a negative constant reverses its sign.
Can Pearson’s r be calculated when every value of one variable is identical?
No, Pearson’s r is undefined when either variable is constant. A spreadsheet error in this case does not mean the correlation is zero: there is no variation to standardize.
Can I average correlation coefficients from different studies?
A simple arithmetic average is generally not an appropriate pooled estimate. Meta-analyses commonly use Fisher’s z transformation, combine transformed values with suitable weights, and transform back. Pool only studies addressing sufficiently comparable relationships.
Read the Pattern Behind r
Before choosing a formula, finish this sentence: “I want this number to help me decide whether…” If the decision concerns whether two measurements follow a straight line, Pearson’s r fits. If it concerns ordering, the rank measures answer more directly. Unordered categories need a different choice, regardless of how their codes look in a spreadsheet.
That choice also sets the language of your report. The four-pair example supports “a positive sample association,” not “increasing x will increase y.” With only four observations, a confident population claim goes further still. Decide what action the result could reasonably support, then report enough about the observations and uncertainty for someone else to judge that action. A useful coefficient answers a defined question; it does not choose the question for you.
Recommended for you
Line Graph Scales: Why the Same Data Can Look Different
A line graph can exaggerate a modest change. Learn to check axes, read a five-month sales example and build clearer charts from your data. Explore the article.
Logarithmic Graph: Equal Ratios, Not Equal Differences
A logarithmic graph spaces 10–100 like 100–1,000. Separate log axes from log functions, read values, and plot curves with confidence. See how it works.
Inside a Violin Plot: Same Median, Different Shapes
A violin plot can reveal different bill patterns behind the same median. Learn how shape, points, and smoothing affect comparisons. See the restaurant example.
Infographic Resume: 3 Layouts That Keep Evidence Clear
An infographic resume puts experience first with subtle styling, a career timeline or achievement highlights. Compare three layouts to find your approach.
The Visual Language of Books: How Covers Communicate Complexity
At thumbnail size—often 100–160 pixels wide on retail grids—a cover must communicate genre, tone, and complexity before a reader can zoom in. The difference between a muddled thumbnail and a crisp focal point can determine whether a title gets a click, a pickup, or a pass. If you want a practical method for turning ideas […]
Visualizing Complexity: The Art of Making Networks Understandable
A 15,000-node protein interaction map and a 50,000-flight air-route map look like hairballs until the right questions, filters, and layouts pull structure from noise. Visualizing Complexity: The Art of Making Networks Understandable is not about drawing everything; it is about deciding what deserves ink, what must be computed first, and what the audience can actually […]
Stacked Bar Chart: Totals, Parts, and Shares Made Clear
A stacked bar chart shows totals and the parts behind them. Learn when to use counts or percentages, with a worked example and Excel steps. See the guide.
Venn Diagram: Why Club Rosters Can Count Students Twice
A Venn diagram explains how 18 art-club and 14 music-club members fit in a class of 30. Learn to read overlaps and avoid double counting. See how it works.
