Probability · interactive path

From population to intervals: a guided laboratory

Six connected stages: from a theoretical distribution to data, sample means, intervals and their coverage.

Go to the laboratory for analysing your data

01 / 06

Explore a distribution

Choose a model and adjust its parameters. The curve describes the theoretical population, not a sample.

Explain the theory

A random variable maps uncertain outcomes to numbers. Discrete variables have point probabilities; continuous variables have densities, with probabilities given by areas. Mean and variance belong to the model.

02 / 06

Generate a sample

Draw fresh data from the same model: parameters remain fixed while sample mean and variance change.

Explain the theory

Sample mean x̄ and variance s²=Σ(xᵢ−x̄)²/(n−1) are statistics: they depend on the sampled data. A new sample changes statistics, not population parameters.

03 / 06

Repeat sampling

Draw many samples of the same size and keep one mean from each. The chart now shows means, not individual observations.

Explain the theory

For independent observations with mean μ and finite variance σ², E(x̄)=μ and SE(x̄)=σ/√n. Under suitable conditions, the central limit theorem describes how the distribution of means approaches a Normal as n grows.

04 / 06

Build an interval

Calculate an interval for the current sample mean. Use z only when the population σ is known in the model; otherwise use t.

Explain the theory

Known σ: x̄ ± z·σ/√n. Unknown σ: x̄ ± t·s/√n with n−1 degrees of freedom. For small samples the t interval is exact only with a Normal population. The interval concerns μ, not individual data.

05 / 06

Check coverage

Repeat the experiment: how many intervals contain the true population mean? The chart displays at most the first 80 intervals.

Explain the theory

A 95% level describes the procedure: across many repetitions, about 95 intervals out of 100 contain μ if assumptions hold. It does not assign a 95% probability to μ after a particular interval has been calculated.

06 / 06

Guided experiments

First make a prediction; then press “Try” and compare it with the explanation.

Increase n

If you quadruple n, what happens to the standard error?

Show explanation

SE=σ/√n: quadrupling n halves SE. Try n=10 and n=100 to see the direction of change.

90%, 95%, 99%

With the same data, which interval will be widest?

Show explanation

99% needs a larger critical value than 95% or 90%: nominal coverage increases, but so does interval width.

Change σ

Does a more dispersed population produce wider intervals?

Show explanation

Yes: for a z interval at fixed n, the margin is proportional to σ. For a t interval, sample deviation s varies from sample to sample.

z versus t

Why does t generally give a wider interval at small n?

Show explanation

Unknown σ is estimated by s: t has heavier tails and a larger critical value. The exact comparison assumes a Normal population.

t tails

What happens to t as ν increases?

Show explanation

Its tails approach those of the standard Normal. Its mean exists only for ν>1 and its variance only for ν>2.

Central limit theorem

Do the means of Exponential samples become more symmetric as n grows?

Show explanation

Yes, under the theorem’s conditions. The population remains skewed; it is the distribution of means that changes.

Simulations run in your browser. Samples are not sent to the server.