Author-reviewedEvidence: highv1.0.1

Pearson Correlation

Pearson correlation is a -1 to +1 measure of linear association, the covariance over the product of standard deviations, as between costs and QALYs.

Status
Published, version 1.0.1
Last reviewed
27 Oct 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Pearson Correlation in Health Economic Data and Models

Pearson's product-moment coefficient, usually written rr, measures how closely two numerical quantities follow a straight line, for example a patient's costs in two consecutive years. In health economics it matters because the correlation between baseline and follow-up costs sets how much regression to the mean will flatter an uncontrolled evaluation, and the correlation between uncertain inputs shapes the spread of a probabilistic model. Rank-based alternatives and intervals are on the Correlation Coefficient page and correlated costs and effects on the Correlation page.

The product-moment formula and what it standardises

The coefficient is built from three sums of deviations from the means. The NIST Dataplot reference manual computes it this way, and Mukaka's guide for medical researchers gives the same sample formula.

r=SxySxx Syy,Sxy=∑i=1n(xi−xˉ)(yi−yˉ),Sxx=∑i=1n(xi−xˉ)2,Syy=∑i=1n(yi−yˉ)2r = \frac{S_{xy}}{\sqrt{S_{xx}\,S_{yy}}}, \qquad S_{xy} = \sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y}), \qquad S_{xx} = \sum_{i=1}^{n}(x_i - \bar{x})^2, \qquad S_{yy} = \sum_{i=1}^{n}(y_i - \bar{y})^2

where xix_i and yiy_i are the paired values for patient or unit ii, xˉ\bar{x} and yˉ\bar{y} are the sample means, nn is the number of pairs, SxyS_{xy} is the sum of cross-products of deviations and SxxS_{xx} and SyyS_{yy} are the sums of squared deviations. Dividing each sum by n−1n - 1 turns rr into the sample covariance divided by the product of the two sample standard deviations.

Karl Pearson's 1896 memoir on regression and heredity likened the sum of products of deviations to the product-moment of dynamics and showed that, for normally correlated characteristics, S(xy)/(nσ1σ2)S(xy)/(n\sigma_1\sigma_2), with xx and yy as deviations and σ\sigma using divisor nn, is the most probable value of the coefficient. Mukaka describes the coefficient as dimensionless and lying between minus 1 and plus 1, so a change of currency unit leaves it unchanged. A nonlinear change of scale, such as taking logarithms of skewed costs, does change it, as the worked example shows.

Pearson correlation and the regression line

Correlation and simple linear regression use the same three sums. Bewick and colleagues distinguish them, with correlation quantifying the strength of the linear relationship and regression expressing it as an equation. The least squares slope of yy on xx is Sxy/SxxS_{xy}/S_{xx}, which can be rewritten in terms of rr.

by∣x=r sysx,r2=by∣x bx∣yb_{y \mid x} = r\,\frac{s_y}{s_x}, \qquad r^2 = b_{y \mid x}\, b_{x \mid y}

where by∣xb_{y \mid x} is the slope for predicting yy from xx, bx∣y=Sxy/Syyb_{x \mid y} = S_{xy}/S_{yy} is the slope for predicting xx from yy, and sxs_x and sys_y are the sample standard deviations. The coefficient is symmetric in the two variables, while the two regression lines differ unless the points lie exactly on a line. Bewick and colleagues add that with one predictor the coefficient of determination equals r2r^2, the proportion of the total variation in yy accounted for by the regression.

The slope formula has a direct consequence. In standard deviation units the predicted value of yy is rr times the standardised value of xx, so unless ∣r∣=1|r| = 1 no prediction lies further from the mean than the value it was predicted from. This is the regression of Pearson's title, first described by Galton for the heights of parents and children, and it matters whenever patients are selected on an extreme baseline.

Regression to the mean in evaluations of high-cost patients

Case management schemes often enrol people with recent emergency admissions, and Roland and colleagues note that such programmes are sometimes judged only by the fall in admissions in the enrolled cohort, with no control group. For normally distributed data Linden gives the expected effect from the population mean μ\mu, standard deviation σ\sigma, pre-post correlation ρ\rho and the cut-off κ\kappa that defines the high-risk group.

z=κ−μσ,C=ϕ(z)1−Φ(z),RTM effect=C σ (1−ρ)z = \frac{\kappa - \mu}{\sigma}, \qquad C = \frac{\phi(z)}{1 - \Phi(z)}, \qquad \text{RTM effect} = C\,\sigma\,(1 - \rho)

where zz is the standardised cut-off, ϕ\phi and Φ\Phi are the standard normal density and distribution functions, CC is the mean standardised baseline value of those above the cut-off, and ρ\rho is the correlation between the baseline and follow-up measurements. Linden gives the expected baseline mean of the selected group as μ+Cσ\mu + C\sigma and its expected follow-up mean as μ+Cσρ\mu + C\sigma\rho, so the gap shrinks to zero only when ρ=1\rho = 1. In the same framework the between-patient variance is ρσ2\rho\sigma^2, which makes the pre-post correlation the share of total variance that is stable between patients, the quantity a test-retest reliability study estimates.

