Topic 5: Statistical Inference

Lesson 5.4: Confidence Intervals For The Mean

Official syllabus section covering Lesson 5.4: Confidence intervals for the mean within Topic 5: Statistical Inference: Constructing confidence intervals for a population mean using z or t as appropriate (t when n is small and sigma is unknown).; The effect of sample size on the width of a confidence interval and finding the sample size for a specified width..

Lesson 5.4: Confidence Intervals for the Mean

Introduction

In this lesson, students, we will explore the concept of confidence intervals for the population mean. By the end of this section, you will be able to construct confidence intervals using either the z-distribution or the t-distribution based on the provided data. Additionally, we will discuss how the sample size affects the width of the confidence interval and how to determine the necessary sample size for a specified width. This knowledge is not only pivotal in statistics but also has practical applications in fields such as medicine, business, and social sciences.

Learning Objectives:

  • Construct confidence intervals for a population mean using z or t as appropriate.
  • Understand the effect of sample size on the width of a confidence interval.
  • Interpret confidence intervals in various practical contexts.
  • Calculate the necessary sample size to achieve a confidence interval of a specified width.

Understanding Confidence Intervals

A confidence interval (CI) provides a range of values within which we expect the true population parameter (in this case, the mean) to fall, with a certain level of confidence. Essentially, a CI quantifies the uncertainty associated with a sample statistic.

Key Concepts:

  • Population Mean ($\mu$): The average of a set of values in the entire population.
  • Sample Mean ($\bar{x}$): The average of values in a sample taken from the population.
  • Standard Deviation ($\sigma$ or $s$): A measure of the amount of variation or dispersion in a set of values. $\sigma$ is used when the population standard deviation is known, and $s$ is used when it is unknown.
  • Confidence Level: The probability that the confidence interval calculated from a sample will contain the true population mean. Common confidence levels are 90%, 95%, and 99%.

Constructing Confidence Intervals

Using the Z-distribution

When the population standard deviation ($\sigma$) is known and the sample size ($n$) is large (typically $n \geq 30$), we can use the z-distribution. The formula for the confidence interval is given by:

$$\text{CI} = \bar{x} \pm z^{*} \frac{\sigma}{\sqrt{n}}$$

Where:

  • $\bar{x}$ is the sample mean.
  • $z^{*}$ is the z-value that corresponds to the desired confidence level (found in z-tables).
  • $\sigma$ is the population standard deviation.
  • $n$ is the sample size.

Example 1: Using the Z-distribution

Suppose a researcher wants to estimate the average height of adult males in a city with a known population standard deviation of 5 cm. A sample of 100 adult males shows an average height of 175 cm. Calculate a 95% confidence interval for the population mean height.

  1. Identify the components:
  • $\bar{x} = 175$ cm
  • $\sigma = 5$ cm
  • $n = 100$
  • For 95% confidence level, $z^{*} = 1.96$.
  1. Plug into the formula:

$$\text{CI} = 175 \pm 1.96 \cdot \frac{5}{\sqrt{100}}$$

  1. Calculate the margin of error:

$$\text{Margin of Error} = 1.96 \cdot \frac{5}{10} = 0.98$$

  1. Calculate the confidence interval:

$$\text{CI} = 175 \pm 0.98 \implies [174.02, 175.98]$$

Thus, the 95% confidence interval for the average height of adult males in the city is from 174.02 cm to 175.98 cm.

Using the T-distribution

When the population standard deviation is unknown and the sample size is small (typically $n < 30$), we use the t-distribution. The formula for the CI becomes:

$$\text{CI} = \bar{x} \pm t^{*} \frac{s}{\sqrt{n}}$$

Where:

  • $s$ is the sample standard deviation.
  • $t^{*}$ is the t-value that corresponds to the desired confidence level based on the degrees of freedom ($df = n - 1$).

Example 2: Using the T-distribution

