Bell Statistics

What is standard error?

Standard error measures how much an estimate would vary if you repeated the study. It describes the precision of a statistic rather than the spread of the data, and it shrinks as the sample grows — which standard deviation does not.

Notation
SE
Also called
SE, standard error of the mean, sampling error
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

Run your experiment again on a fresh sample and you would get a slightly different number. Run it a thousand times and those numbers would form a distribution around the truth. The standard error is the standard deviation of that distribution — how much your estimate bounces around from sample to sample. It is a statement about the precision of a statistic, not about the variability of the underlying data, and that distinction is the one people most often lose.

Standard deviation describes the spread of individual observations and does not change as you collect more of them: customers vary as much in a sample of a million as in a sample of a hundred. The standard error describes how well you have pinned down a summary of those observations, and it falls as 1/√n. Confusing the two produces confidence intervals wrong by a factor of the square root of the sample size — a mistake that is invisible in the output and enormous in effect.

That square root is the source of most of the economics of experimentation. Four times the data halves the standard error; a hundred times the data reduces it by only a factor of ten. This is why detecting small effects is so expensive, why sample size scales with the inverse square of the effect you want to detect, and why reducing the variance of the metric is so much more attractive than collecting more of it — the numerator and the denominator are not equally easy to move.

It is also the engine of everything you read off a results table. A confidence interval is the estimate plus and minus a critical value times the standard error. A test statistic is the estimate divided by its standard error. So every significance verdict and every interval is really a statement about how many standard errors the estimate sits from zero — which means anything that makes the standard error wrong makes both of them wrong in the same direction.

Two situations routinely do exactly that. Clustered data: if observations within a group are correlated — sessions from the same user, weeks from the same market — the effective sample size is far smaller than the row count, and treating rows as independent understates the standard error badly. And repeated looks at accumulating data, where the arithmetic is fine but the decision rule inflates the error rate. The first is fixed by clustering at the level of assignment; the second by sequential testing.

The formula

One general form and the three specialisations you will actually use. Every one of them has n under a square root.

Standard error of a mean
SE = s / √n

s is the sample standard deviation. The √n is why quadrupling the sample only halves the uncertainty.

Standard error of a proportion
SE = √( p̂(1 − p̂) / n )

Largest at p = 0.5 and smallest at the extremes — though very rare events need the Wilson interval instead, since this approximation fails there.

Standard error of a difference
SE = √( s₁²/n₁ + s₂²/n₂ )

Variances add, standard errors do not. This is the quantity every two-sample test divides by — see the two-sample t-test calculator.

Clustered standard error
SE_clustered ≈ SE_naive · √( 1 + (m − 1)·ρ )

m is the cluster size and ρ the within-cluster correlation. With 10 sessions per user at ρ = 0.3, the naive standard error is about 1.8 times too small.

Worked example

An experiment measures revenue per session. There are 200,000 sessions per arm, from 40,000 users — an average of five sessions each. Sessions from the same user are correlated at about 0.35. The analysis was run at session level.

Sessions per arm
200,000
Users per arm
40,000
SD of revenue per session
£14.20
Naive SE, treating sessions as independent
£0.0318
Within-user correlation (ρ)
0.35
Design effect
1 + (5 − 1) × 0.35 = 2.4

The correct standard error is £0.0318 × √2.4 = £0.0492 — about 55% larger. The confidence interval is 55% wider and the test statistic 35% smaller.

Nothing about the data is wrong; the analysis simply counted 200,000 observations where it had roughly 83,000 observations' worth of independent information. A result at p = 0.03 under the naive standard error lands at about p = 0.09 once clustering is accounted for, which is the difference between shipping and not. The rule that avoids this is to analyse at the unit you randomised on: users were assigned, so the analysis should be per user, either by aggregating each user's revenue into one number or by clustering standard errors at the user. Randomising by user and analysing by session is one of the most common ways an experimentation platform quietly reports more significance than it has earned.

Common misconceptions

Standard error and standard deviation are the same thing.
Standard deviation describes how spread out individual observations are and does not shrink with more data. Standard error describes how precisely a statistic is estimated and falls as 1/√n. Reporting one where the other belongs makes confidence intervals wrong by a factor of √n, which at n = 10,000 is a factor of a hundred.
A small standard error means the estimate is accurate.
It means the estimate is precise, which is a different property. A biased estimator can have a tiny standard error and be consistently wrong — that is exactly what selection bias produces. Precision describes how much the estimate would move on repetition; accuracy describes whether it is centred on the truth, and no standard error can tell you about the second.
We have hundreds of thousands of rows, so the standard error is tiny.
Only if the rows are independent. Sessions from one user, weeks from one market and events from one account are all correlated, so the effective sample is far smaller than the row count. Cluster at the level treatment was assigned, and expect the interval to widen substantially.

Frequently asked questions

When should I report standard error and when standard deviation?
Standard deviation when describing the data — how much customers vary, how spread out order values are. Standard error when describing an estimate — how precisely you have measured an average or a difference. A chart of group means with standard-deviation error bars looks very different from one with standard errors, and mislabelling them is a routine source of misreading in reports.
How much data do I need to halve the standard error?
Four times as much, because it falls with the square root of the sample size. That relationship governs the economics of experimentation: going from a 10% detectable effect to a 5% one costs four times the traffic, and to 2.5% costs sixteen times. It is also the reason variance reduction is so valuable — removing half the variance is worth doubling the sample, and it can often be had by joining one table.
When do I need clustered standard errors?
Whenever the unit of analysis is finer than the unit of randomisation. Assigning by user and analysing sessions, assigning by market and analysing weeks, assigning by account and analysing seats — all of these have correlated observations within each assigned unit, so treating rows as independent understates the standard error. Cluster at the level treatment was assigned, or aggregate each unit to a single observation first.

Related terms

  • Central limit theorem

    Why averages go bell-shaped even when the data do not — the result that makes ordinary tests work.

  • Confidence interval

    The range your data can actually support, and why it answers the business question a p-value cannot.

  • CUPED

    Use pre-period data to strip out noise — the same test, 20-50% less traffic, no change to the estimate.

  • Normal distribution

    The bell curve — and why your skewed revenue data usually does not break the test anyway.

  • Sample size

    Four inputs, one number, fixed before the test runs — and the square law that makes small effects expensive.

  • Standard deviation

    How spread out the data are, in the data's own units — and the reason some metrics need vastly more sample.

  • Variance

    Spread in squared units — awkward to read, and the quantity every sample-size formula is built on.

Calculate it

  • Two-sample t-test

    Compare the average of two independent groups — plan the sample size, then test the result.

  • Proportion confidence interval

    A defensible interval around one rate — Wilson, Agresti-Coull, Jeffreys and Clopper-Pearson, side by side.

  • A/B test sample size

    Size a two-proportion experiment before you launch, then read the lift and its interval once it lands.

Knowing the term is the easy part

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.