The formula
x̄ ± t · s / √n
What it means
A 95 % confidence interval does not say the real mean is inside it with 95 % probability: it says that if you repeated the study many times, 95 % of the intervals you built would contain the real mean. It sounds the same and it is not, and the difference matters as soon as someone reads it as a bet. The width depends on three things: how much the data vary, how many there are and how much confidence you ask for.
How to work it out by hand
- Work out the mean and the standard deviation of the sample
- Work out the standard error: the deviation over the square root of n
- Look up the critical t value for n − 1 degrees of freedom and your confidence level
- Add and subtract the critical value times the standard error from the mean
What is worth knowing
Student's t is used rather than the normal because the real population deviation is unknown and gets estimated from the sample itself, which adds an uncertainty the t accounts for and the normal does not. With plenty of data the two nearly coincide; with fifteen values the difference already shows. And moving from 95 % to 99 % widens the interval by around thirty per cent: more confidence is always less precision, and there is no way to have both.