College Statistics • Descriptive Statistics

Correlation

Quantifying the strength and direction of linear relationships between two variables.

College Statistics subject emblem with a scatter plot, summation notation, and frequency columns.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

Long before statisticians had formal tools for quantifying relationships between variables, scientists and social researchers grappled with an intuitive question: when one measurement increases, does another tend to increase or decrease alongside it? The need to answer this question rigorously—moving beyond scatterplot inspection and subjective judgment—drove the development of correlation as a mathematical concept. The story of correlation is inseparable from the broader history of statistical reasoning, emerging from the interplay of hereditary biology, astronomy, and the nascent social sciences during the nineteenth century.

1846 • Auguste Bravais and Early Bivariate Analysis

French physicist Auguste Bravais published work on the analysis of errors in two-dimensional measurements, laying mathematical groundwork for bivariate distributions and the concept of co-variation between paired observations.

1888 • Galton Introduces 'Co-relation'

Sir Francis Galton coined the term 'co-relation' while studying the relationship between parents' and children's heights. His work on regression toward the mean established the conceptual foundation for modern correlation analysis.

1896 • Pearson's Product-Moment Coefficient

Karl Pearson formalized Galton's ideas into the product-moment correlation coefficient r, providing a rigorous mathematical formula that remains the most widely used measure of linear association today.

1904 • Spearman's Rank Correlation

Charles Spearman introduced a rank-based correlation coefficient (ρₛ) that could handle ordinal data and was more robust to outliers, broadening the applicability of correlation analysis beyond interval-ratio scales.

1938 • Kendall's Tau

Maurice Kendall proposed an alternative rank correlation measure (τ) based on concordant and discordant pairs, offering a more interpretable probability-based metric and expanding the toolkit for nonparametric association.

The central question that correlation addresses remains as relevant today as it was in Galton's era: given two quantitative variables measured on the same set of observations, how can we produce a single, unitless number that captures both the direction and strength of their linear relationship? Understanding correlation is prerequisite to regression analysis, multivariate modeling, and virtually every branch of inferential statistics.

SECTION 2

Core Principles & Definitions

Before diving into formulas, it is essential to establish the conceptual pillars that underpin correlation. These principles clarify what the correlation coefficient measures, what it does not measure, and the assumptions that govern its valid interpretation. A firm grasp of these ideas prevents the most common statistical misconceptions, particularly the conflation of association with causation.

1

Direction of Association

A positive correlation means both variables tend to increase together; a negative correlation means one tends to decrease as the other increases. The sign of r encodes this direction.
2

Strength of Association

The magnitude |r| quantifies how tightly data points cluster around a linear trend. Values near 1 indicate a strong linear relationship; values near 0 suggest little or no linear pattern.
3

Linearity Assumption

Pearson's r specifically measures linear association. A perfect curvilinear relationship (e.g., quadratic) can yield r ≈ 0, masking a strong but non-linear pattern in the data.
4

Unitless & Bounded

Because both variables are standardized (converted to z-scores) in its derivation, r is dimensionless and always falls within the interval [−1, +1], making comparisons across different measurement scales possible.
5

Correlation ≠ Causation

A high correlation between X and Y does not imply that X causes Y. Confounding variables, reverse causality, or coincidental trends can all produce strong correlations without any causal mechanism.
✦

KEY TAKEAWAY

Think of correlation as a weather vane combined with a tightness gauge. The weather vane tells you the direction of the relationship—positive or negative—while the gauge tells you the strength of the linear trend, from a perfectly loose scattercloud (r = 0) to a perfectly tight line (|r| = 1). Just as a weather vane does not tell you why the wind blows from a certain direction, a correlation coefficient does not tell you why two variables move together.

SECTION 3

Visualizing Correlation

Scatterplots are the primary visual tool for assessing correlation. The pattern formed by data points in a scatterplot reveals both the direction and strength of a linear relationship. The following diagram displays six canonical scatterplot configurations, each annotated with its approximate Pearson correlation coefficient, illustrating how the value of r corresponds to the visual spread and slope of the data cloud.

