Sampling distribution of S²

Variance, chi-squared, CIs

X ~ N(0, 1)

Help

Experiment with sampling from a standard normal population, where the sample variances are stored in a histogram.

Choose the sample size, then start generating samples.

Toggle the display of the population, the sample (with the ±1 s.d. bar around the sample mean), and the sample-variance histogram.

Compare the sampling distribution of S² with the chi-squared distribution with n−1 degrees of freedom, scaled to the S² axis. The normal overlay shows the large-df approximation.

Reset the display via the reset button, or by changing the sample size.

This app is inspired by the outstanding sampling-distribution app developed by David Lane: https://onlinestatbook.com/stat_sim/sampling_dist/

Overview

The sampling distribution of the sample variance is a key quantity, important for understanding how to estimate confidence intervals for samples from a normal distribution.

Given an i.i.d. sample X₁, …, Xn from N(μ, σ²), the unbiased sample variance is

S² = (1/(n−1)) Σ (Xi − X̄)²

The sample variance follows a chi-squared distribution with n−1 degrees of freedom:

(n−1)S² / σ² ~ χ²(n−1)

For large n the chi-squared distribution approaches a normal distribution.

A two-sided 100(1−α)% confidence interval for σ² from a single sample is

[ (n−1)S² / χ²1−α/2, (n−1)S² / χ²α/2 ]