The sampling distribution in this visualization
A statistic is a number computed from a sample, such as its mean or median. Draw independent samples of the same size from one population again and again, compute the statistic each time, and the values form its sampling distribution. Its expected value minus the true value is the bias; its standard deviation is the standard error. The three layers keep three distributions apart: the population, the values of one sample, and the sampling distribution, one dot per sample.
Why does one sample stay wide while the means close in? A sample is a rough copy of the population, so as grows its standard deviation settles near the population’s rather than shrinking. The mean of independent values behaves differently: values above and below the centre partly cancel, and for any population with a finite variance , so the standard error of the mean is . Four times the sample size halves it. The standard error is therefore not the spread of a sample: it says how much the mean would move from one sample to the next. Why the means also take a bell shape is the central limit theorem.
Why does the sample variance divide by ? Every sample satisfies . The sum of squared deviations is smallest when measured from the sample’s own mean; it falls short of the sum measured from the true mean by , whose average is times the variance of : exactly . So averages , dividing by makes unbiased, and dividing by falls short by on average. The correction is for the variance only: because the square root bends down, itself still underestimates on average (for normal data with , by about 6%). The maximum misses for a plainer reason: with the uniform population every value is below 100, so the largest value of a sample falls short of 100 on average.
Is the mean always the better estimate of the centre? It depends on the population. For a symmetric population the mean and the median are both centred on the true centre, so the better one is the one with the smaller standard error. With normal data the median’s is larger, for large about times the mean’s; with Laplace data, whose tails are heavier, it is smaller, about times. One extreme value moves the mean but barely moves the median, and heavy tails produce extreme values often. For a skewed population the two may estimate different numbers: the exponential population here has mean 50 and median .
Things to notice
- The yellow dots and bars are one seeded simulation; the ink curves are exact distributions (thin dashes where they are computed numerically). “Simulation shows an offset” describes this run only; whether a statistic is biased is its theoretical bias.
Controls
- Changing the statistic or the divisor recomputes the same samples, so the run continues; changing or the population clears it.