Scatterplot Patterns and Correlation Coefficientsr = +1.0Perfect Positiver ≈ +0.85Strong Positiver ≈ +0.40Weak Positiver ≈ 0No Linear Correlationr ≈ −0.75Strong Negativer = −1.0Perfect Negative
Six scatterplots illustrate the full spectrum of Pearson's r. The top row shows positive correlations from perfect (r = +1.0) to weak (r ≈ +0.40). The bottom row depicts no linear correlation (r ≈ 0), strong negative (r ≈ −0.75), and perfect negative (r = −1.0). Dashed trend lines indicate the best-fit direction.

Several patterns emerge from these plots. When r = ±1, every data point lies exactly on the trend line, forming a perfect linear relationship. As |r| decreases, the scatter cloud widens, and the data points deviate more from the line. At r ≈ 0, the cloud becomes roughly circular or randomly dispersed, indicating no linear trend—though a non-linear relationship may still exist. Notice how the sign determines the slope direction: positive r corresponds to an upward-sloping trend line, while negative r corresponds to a downward slope. These visual intuitions are indispensable when interpreting computed correlation values in practice.

SECTION 4

Mathematical Framework

The Pearson product-moment correlation coefficient can be derived from the concept of standardized covariance. Covariance measures the joint variability of two variables, but its magnitude depends on the units of measurement. Dividing by the product of the two standard deviations standardizes this measure to the interval [−1, +1], producing the familiar correlation coefficient r.

COVARIANCE

Cov(X,Y)=(1/(n−1))×Σi(xi−xˉ)(yi−yˉ)Cov(X, Y) = (1 / (n − 1)) × Σᵢ (xᵢ − x̄)(yᵢ − ȳ)

Where n is the number of paired observations, xᵢ and yᵢ are individual data values, and x̄ and ȳ are the sample means. Covariance is positive when X and Y tend to deviate from their means in the same direction, and negative when they deviate in opposite directions.

PEARSON CORRELATION COEFFICIENT

r=Cov(X,Y)/(sx×sγ)=[Σi(xi−xˉ)(yi−yˉ)]/√[Σi(xi−xˉ)2×Σi(yi−yˉ)2]r = Cov(X, Y) / (sₓ × sᵧ) = [Σᵢ (xᵢ − x̄)(yᵢ − ȳ)] / √[Σᵢ (xᵢ − x̄)² × Σᵢ (yᵢ − ȳ)²]

Here sₓ and sᵧ are the sample standard deviations of X and Y respectively. The denominator ensures r is unitless and bounded between −1 and +1. This form is equivalent to computing the average product of the z-scores of X and Y: r = (1/(n−1)) × Σᵢ zₓᵢ × zᵧᵢ.

Z-SCORE FORMULATION

r=(1/(n−1))×Σi[(xi−xˉ)/sx]×[(yi−yˉ)/sγ]r = (1 / (n − 1)) × Σᵢ [(xᵢ − x̄) / sₓ] × [(yᵢ − ȳ) / sᵧ]

This equivalent form makes the standardization explicit: each observation is converted to a z-score before the products are averaged. When both z-scores are positive or both negative (same side of their respective means), the product is positive, contributing to a positive r. When they have opposite signs, the product is negative.

COEFFICIENT OF DETERMINATION

r2=(explainedvariation)/(totalvariation)r² = (explained variation) / (total variation)

The square of the correlation coefficient, r², represents the proportion of variance in Y that is linearly accounted for by X. For example, if r = 0.80, then r² = 0.64, meaning 64% of the variability in Y is explained by its linear relationship with X.

💡

Computational Shortcut

An algebraically equivalent formula avoids computing means explicitly: r = [n × Σxᵢyᵢ − (Σxᵢ)(Σyᵢ)] / √{[n × Σxᵢ² − (Σxᵢ)²] × [n × Σyᵢ² − (Σyᵢ)²]}. This computational form is convenient for hand calculations but is numerically less stable than the definitional formula for very large datasets.

SECTION 5

Types of Correlation & Interpretation Guidelines

