01 / 21

Checking Regression
Assumptions

Learn to verify the four key assumptions behind linear regression: linearity, independence, normality, and equal variance, the foundation of trustworthy biostatistical inference.

Biostatistics

Why Do Assumptions Matter?

When we fit a linear regression model \( Y = \beta_0 + \beta_1 X + \varepsilon \), the math behind our \(p\)-values, confidence intervals, and predictions relies on specific conditions being true. If those conditions are violated, our conclusions can be misleading or wrong.

The L.I.N.E. Mnemonic

Linearity
The relationship between \(X\) and \(Y\) is a straight line
Independence
Residuals are independent of one another
Normality
Residuals follow a normal distribution
Equal Variance
Residual spread is constant across all \(X\)

The Regression Model Formally

The simple linear regression model states:

This single expression actually encodes all four LINE assumptions:

L
Linearity: the \( \beta_0 + \beta_1 X_i \) part assumes a straight-line mean
I
Independence: each \( \varepsilon_i \) is drawn independently
N
Normality: \( \varepsilon_i \sim N(\cdot) \) follows a normal distribution
E
Equal Variance: the single \( \sigma^2 \) is constant for all \( i \)

Linearity: Is the Relationship Straight?

The linearity assumption means that the true mean of \( Y \) at any value of \( X \) lies on a straight line. We check this with a residual plot: plot residuals \( e_i = Y_i - \hat{Y}_i \) against \(X\) (or \( \hat{Y} \)).

✓ Linear (random scatter) Fitted values Residuals ✕ Non-linear (curved pattern) Fitted values

Independence: No Hidden Connections

Independence means that the residual for one observation does not predict the residual for another. Violations are common in time-series data (e.g., patient measurements taken daily) where adjacent values tend to be similar.

✓ Independent Order (time) ✕ Autocorrelated Order (time)

Normality: Are Residuals Bell-Shaped?

The normality assumption requires that \( \varepsilon_i \sim N(0, \sigma^2) \). We check this using a histogram of residuals or a Normal Q-Q plot, which compares residual quantiles against theoretical normal quantiles.

Normal Q-Q Plot Theoretical Quantiles Sample Quantiles ✓ Normal

Equal Variance: Constant Spread

Also called homoscedasticity, this assumption requires that \( \text{Var}(\varepsilon_i) = \sigma^2 \) is the same for all values of \(X\). Its violation, heteroscedasticity, means the spread of residuals changes.

✓ Equal Variance Fitted values ✕ Fan-Shaped (unequal) Fitted values

Residuals vs. Errors

A subtle but important distinction: the assumptions are about the true errors \( \varepsilon_i \), which we never observe. We use residuals \( e_i \) as estimates.

Error \( \varepsilon_i \) Residual \( e_i \)
Definition \( Y_i - (\beta_0 + \beta_1 X_i) \) \( Y_i - (\hat{\beta}_0 + \hat{\beta}_1 X_i) \)
Known? No (theoretical) Yes (computed from data)
Parameters True \( \beta_0, \beta_1 \) Estimated \( \hat{\beta}_0, \hat{\beta}_1 \)
Role Assumptions apply here Used to check assumptions

How to Check Assumptions

1
Fit the model and compute residuals \( e_i = Y_i - \hat{Y}_i \).
2
Residual vs. Fitted plot: check for linearity (no curve) and equal variance (no fan).
3
Residual vs. Order plot: check for independence (no runs or waves).
4
Normal Q-Q plot or histogram: check for normality (points on diagonal line).
5
Report findings: state which assumptions hold and which may be violated, with evidence.

Example 1: Drug Dose vs. Response

A biostatistician models the effect of drug dose (\( X \), mg) on blood pressure reduction (\( Y \), mmHg). After fitting \( \hat{Y} = 2.1 + 0.85X \), she plots residuals vs. fitted values:

Fitted Values Residuals 0 0 ✓ Random scatter

Example 2: Age vs. Recovery Time

A researcher models age (\( X \)) vs. surgery recovery time (\( Y \), days). The residual plot reveals a clear fan shape: older patients show much more variable recovery times.

Fitted Values (Age) Residuals ✕ Fan shape

Example 3: Reading a Q-Q Plot

Below are two Q-Q plots from different studies. One shows approximately normal residuals, the other shows right-skewed residuals.

✓ Normal ✕ Right-skewed

What If Assumptions Fail?

Non-linearity
Add polynomial terms (\( X^2 \)), use a different model, or transform \(X\)
Dependence
Use time-series methods, add lagged variables, or use clustered standard errors
Non-normality
Transform \( Y \) (log, square root), use bootstrapping, or rely on large \(n\) (CLT)
Unequal Variance
Use weighted least squares, robust standard errors, or transform \(Y\)

Common Mistakes

✕ Checking \(Y\), not residuals
Normality applies to residuals, not the raw \( Y \) values. Always plot \( e_i \), not \( Y_i \).
✕ Only using scatterplots
A scatterplot of \(X\) vs. \(Y\) can look linear even when residuals show problems. Always make the residual plot.
✕ Ignoring study design
Independence cannot be verified by plots alone. Consider how data was collected (time-series? clustered?).

Summary: Assumption Checklist

Assumption Diagnostic Tool What to Look For Violation Sign
Linearity Resid. vs. Fitted Random scatter Curved pattern
Independence Resid. vs. Order No pattern Runs or waves
Normality Q-Q Plot / Histogram Points on line S-curve / skew
Equal Variance Resid. vs. Fitted Constant band Fan or cone

Question 1 of 5

A residual plot shows residuals randomly scattered around zero with no pattern. Which assumptions does this support?

Question 2 of 5

On a Normal Q-Q plot, the points curve above the reference line on the right side. What does this indicate?

Question 3 of 5

A researcher fits a regression using daily patient temperature readings over 30 consecutive days. Which assumption is most likely violated?

Question 4 of 5

A student checks normality by making a histogram of the raw \( Y \) values (not residuals) and concludes normality is satisfied. What is wrong?

Question 5 of 5

A residual vs. fitted values plot shows a clear funnel shape: residuals are tightly clustered for small fitted values and widely spread for large fitted values. Which assumption is violated, and what is a common remedy?