Standard error
The standard deviation of a sampling distribution is the standard error. For a sample mean:
SE = sigma / sqrt(n)
This follows directly from the [rules for variance](expectation_and_variance.html): the variance of a sum of n independent draws is n * sigma^2, dividing by n to make the mean scales variance by 1/n^2, leaving sigma^2 / n, and the square root gives the formula.
Watch the readout as you drag n: the observed spread of the 800 means tracks the predicted sigma / sqrt(n) closely. That is not a coincidence being illustrated — it is an identity being checked.
Standard deviation is not standard error
These get confused constantly, and the distinction is not subtle.
Standard deviation describes the spread of the data. It is a property of the population, and collecting more data does not reduce it — more careful measurement might, but more measurements will not.
Standard error describes the spread of an estimate. It shrinks as n grows, because a larger sample pins the estimate down better.
A useful test: if the number would change when you collect more data *of the same kind*, it is a standard error. If it would not, it is a standard deviation.
An error bar on a chart could be either, and the two say completely different things. Charts that do not label which are unreadable.
The square root, again
The right-hand panel plots sigma / sqrt(n) against n, and its shape is the practical content of this page.
It falls steeply at first — going from 4 samples to 16 halves the error. Then it flattens. Going from 100 to 400 halves it again, at the cost of three hundred more observations.
Every halving of uncertainty costs four times the data. That is why national polls settle around 1,000 respondents: the marginal precision per person collapses past that point, and the remaining error is dominated by sampling bias rather than sampling noise anyway.
More data cannot fix a biased sample. A poll of 100,000 people who all answer the same badly-worded question is precisely wrong.
Beyond the mean
Every statistic has a sampling distribution, not only the mean. Medians, variances, correlations and regression coefficients all have one, and the formulas are usually harder or unavailable.
The bootstrap exists for exactly this. Resample your data with replacement, recompute the statistic, repeat thousands of times, and the spread of the results estimates the sampling distribution — with no formula and almost no assumptions. It is the same operation this page performs, run on your own sample instead of on a known population.
Where it shows up
Confidence intervals are built directly from the standard error.
t-tests and z-tests compare an observed difference against the standard error of that difference.
Cross-validation variance is the sampling distribution of a performance estimate, which is why a single fold's accuracy is a point with error bars around it.
A/B test duration is a standard error calculation before it is anything else.
Where it goes wrong
Reporting SD when you mean SE, or the reverse. Label your error bars.
Assuming independence. The sqrt(n) assumes independent draws. Clustered or time-series data has a smaller effective n.
Treating a large sample as accurate. It is precise. Accuracy is a separate question, and bias does not shrink with n.
Using the formula for statistics that do not have one. Bootstrap instead.