Skip to main content

Regression and Correlation Basics for Journalists

What regression shows, how to read the results, and the pitfalls that can make a compelling story misleading.

Last reviewed: Next review due:

What is regression?

Regression is a statistical method for quantifying the relationship between two or more variables. A simple linear regression asks: “As X increases by one unit, how much does Y change, on average?” For example: for each additional year of age (X), how much does council tax benefit claim rate (Y) increase?

Regression is useful for data journalism when you want to go beyond “these two things are related” and quantify how strongly they are related, and in which direction. But it does not prove causation, and the results are only as good as the data.

Before running a regression: plot a scatter chart of your two variables. If the relationship looks non-linear, curved, or clustered, a simple linear regression is not the right tool.

Reading regression output

# Python: simple regression with statsmodels
import pandas as pd
import statsmodels.formula.api as smf

df = pd.read_csv('la_data.csv')  # local authority data

# Regression: does deprivation predict GP waiting times?
model = smf.ols('gp_wait_days ~ deprivation_score', data=df).fit()
print(model.summary())

# Key output to read:
# coef (deprivation_score): 0.23  <- each 1-point rise in deprivation
#                                     associated with 0.23 extra wait days
# R-squared: 0.41                 <- deprivation explains 41% of variation
# P>|t|: 0.000                    <- statistically significant

Coefficient

The slope: how much Y changes for each 1-unit increase in X. Can be positive or negative.

R-squared

How much of the variation in Y is explained by X. 0 = none, 1 = all.

p-value

Probability the result occurred by chance. Below 0.05 is the conventional significance threshold.

When regression is useful in journalism

  • 1Testing whether a relationship holds up after controlling for other variables (multiple regression).
  • 2Quantifying the strength of a relationship to add rigour to a story that is already suggested by the data.
  • 3Predicting what a value should be and comparing it to what it actually is (residual analysis).
  • 4Identifying local authorities or institutions that are outliers after controlling for confounders.

Red flags

  • Claiming causation from a regression — regression shows association, not causation.
  • A high r-squared on a scatter plot with only 10&ndash;15 data points — unreliable with small samples.
  • Not checking for outliers that are driving the regression line.
  • Using a linear regression on a non-linear relationship — the model will be misleading.
  • Ignoring potential confounders — the story may be about the third variable, not the two you measured.

Regression reporting checklist

  • I have plotted a scatter chart before running the regression to check the relationship looks linear.
  • I have checked for outliers that may be driving the result.
  • I have reported r-squared alongside the coefficient.
  • I have not implied causation from the regression alone.
  • I have considered at least three potential confounding variables.
  • For complex regressions, I have had the methodology reviewed by a statistician.

When to consult a statistician

If your story rests on a regression finding, have it reviewed by a university statistics department or the Royal Statistical Society’s Journalist Fellows programme before publication.

Common mistakes

  • Treating the regression line as the whole story — show the scatter plot too so readers see how much variation remains.
  • Not mentioning the p-value or sample size when citing a regression coefficient.
  • Extrapolating a regression line far beyond the data range — the relationship may not hold.
  • Using ecological regression (data on areas) to draw conclusions about individuals — this is the ecological fallacy.

Related guides

Primary sources

Frequently asked questions

What is r-squared and what does it tell me?
R-squared (the coefficient of determination) measures how much of the variation in your outcome variable is explained by your predictor variable(s). It ranges from 0 to 1. An r-squared of 0.7 means 70% of the variation in y is explained by x. For journalism, a high r-squared tells you the relationship is strong, but it does not tell you why — and it does not prove causation.
Can I run a regression in Excel?
Yes. In Excel: Data > Data Analysis > Regression. You need the Analysis ToolPak add-in enabled (File > Options > Add-ins > Manage Excel Add-ins > tick Analysis ToolPak). Input your Y Range (outcome) and X Range (predictors), and Excel will produce a table with coefficients, r-squared, and p-values. For more complex regressions, use Python (statsmodels or scikit-learn) or R.
What is a confounding variable?
A confounding variable is a third variable that influences both your predictor and your outcome, creating the appearance of a relationship between them. For example: areas with more fast food outlets may have higher rates of heart disease. But both might be explained by deprivation — poorer areas have more fast food and worse health outcomes. Deprivation is the confounder. Always ask: 'Is there a third thing that could explain both?'