The effect is large in real data. In a cohort of chronically ill health plan members shown by Linden, with no intervention in place, the highest cost quintile averaged roughly USD 20,000 to USD 27,000 across three conditions in the first year and USD 7,000 to USD 10,000 in the second. In English hospital episode statistics, Roland and colleagues followed people aged 65 and over with at least two emergency admissions in 1997-8. Their emergency admissions per head of the original cohort, counting deaths, fell from 2.568 in the index year to 0.641 the next year and 0.194 in 2002-3, which the authors put down to mortality as well as regression toward the mean, and the group, which accounted for 38% of admissions in the index year, accounted for under 10% the next year. The authors concluded that comparison with a matched control group is necessary, which points to designs such as difference-in-differences in place of a simple before-and-after study.

Worked example with two years of patient costs

All numbers are illustrative. Six patients in a cost study have annual costs, in GBP 1,000s, recorded in two consecutive years.

PatientYear 1 costYear 2 costYear 1 deviationYear 2 deviationCross-product
112-3-1.54.5
221-2-2.55.0
334-10.5-0.5
4430-0.50.0
55511.51.5
69652.512.5

1. Means and sums. The year 1 mean is 24/6 = 4 and the year 2 mean is 21/6 = 3.5. The squared year 1 deviations give SxxS_{xx} = 9 + 4 + 1 + 0 + 1 + 25 = 40, the squared year 2 deviations give SyyS_{yy} = 2.25 + 6.25 + 0.25 + 0.25 + 2.25 + 6.25 = 17.5, and the cross-products give SxyS_{xy} = 4.5 + 5.0 − 0.5 + 0 + 1.5 + 12.5 = 23.

2. The coefficient. The product 40 × 17.5 = 700 has square root 26.458, so rr = 23 / 26.458 = 0.869. Equivalently, the sample covariance is 23/5 = 4.6, the standard deviations are 2.828 and 1.871 (the square roots of 40/5 and 17.5/5), and 4.6 / (2.828 × 1.871) = 0.869.

3. Slopes and explained variation. The slope of year 2 on year 1 is 23/40 = 0.575, the same as 0.869 × 1.871/2.828. The reverse slope is 23/17.5 = 1.314, and 0.575 × 1.314 = 0.756, which is r2r^2. Year 1 cost accounts for about 76% of the variation in year 2 cost.

4. Regression to the mean for the costliest patient. Patient 6 cost GBP 9,000 in year 1, which is 5/2.828 = 1.77 standard deviations above the mean. The fitted line predicts 3.5 + 0.575 × 5 = 6.375, or GBP 6,375, which is 0.869 × 1.77 = 1.54 standard deviations above the year 2 mean. Patient 6 actually cost GBP 6,000, a fall of GBP 3,000 with no intervention at all.

5. A change of scale. Taking natural logarithms of both years' costs and repeating steps 1 and 2 gives rr = 0.759. Converting pounds to pence would have left 0.869 unchanged.

6. A cohort selected on high cost. Suppose a large historical cohort has mean annual cost GBP 3,000, standard deviation GBP 2,000 and a year-to-year correlation of 0.5, and a programme enrols everyone above GBP 7,000. Then zz = (7,000 − 3,000)/2,000 = 2, the normal density at 2 is 0.05399, the probability above 2 is 0.02275, and their ratio gives CC = 2.373. The expected baseline mean of those enrolled is 3,000 + 2.373 × 2,000 = GBP 7,746 and the expected follow-up mean is 3,000 + 2.373 × 2,000 × 0.5 = GBP 5,373, an apparent saving of GBP 2,373 per patient, or 31%, with no effect at all. With a correlation of 0.8 the follow-up mean is GBP 6,797 and the artefact shrinks to GBP 949, or 12%.

7. Interpretation. A high Pearson correlation between years still leaves room for a large fall among the patients selected for being extreme, and the size of that fall is proportional to one minus the correlation. A normal model with these figures places about 7% of patients below zero cost, and Linden found that with skewed data the normal formula underestimated the true effect, so for real costs it is a rough lower guide.

Assumptions behind the test and the interval

The NIST manual tests whether the correlation differs from zero with an F statistic on 1 and n−2n - 2 degrees of freedom. Bewick and colleagues state that the test needs the same assumptions as regression, while interpreting a confidence interval for the correlation requires both variables to be Normally distributed. Mukaka calls Pearson's coefficient inappropriate when either variable is not normally distributed, because extreme values can exaggerate or dampen it, and recommends Spearman's coefficient for skewed or ordinal data, a description that often fits patient-level costs.

Pearson correlation in decision models

In a cost-effectiveness model the coefficient describes how uncertain inputs move together across simulations, and the NICE technology appraisal manual (PMG36, section 4.7.19) asks for evidence on the extent of correlation between individual parameters to be considered and reflected in the probabilistic analysis, with the assumptions clearly presented. Section 4.7.23 adds that threshold analysis is not suitable for parameters that are highly correlated with other influential parameters.

