How to use it
- Choose raw data, or summary numbers.
- Enter the data (or the mean, SD and n) and the confidence level.
- Pick t when σ is unknown, which is the default, or z when it is known.
How it works
Margin of error = critical value × s / √n, and the interval is mean ± margin. The t critical value comes from Student’s t distribution with n − 1 degrees of freedom, evaluated with the regularised incomplete beta function and found numerically; z comes from the inverse normal. With raw data the sample SD (n − 1) is used, also for the z option.
Worked example
Sample: 2, 4, 4, 4, 5, 5, 7, 9 at 95% with t.
- Mean = 40 / 8 = 5; sample SD = √(32 / 7) ≈ 2.1381
- Standard error = 2.1381 / √8 ≈ 0.7559
- t* with 7 degrees of freedom = 2.364624
- Margin ≈ 1.7875, interval ≈ 3.2125 to 6.7875
Tips
- Check the units: the interval has the same units as the data.
- Small samples need t, not z; z understates the uncertainty.
- This tool covers a mean, not a proportion or a difference of two means.