Confidence intervals for means
Confidence intervals for means calculate an interval in which there is a certain degree of confidence (often 90%; 95% or 99%) that the true population mean lies within.
Conditions for valid t intervals
- Simple random sample
- Normal: The sample distribution of the sample mean is roughly normally distributed through on of the following conditions:
- n ≥ 30
- The population is normally distributed
- Approximately symmetric around the mean
- Independent sample: Sample either with replacement, or n < 10N
Point estimate vs confidence interval
Why not just rely on a point estimate, like the sample mean? The sample mean is a value, or a point estimate. It does not give a feel of how certain, or uncertain, we can feel about it. We would still be asking: How “certain” can we be that the true population mean is anywhere close to this sample mean?
For inferential statistics we add an interval to this point estimate. We can calculate a confidence interval for means and this returns an interval for which we can conclude that we can feel, for example, 95% confident that the true mean lies within.
Example: Say that we, in some population, calculate an average height or length for 4-months old babies. Compare this to an interval between 74 and 82 cm saying that we can feel 95% confident that the true mean lies within this interval.
As described in Confidence intervals the greater the confidence level the wider the interval opens:
σ unknown => t-statics
When calculating confidence intervals for means, it is very unusual that the population standard deviation is known. If it would be known, the population most probably would also have to be known, and we wouldn’t need to calculate these estimates in the first place, as we could just read directly from the population data.
In Confidence intervals for proportions, we can calculate the standard error of the statistics and we apply the standard normal table as also described in Z-table for proportions.
The t-table returns higher values than the z-table, which gives good sense as t-statistics is used for smaller samples meaning that the margin of error is higher. The spread of data is larger:
How to use the t-table
The t-table is embedded in all statistical software, and statisticians rarely do lookups in the tables, but for the sake of the exercise:
We divide the Alpha level by 2 whereas we have two critical values: the upper and the lower. Say we are supposed to find the t-score for a sample size of 21 at a 95% confidence interval:
The left column represents degrees of freedom (df) which is n-1 = 20. As we are looking for a 95% confidence level and an Alpha of 0.05, we look down the 0.025 column and find the value 2.086 which is our t-score, or our critical value:
Margin of error (ME)
The components of the formula are:
Worked example of confidence intervals for means
Parents of 21 girls born in Sweden report the exact height/length of their 2 years old girls measured in the very birthday of each child. This sample comes out with the results that the mean height is 79.00 and the standard deviation is 5.00. We wish to do a 95% confidence interval, so the calculation becomes:
Through our sample statistics we estimate that we can be 95% confident that the true mean height for two-years old girls born in Sweden is between 76.4 and 81.6 cm.
Confidence intervals for means in Excel
The =CONFIDENCE.T function in Excel applies Student’s t-Distribution to calculate a confidence value for a population mean.
For our example above:
- standard deviation (s) = 5.72
- sample size (n) = 21
=CONFIDENCE.T(0.05,5.72,21) = 2.6
Some of my preferred tutorials for learning on confidence intervals for means:
- Khan Academy videos:
- Dr Nic’s Maths and stats: Calculating the Confidence interval for a mean using a formula
Freelance Data Analyst
+34 616 71 29 85
Spain: Ctra. 404, km 2, 29100 Coín, Malaga
Denmark: c/o Musvitvej 4, 3660 Stenløse
Drop me a line
What are you working on just now? Can I help you, and can you help me?
Learning statistics. Doing statistics. Freelance since 2005. Dane. Living in Spain. With my Spanish wife and two children.
Connect with me
What they say
20 years in sales, analysis, journalism and startups. See what my customers and partners say about me.