WeCodeAcademy

Confidence Intervals

A sample mean is only an estimate. A confidence interval gives a range likely to contain the true mean. A 95% interval is mean ± t * standard error, where t comes from the t-distribution (used because the true standard deviation is unknown). Wider samples give narrower intervals.

The 95% refers to the method: if you repeated the study many times, about 95% of such intervals would contain the true mean.

Examplepython
Open in editor »
Quick check

Collecting a bigger sample usually makes a confidence interval...

Your turn: write the code

Print the lower end of the 95% confidence interval for the mean, rounded to 2 decimals.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.