Correlation coefficients between parameters form a correlation matrix that is used to generate correlated normal draws for probabilistic sensitivity analysis. A Pearson correlation set on that normal scale generally changes once the draws are transformed into skewed distributions, as taking logarithms changed rr in step 5, so a model should state the scale it uses.

Boundaries with neighbouring measures

Several neighbouring measures answer different questions. Spearman's coefficient and Kendall's tau work on ranks and capture monotonic association. The partial correlation removes the linear influence of a third variable. For agreement between two ways of measuring the same quantity, such as self-reported and record-based resource use, Bewick and colleagues warn that a high correlation can be wrongly taken as agreement and recommend analysing paired differences as Bland and Altman proposed, while the intraclass correlation handles reliability.

Misreadings in health economic analyses

Most errors with Pearson's coefficient come from reading the number without the scatter plot or without knowing how the sample was chosen. The following recur in cost and outcome analyses.

  1. Pooling groups or restricting the range. Bewick and colleagues note that subgroups such as men and women, or a single outlier, can inflate the coefficient, and that restricting one variable to a certain range may lead to an invalid estimate, so a correlation among high-cost patients only describes that group.
  2. Treating blanks as zeros, or zeros as blanks. Microsoft's documentation for PEARSON states that empty cells are ignored while cells containing zero are included, so a missing cost recorded as 0 changes the result.

Sources

Library

Publications

1
  • Book

    Bayesian Methods in Health Economics — Gianluca Baio, 1st Edition ed., 2012 (Chapman & Hall / CRC Press)

    An overview of Bayesian statistical methods for the analysis of health economic data, covering economic evaluation concepts, statistical cost-effectiveness analysis, Bayesian computation and MCMC, and applied health economic evaluation.

Frequently Asked Questions (6)

  • What is the Pearson correlation?

    Pearson correlation is a -1 to +1 measure of linear association, the covariance over the product of standard deviations, as between costs and QALYs.

    Source: Pearson 1896

  • What relationship does the Pearson correlation measure?

    Pearson's coefficient measures linear association, meaning how closely paired values of two numerical quantities, such as a patient's costs in two consecutive years, fall along a straight line. Its sign gives the direction of the association and its size gives the strength, from minus 1 for a perfect negative line through 0 to plus 1 for a perfect positive line. Because the coefficient is dimensionless, a change of currency unit leaves it unchanged. A nonlinear change of scale, such as taking logarithms of skewed costs, does alter it, since the relationship is then judged against a straight line on the new scale.

    Source: Mukaka 2012

  • How is the Pearson correlation calculated?

    The calculation starts from the deviation of each paired value from its sample mean. The sum of the cross-products of those deviations is divided by the square root of the product of the two sums of squared deviations. Dividing each sum by the number of pairs minus one leaves the value unchanged and shows it to be the sample covariance divided by the product of the two sample standard deviations. For six patients whose annual costs in two years give a cross-product sum of 23 and squared-deviation sums of 40 and 17.5, the coefficient is 23 divided by the square root of 700, or 0.869.

    Source: Mukaka 2012

  • What are the assumptions of the Pearson correlation?

    The Pearson correlation assumes that the relationship between the two variables is linear, which a scatter diagram of the data checks first. Testing whether the coefficient differs from zero needs the same assumptions as linear regression, and a confidence interval for the coefficient can be interpreted only when both variables are Normally distributed. A sample made up of distinct subgroups, or one containing a single outlier, can inflate the coefficient, and restricting one variable to a set range can give an invalid estimate.

    Source: Bewick et al. 2003

  • How is the Pearson correlation interpreted?

    The sign of the Pearson correlation shows whether the two variables rise together or move in opposite directions, and the closer its value lies to minus 1 or plus 1, the closer the points lie to a straight line. With a single predictor, its square equals the coefficient of determination, so a coefficient of 0.869 between two years of patient costs means that year 1 cost accounts for about 76% of the variation in year 2 cost. A high coefficient does not by itself show that two ways of measuring the same quantity agree, and for that question Bewick and colleagues recommend analysing the paired differences.

    Source: Bewick et al. 2003

  • How does the Pearson correlation differ from rank correlations?

    The Pearson correlation works on the observed values and measures linear association, while rank correlations such as Spearman's coefficient and Kendall's tau replace each value by its rank and capture monotonic association. Using the actual magnitudes makes Pearson's coefficient sensitive to extreme values, which can exaggerate or dampen it, whereas Spearman's coefficient is more robust to outliers. For that reason Pearson's measure suits variables that are approximately normally distributed, and Spearman's coefficient is recommended when one or both variables are skewed or ordinal. Patient-level costs are often strongly skewed, so a rank coefficient is frequently the more appropriate choice for them.

    Source: Mukaka 2012

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 27 Oct 2026

Content version: 1.0.1

Canonical Identity

Term code
HE-ES-SA-155

Stable URI · Machine-readable · Resolvable · CC BY 4.0