While Pearson's r is the most commonly used correlation measure, it is not the only one. The choice of correlation coefficient depends on the data's measurement scale, distribution, and the type of association being investigated. Additionally, interpreting the magnitude of r requires guidelines that account for the research context. A correlation of 0.30 might be considered weak in engineering but substantial in behavioral science.

Interpreting Correlation Strength−1.0−0.50+0.5+1.0Strong −Moderate −Weak / NoneModerate +Strong +Correlation Measures ComparisonMeasureData TypeKey PropertyRangePearson's rInterval / RatioMeasures linear association[−1, +1]Spearman's ρₛOrdinal or non-normalMeasures monotonic association[−1, +1]Kendall's τOrdinal / small nConcordance probability[−1, +1]Point-Biserial rBinary + ContinuousSpecial case of Pearson's r[−1, +1]Cohen's Guidelines (1988):|r| = 0.10 → Small|r| = 0.30 → Medium|r| = 0.50 → LargeNote: These are field-dependent conventions, not rigid thresholds.
The gradient bar at top shows how r values map to interpretive labels (strong, moderate, weak). Below, four common correlation measures are compared by data type, key property, and range. Cohen's effect-size guidelines provide a general benchmark for interpreting magnitude.

When data satisfy the assumptions of normality, linearity, and homoscedasticity, Pearson's r is the most efficient estimator of linear association. When these assumptions are violated—particularly with ordinal data, heavy-tailed distributions, or outliers—Spearman's rank correlation provides a robust alternative by operating on ranks rather than raw values. Kendall's tau is particularly useful with small sample sizes and has a direct probabilistic interpretation: it equals the difference between the probability of concordance and the probability of discordance among all possible pairs of observations.

SECTION 6

Worked Example

Suppose a researcher collects data on study hours (X) and exam scores (Y) for five students. We will compute the Pearson correlation coefficient step by step using the definitional formula.

StudentX (Hours)Y (Score)
A265
B473
C680
D888
E1094

Study hours vs. exam scores for five students

Computing Pearson's r

  1. 1

    Step 1 — Compute Sample Means

    Sum the X values: 2 + 4 + 6 + 8 + 10 = 30. Thus x̄ = 30 / 5 = 6. Sum the Y values: 65 + 73 + 80 + 88 + 94 = 400. Thus ȳ = 400 / 5 = 80.
    x̄ = 6, ȳ = 80
  2. 2

    Step 2 — Compute Deviations and Products

    For each student, compute (xᵢ − x̄), (yᵢ − ȳ), and their product: Student A: (2−6)(65−80) = (−4)(−15) = 60. Student B: (4−6)(73−80) = (−2)(−7) = 14. Student C: (6−6)(80−80) = (0)(0) = 0. Student D: (8−6)(88−80) = (2)(8) = 16. Student E: (10−6)(94−80) = (4)(14) = 56.
    Σ(xᵢ − x̄)(yᵢ − ȳ) = 60 + 14 + 0 + 16 + 56 = 146
  3. 3

    Step 3 — Compute Sum of Squared Deviations

    For X: (−4)² + (−2)² + 0² + 2² + 4² = 16 + 4 + 0 + 4 + 16 = 40. For Y: (−15)² + (−7)² + 0² + 8² + 14² = 225 + 49 + 0 + 64 + 196 = 534.
    Σ(xᵢ − x̄)² = 40, Σ(yᵢ − ȳ)² = 534
  4. 4

    Step 4 — Apply the Pearson Formula

    r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²] = 146 / √(40 × 534) = 146 / √21360 = 146 / 146.15 ≈ 0.999.
    r ≈ 0.999 — a near-perfect positive linear correlation
  5. 5

    Step 5 — Interpret the Result

    With r ≈ 0.999, the data exhibit an almost perfectly linear positive relationship: as study hours increase, exam scores increase proportionally. The coefficient of determination r² ≈ 0.998 indicates that approximately 99.8% of the variance in exam scores is linearly associated with study hours in this sample. However, this is an observational result from five students and does not establish a causal relationship.
    r² ≈ 0.998 — 99.8% of variance explained

SECTION 7

Strengths & Limitations