A psychologist is studying the effect of sleep on cognitive performance. They take a random sample of 25 students and find that the average score on a cognitive test is 82 with a sample standard deviation of 10. Calculate a 95% confidence interval for the population mean score.

  1. Identify the components:
  • $\bar{x} = 82$
  • $s = 10$
  • $n = 25$
  • Degrees of freedom = $24$; for 95% confidence level, $t^{*} \approx 2.064$ (from t-distribution tables).
  1. Plug into the formula:

$$\text{CI} = 82 \pm 2.064 \cdot \frac{10}{\sqrt{25}}$$

  1. Calculate the margin of error:

$$\text{Margin of Error} = 2.064 \cdot 2 = 4.128$$

  1. Calculate the confidence interval:

$$\text{CI} = 82 \pm 4.128 \implies [77.872, 86.128]$$

Therefore, the 95% confidence interval for the population mean cognitive test score is from 77.872 to 86.128.

The Effect of Sample Size on Confidence Interval Width

The width of a confidence interval is influenced by several factors, with sample size being one of the most critical. A larger sample size will typically lead to a narrower confidence interval, implying more precise estimates of the population parameter.

Intuition and Explanation

When we increase the sample size ($n$), the standard error of the mean (SEM) decreases. The SEM is defined as:

$$\text{SEM} = \frac{\sigma}{\sqrt{n}}$$

This inverse relationship indicates that as $n$ increases, SEM decreases, leading to a smaller margin of error and, consequently, a narrower confidence interval.

Example 3: Impact of Sample Size

Let’s evaluate the difference in confidence interval width for varying sample sizes. Assume the population mean $\mu$ is unknown, and you're using a sample mean $\bar{x} = 80$ with $\sigma = 10$.

  • For $n = 25$:

$\text{CI} = 80 \pm 1.96 \cdot \frac{10}{\sqrt{25}} = 80 \pm 3.92 = [76.08, 83.92]$

  • For $n = 100$:

$\text{CI} = 80 \pm 1.96 \cdot \frac{10}{\sqrt{100}} = 80 \pm 1.96 = [78.04, 81.96]$

As illustrated, increasing the sample size from 25 to 100 reduced the width of the confidence interval significantly, enhancing the precision of our estimates.

Finding the Required Sample Size

It is vital to determine the necessary sample size to achieve a desired width for your confidence interval. The formula to find the required sample size ($n$) given a specified margin of error ($E$) and a confidence level is:

$$n = \left(\frac{z^{*} \cdot \sigma}{E} ight)^{2}$$

Example 4: Calculating Sample Size

Suppose a researcher wishes to estimate the average weight of a certain animal with a margin of error of 2 kg at a 95% confidence level. Assuming the population standard deviation is 8 kg. Find the required sample size.

  1. Identify known values:
  • $E = 2$ kg
  • $\sigma = 8$ kg
  • For 95% confidence level, $z^{*} = 1.96$.
  1. Plug into the formula:

$$n = \left(\frac{1.96 \cdot 8}{2} ight)^{2}$$

  1. Calculate:

$$n = \left(\frac{15.68}{2} ight)^{2} = (7.84)^{2} \approx 61.4656$$

Since the sample size must be a whole number, we round up to $n = 62$.

Therefore, a sample size of 62 is required to achieve a margin of error of 2 kg with 95% confidence.

Conclusion

In this lesson, you have learned how to construct confidence intervals for the population mean using both the z and t distributions depending on sample size and known parameters. You also discovered how sample size impacts the width of confidence intervals and how to calculate the required sample size to achieve a specified margin of error. These concepts are fundamental in statistics and allow researchers to make informed decisions based on sampled data.

Study Notes

  • A confidence interval estimates the range within which a population mean is expected to lie with a given confidence level.
  • Use the z-distribution when $\sigma$ is known and $n$ is large ($n \geq 30$).
  • Use the t-distribution when $\sigma$ is unknown and $n$ is small ($n < 30$).
  • Larger sample sizes yield narrower confidence intervals, indicating more precision.
  • The required sample size can be calculated based on desired margin of error and confidence level.

Practice Quiz

5 questions to test your understanding