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.
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
The Regression Model Formally
The simple linear regression model states:
This single expression actually encodes all four LINE assumptions:
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} \)).
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.
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.
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.
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
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:
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.
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.
What If Assumptions Fail?
Common Mistakes
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?