Pearson's r is an extraordinarily useful descriptive statistic, but its proper application depends on an awareness of both its strengths and its limitations. Misapplication of correlation analysis is one of the most common sources of error in empirical research across the social sciences, medicine, and business.

StrengthsLimitations
Provides a single, interpretable number summarizing the strength and direction of a linear relationship.Captures only linear relationships; a strong curvilinear association can produce r ≈ 0.
Unitless and bounded [−1, +1], enabling comparison across different variable pairs and scales.Highly sensitive to outliers; a single extreme observation can dramatically inflate or deflate r.
Easily computed and widely understood across disciplines, making it a universal descriptive tool.Restricted range (truncated data) artificially attenuates the observed correlation, underestimating the true association.
r² provides a direct measure of shared variance, offering practical effect-size interpretation.Assumes both variables are measured at the interval or ratio level; inappropriate for purely ordinal data.
Serves as the foundation for linear regression, factor analysis, and structural equation modeling.Correlation does not imply causation; confounders, mediators, and spurious associations are not detected by r alone.

Strengths and limitations of Pearson's correlation coefficient

✦

KEY TAKEAWAY

Correlation is like a metal detector on a beach: it reliably signals when something metallic is beneath the sand (a linear pattern exists), but it cannot tell you whether you have found a gold coin or a bottle cap (whether the relationship is causal, confounded, or coincidental). Always complement correlation with scatterplot inspection, domain knowledge, and—when feasible—controlled experimental designs.

SECTION 8

Connection to Regression & Advanced Methods

Correlation is the gateway to a large family of inferential and predictive techniques. Understanding how the correlation coefficient relates to linear regression, partial correlation, and multiple regression provides a roadmap for the analytic tools encountered in subsequent coursework. The transition from descriptive correlation to predictive modeling represents one of the most important conceptual leaps in statistics.

ConceptDescriptive CorrelationAdvanced Extension
PurposeSummarize strength and direction of linear association between two variables.Simple linear regression uses r to build a predictive equation: ŷ = b₀ + b₁x, where b₁ = r × (sᵧ/sₓ).
Number of VariablesBivariate: one X, one Y.Multiple regression accommodates multiple predictors; the multiple correlation R extends r to higher dimensions.
Controlling ConfoundersNot addressed; raw bivariate association may be spurious.Partial correlation (rₓᵧ.z) removes the influence of a third variable Z, isolating the unique association.
InferenceDescriptive only; no hypothesis testing or confidence intervals.t-test for r, Fisher's z-transformation for comparing correlations, and confidence intervals for ρ.
Non-linearityPearson's r misses curvilinear patterns.Polynomial regression and nonparametric smoothing (LOESS) capture non-linear trends.

From descriptive correlation to advanced modeling

The key bridge between correlation and regression is the slope of the least-squares line: b₁ = r × (sᵧ / sₓ). This elegant relationship shows that the regression slope is simply the correlation coefficient rescaled by the ratio of standard deviations. When both variables are standardized, the regression slope equals r exactly—the standardized regression coefficient (beta weight) in simple linear regression is numerically identical to Pearson's r. As you progress to multiple regression and structural equation modeling, this foundational connection will recur in increasingly sophisticated forms.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A researcher computes r = −0.02 between shoe size and GPA for a sample of 500 college students. She concludes that shoe size and GPA are completely unrelated. Is her conclusion justified? Explain what r ≈ 0 does and does not tell us.
Show answer
Her conclusion is partially justified but overstated. A Pearson's r ≈ 0 indicates the absence of a linear relationship between the two variables, but it does not rule out a non-linear association. The researcher should inspect the scatterplot for curvilinear patterns before concluding that the variables are 'completely unrelated.' In this case, it is quite plausible that shoe size and GPA have no meaningful association of any kind, but the correlation coefficient alone cannot establish this definitively—it can only confirm the absence of a linear trend.

Question 2: BASIC CALCULATION

