THE SAMPLING LAB

From samples
to t scores.

Each sample has its own mean and standard deviation. Draw a few, then many, to see how those means vary and where their t scores land under a null hypothesis.

01 Choose populations 02 Draw samples 03 Compare t scores
Null samples0
Alternative samples0
Reference mean50
01 / THE SOURCE

Two possible populations

The curves describe individual observations. The dots show the observations in the selected sample.

Null Alternative
Draw a sample to see its observations here.
02 / THE ESTIMATE

Sample means ȳ

Every sample contributes one mean. As you draw more, their spread becomes visible.

Null Alternative
The dashed line marks μ₀. Each color is scaled to its own number of samples.
03 / THE TEST STATISTIC

The t-score distribution

Each sample becomes t = (ȳ − μ₀) / (s / √n). Both populations are tested against the same μ₀.

Null Alternative
Turn on the theoretical curve to compare simulation with the exact null distribution.
A CLOSER LOOK

One sample, step by step

No sample selected
Draw one sample to inspect its observations, mean, standard deviation, and t score.

Why t instead of z? We estimate the standard error using each sample’s s. When the null population is normal, those null t scores follow a Student t distribution with n − 1 degrees of freedom. Samples from the alternative need not follow that central t curve.