The five assumptions, ranked by what they cost

Today let's find out, with real numbers instead of a rule of thumb, which of the five assumptions behind an ordinary regression costs you the most when it breaks.

Northline Fitness runs 60 gyms. Each month its data team regresses a gym's revenue on its active-member count, to see how strongly more members actually brings in more revenue.

Here are all 60 gyms, active members against monthly revenue in thousands of dollars.

The 60 points climb left to right: gyms with more active members tend to bring in more revenue, and a straight line fits that cloud reasonably well.

But a straight line like this one rests on five assumptions working quietly behind the scenes:

  1. The true relationship really is a straight line (linearity).
  2. Each gym's error is independent of every other gym's error (independence).
  3. The spread of that error is the same size everywhere along the line (equal variance).
  4. The errors are shaped like a normal distribution (normal residuals).
  5. No single gym is carrying the whole fit on its own (no undue influence).

Keep this plot in mind. Over the next few steps, each of these five gets broken on purpose, one at a time, on these same 60 gyms, and the damage gets measured instead of guessed at.

What a confidence interval promises, and the number that tracks it

Put a number on that scatter first: create the 60 gyms, fit the line, and measure how strongly members and revenue move together.

RInteractive R
# Create Northline Fitness's 60 gyms and fit revenue on members set.seed(1) n <- 60 members <- round(rnorm(n, mean = 420, sd = 110)) revenue <- round(12 + 0.15 * members + rnorm(n, sd = 9), 1) gyms <- data.frame(members = members, revenue = revenue) round(cor(gyms$members, gyms$revenue), 3) #> [1] 0.858 fit1 <- lm(revenue ~ members, data = gyms) round(coef(fit1), 3) #> (Intercept) members #> 14.681 0.146 round(summary(fit1)$r.squared, 3) #> [1] 0.737

  

The correlation, 0.858, confirms what the scatter showed: a fairly strong relationship. The fitted line says each extra active member is worth about $146 a month in revenue (the slope, 0.146, in units of $1,000s). R-squared, 0.737, says the line explains about 74% of the variation in revenue across these 60 gyms.

A 95% confidence interval for that slope, 0.146, is also built from this one sample of 60 gyms. The promise behind it is this: if you repeated the whole study many times, each time drawing a fresh batch of 60 gyms and building a fresh 95% interval, about 95% of those intervals would contain the true slope, the one you would get if you could regress revenue on members for every gym that will ever exist.

That share, the percentage of repeated intervals that actually contain the truth, is called coverage. It is a different question from how well the line fits the 60 gyms you happened to sample, which is what R-squared measures. Coverage is about the interval's promise. R-squared is about the line's fit to this sample. Keeping those two apart matters, because that is exactly where the five assumptions do their damage: mostly to coverage, rarely to R-squared.

You cannot check coverage from one real study, because you never see the true slope. But you can check it in a simulation, where you set the true slope yourself and then watch how often the interval catches it.

Here, 1,000 fresh 60-gym studies are simulated. Every one of them obeys all five assumptions: the error is normal, its spread is constant, each gym's error is independent of the rest, the relationship is truly a straight line, and no gym is unusual enough to carry the fit alone. Only the random noise added to revenue changes from study to study.

RInteractive R
# Repeat the 60-gym study 1,000 times, under assumptions that are all true set.seed(2) true_slope <- 0.15 sims <- 1000 covered <- logical(sims) r_squared <- numeric(sims) for (i in seq_len(sims)) { study_revenue <- 12 + true_slope * members + rnorm(n, sd = 9) study_fit <- lm(study_revenue ~ members) study_ci <- confint(study_fit)["members", ] covered[i] <- study_ci[1] < true_slope && true_slope < study_ci[2] r_squared[i] <- summary(study_fit)$r.squared } mean(covered) #> [1] 0.945 round(mean(r_squared), 3) #> [1] 0.714

  

945 of the 1,000 intervals contained 0.15, the true slope: coverage of 94.5%, close enough to the promised 95% that the gap is just simulation noise. The average R-squared across those 1,000 studies is 0.714, while the single sample you plotted a moment ago read 0.737. Both numbers wobble a little from study to study. What matters is that coverage sits near 95% and R-squared sits near its own long-run average, because every assumption behind the simulation is true.

Key Insight
Coverage answers "can I trust this interval." R-squared answers "how well does this line fit this sample." They are not the same question, and a broken assumption rarely damages both the same way.

Keep 94.5% in mind as the clean baseline. Every step from here breaks exactly one assumption on these same 60 gyms and watches what happens to coverage and to R-squared.