Standard errors you can trust

Today let's look at a standard error that can quietly fall far short of the truth, and learn when to trust it and when not to.

Picture a regional retail chain that rolls out a new price-tag display to half of its stores and tracks the daily transaction value, in dollars, at every one of them. Fit the usual regression to measure the display's effect, and R hands back a standard error of 1.61. That number is supposed to say how much the estimate would bounce around if the chain ran this exact study again.

So run it again. Not once, but 2,000 times over, each time with a fresh batch of stores and days. The estimate actually swings by 9.83, about six times wider than what the formula reported.

The formula was not making an arithmetic mistake. It was built on a condition this data does not meet: that every row is an independent, equally noisy observation.

Two very ordinary situations break that condition, each in its own way. One is when the scatter of the noise changes with the size of the thing you're measuring. The other is when individual rows are not actually independent, because they share something in common, like several days from the same store.

Here is that gap, the formula's number against the real one.

Six times wider is not a rounding error. It is the gap this lesson exists to close.

What the standard error formula actually assumes

Start with what a standard error even measures, since everything else here leans on it.

Fit a regression once, on one sample of data, and you get one estimate: a slope, a treatment effect, whatever number you're after. Run the exact same study again, on a fresh sample collected the same way, and you get a slightly different estimate. Do that over and over, and those estimates spread out into their own distribution. The standard error is just the spread of that distribution: how far a fresh estimate from a fresh sample would typically land from the last one.

You almost never get to actually repeat a study thousands of times. So the ordinary least squares (OLS) formula for the standard error is a shortcut: it looks at the one sample you collected and works out, by formula, what that spread should be. But a formula is only as good as the conditions it was built on, and the ordinary formula leans on two of them.

The first is that every row's noise has the same spread. A transaction at a tiny store and a transaction at a huge one are assumed to wander away from their true average by about the same number of dollars. Statisticians call this homoskedasticity: equal scatter, no matter the input.

The second is that the rows are independent. What happened at row 1 is assumed to carry no information about row 2. Each row is a fresh, unrelated piece of evidence.

Break either assumption and the formula keeps producing a number. It just stops being the right number.

Here is the same retail chain, caught breaking each assumption in turn. First, the chain regresses a store's size against its daily transaction value, and the scatter of the noise grows with the store's size: that breaks equal spread. Then the chain rolls out a price-tag display to some of its stores and tracks results for several days at each one: days from the same store share something in common, and that breaks independence.