|

Confidence interval for a sample mean
The sample mean is a random variable. This equation shows us how we can use this random quantity to estimate a population mean.
For large enough sample sizes, the Central Limit Theorem tells us that the variability of the sample mean is approximately Normal. This in turn tells us that, for example, 95% of the time it will have a value that is within about 2 standard deviations of its mean (1.96, to be exact). Unfortunately, we don't usually know the population standard deviation and so have to estimate it with the sample standard deviation. This introduces another source of variability and so we look at the t distribution instead to find out how wide the interval should be.
Suppose we take a sample of 5 female UQ students and measure their heights, recording 172, 157, 174, 174, and 165 cm. This gives a sample mean of 168.4 cm with standard error 3.30 cm. From t(4) we can be 95% confident that the height of female UQ students is within 9.16 cm of 168.4 cm.
If we wanted a confidence level other than 95% then we look up the tables to find out how many standard errors we need to go. For example, in the t(4) distribution 90% of values fall within 2.132 standard deviations of the mean. Here are some others, along with the corresponding normal values. Note that because of the extra variability from using sample standard deviation, the t values will always be larger, making the confidence intervals wider.
| Confidence |
80% | 90% | 95% | 99% | 99.9% |
| t(4) |
1.533 | 2.132 | 2.776 | 4.604 | 8.610 |
| z |
1.282 | 1.645 | 1.960 | 2.576 | 3.291 |
We would thus be 90% confident from our sample that the height of female UQ students is between 161.4 cm and 175.4 cm.
We can use similar reasoning to test a hypothesised value for the population proportion.
|