A **confidence interval for a mean **is a range of values that is likely to contain a population mean with a certain level of confidence.

We use the following formula to calculate a confidence interval for a mean:

**Confidence Interval = ****x +/- t*(s/√n)**

where:

**x:**sample mean**t:**the t critical value**s:**sample standard deviation**n:**sample size

**Note**: We replace a t critical value with a z critical value in the formula if the population standard deviation (σ) is known *and* the sample size is greater than 30.

The following examples show how to construct a confidence interval for a mean in three different scenarios:

- Population standard deviation (σ) is unknown
- Population standard deviation (σ) is known but n ≤ 30
- Population standard deviation (σ) is known and n > 30

Let’s jump in!

**Example 1: Confidence Interval when σ is Unknown**

Suppose we would like to calculate a 95% confidence interval for the mean height (in inches) of a certain species of plant.

Suppose we collect a simple random sample with the following information:

- sample mean (x)= 12
- sample size (n) = 19
- sample standard deviation (s) = 6.3

We can use the following formula to construct this confidence interval:

- 95% C.I. = x +/- t*(s/√n)
- 95% C.I. = 12 +/- t
_{n-1, α/2}*(6.3/√19) - 95% C.I. = 12 +/- t
_{18, .025}*(6.3/√19) - 95% C.I. = 12 +/- 2.1009*(6.3/√19)
- 95% C.I. =
**(8.964 , 15.037)**

The 95% confidence interval for the population mean height for this particular species of plant is** (8.964 inches, 15.037 inches)**.

**Note #1**: We used the Inverse t Distribution Calculator to find the t critical value associated with 18 degrees of freedom and a confidence level of 0.95.

**Note #2**: Since the population standard deviation (σ) was unknown, we used the t critical value when calculating the confidence interval.

**Example 2: ****Confidence Interval when σ is Known but n ≤ 30**

Suppose we would like to calculate a 99% confidence interval for the mean exam score on a certain college entrance exam.

Suppose we collect a simple random sample with the following information:

- sample mean (x)= 85
- sample size (n) = 25
- population standard deviation (σ) = 3.5

We can use the following formula to construct this confidence interval:

- 99% C.I. = x +/- t*(s/√n)
- 99% C.I. = 85 +/- t
_{n-1, α/2}*(3.5/√25) - 99% C.I. = 85 +/- t
_{24, .005}*(3.5/√25) - 99% C.I. = 85 +/- 2.7969*(3.5/√25)
- 99% C.I. =
**(83.042, 86.958)**

The 99% confidence interval for the population mean exam score on this particular college entrance exam is** (83.042, 86.958)**.

**Note #1**: We used the Inverse t Distribution Calculator to find the t critical value associated with 24 degrees of freedom and a confidence level of 0.99.

**Note #2**: Since the population standard deviation (σ) was known but the sample size (n) was less than 30, we used the t critical value when calculating the confidence interval.

**Example 3: ****Confidence Interval when σ is Known and n > 30**

Suppose we would like to calculate a 90% confidence interval for the mean weight of a certain species of turtle.

Suppose we collect a simple random sample with the following information:

- sample mean (x)= 300
- sample size (n) = 40
- population standard deviation (σ) = 15

We can use the following formula to construct this confidence interval:

- 90% C.I. = x +/- z*(σ/√n)
- 90% C.I. = 300 +/- 1.645*(15/√40)
- 90% C.I. =
**(296.099, 303.901)**

The 90% confidence interval for the population mean weight of this particular species of turtle is** (83.042, 86.958)**.

**Note #1**: We used the Critical Z Value Calculator to find the z critical value associated with a significance level of 0.1.

**Note #2**: Since the population standard deviation (σ) was known and the sample size (n) was greater than 30, we used the z critical value when calculating the confidence interval.

**Additional Resources**

The following tutorials provide additional information about confidence intervals:

4 Examples of Confidence Intervals in Real Life

How to Write a Confidence Interval Conclusion

The 6 Confidence Interval Assumptions to Check