Given Σ(xᵢ − x̄)(yᵢ − ȳ) = −84, Σ(xᵢ − x̄)² = 56, and Σ(yᵢ − ȳ)² = 200, compute the Pearson correlation coefficient r.
Show answer
Using the formula r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²], we substitute: r = −84 / √(56 × 200) = −84 / √11200 = −84 / 105.83 ≈ −0.794. This indicates a strong negative linear relationship between X and Y. Approximately r² = 0.630, meaning about 63% of the variance in Y is linearly associated with X.

Question 3: INTERMEDIATE

A dataset of n = 8 observations yields r = 0.72. Compute r² and interpret both values. If you were to add a single extreme outlier far from the existing trend, would you expect r to increase or decrease? Justify your reasoning.
Show answer
The coefficient of determination is r² = (0.72)² = 0.5184, meaning approximately 51.8% of the variance in Y can be linearly explained by X. The remaining 48.2% is attributable to other factors or random variation. Regarding the outlier: if it falls far from the existing positive trend (e.g., a high X with a low Y), it would pull the regression line and widen the scatter, decreasing |r|. Conversely, if the outlier falls along the trend (a high-leverage point reinforcing the pattern), it could artificially inflate r. With n = 8, a single observation carries substantial influence—roughly 12.5% weight—making the coefficient particularly sensitive to outliers in small samples.

Question 4: APPLIED

A public health researcher finds r = 0.62 between city-level per-capita ice cream consumption and drowning rates across 50 U.S. cities. She claims that ice cream consumption increases drowning risk. Critique this claim using concepts from the lesson. Identify a likely confounding variable and explain how partial correlation could address the issue.
Show answer
The claim confuses correlation with causation. The observed r = 0.62 indicates a moderately strong positive linear association, but it does not establish a causal mechanism. A likely confounding variable is ambient temperature: hot weather independently increases both ice cream consumption and swimming activity, which in turn increases drowning risk. The researcher could compute the partial correlation rₓᵧ.z, where Z represents average summer temperature. If the partial correlation drops substantially toward zero after controlling for temperature, it would suggest that the original association was largely spurious—driven by the confounding effect of heat. This example underscores why correlation analysis must always be accompanied by substantive domain reasoning.

Question 5: CRITICAL THINKING

Prove algebraically that Pearson's r is invariant under positive linear transformations of X and Y. That is, if X* = aX + b and Y* = cY + d where a, c > 0, show that r(X*, Y*) = r(X, Y). Then discuss why this property makes r more useful than covariance for comparing associations across different measurement scales.
Show answer
Under the transformation X* = aX + b, we have x̄* = ax̄ + b, so (xᵢ* − x̄*) = a(xᵢ − x̄). Similarly, (yᵢ* − ȳ*) = c(yᵢ − ȳ). The numerator of r becomes Σ a(xᵢ − x̄) × c(yᵢ − ȳ) = ac × Σ(xᵢ − x̄)(yᵢ − ȳ). The denominator becomes √[Σ a²(xᵢ − x̄)² × Σ c²(yᵢ − ȳ)²] = ac × √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²], since a, c > 0. Dividing, the ac factors cancel, yielding r(X*, Y*) = r(X, Y). This invariance property is precisely why r is superior to covariance for cross-study comparisons: covariance changes with the scale of measurement (e.g., meters vs. centimeters), while r remains the same. This allows researchers to compare the strength of associations across studies that may use different units, scales, or coding schemes—a fundamental requirement for meta-analysis.

SUMMARY

Lesson Summary

Summary

The Pearson correlation coefficient (r) quantifies the direction and strength of a linear relationship between two quantitative variables on a unitless scale from −1 to +1. It is computed as the ratio of the covariance of X and Y to the product of their standard deviations, or equivalently, as the average product of their z-scores. The squared correlation, r², gives the proportion of variance in one variable linearly explained by the other.

Critical caveats include that correlation does not imply causation, that r captures only linear patterns (missing curvilinear relationships), and that it is sensitive to outliers. Alternatives such as Spearman's ρ and Kendall's τ handle ordinal data and non-normal distributions. Mastery of correlation is foundational for advancing to linear regression, partial correlation, and multivariate modeling techniques.

Varsity Tutors • College Statistics • Correlation