Skip to main content
Statistics LibreTexts

7.3: Confidence Intervals for a Population Mean

  • Page ID
    58916
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Suppose a health researcher is studying caffeine consumption among college students. She surveys a random sample of 20 students and finds they consume an average of 215 milligrams of caffeine per day, with a sample standard deviation of 48 mg/day. She wants to estimate the true average caffeine intake for all students on campus at 95% confidence. How can we do a similar estimation for means as we did with proportions in the last section?


    The t-Distribution: When the Normal Curve Isn't Enough

    Back in Chapter 6, we explored the Central Limit Theorem, which told us that the sampling distribution of sample means forms a normal distribution with certain characteristics. The mean of the sample means (\(\mu_{\bar{x}}\)) matched the population mean (\(\mu\)), which is what we're trying to estimate. And the standard error (\(\sigma_{\bar{x}}\) or SE) could be calculated based on the population standard deviation (\(\frac{\sigma}{\sqrt{n}}\)).

    But in real-world data, we often don’t know the population standard deviation. And sometimes, we’re working with smaller sample sizes where the normality of the distribution might not be that precise. That’s when the normal model can start to steer us wrong, it doesn't account for these sources of error. We need a better model for this situation.

    Enter the t-distribution.


    What Is the t-Distribution?

    The t-distribution is a family of curves that look similar to the normal distribution, bell-shaped and symmetric, but with heavier tails. That means it gives more room for uncertainty, especially when sample sizes are small.

    Just like the normal distribution is used with z-scores, the t-distribution is used with t-scores. We’ll use it any time we’re:

    • Estimating a population mean and...
    • ...we don’t know the population standard deviation

    Instead of using \( \sigma \), we substitute the sample standard deviation \( s \), and adjust for the extra variability that comes from estimating.


    Degrees of Freedom (df)

    There is more than one t-distribution, in fact, there’s an infinite set! Each one is described by a number called degrees of freedom (usually noted as \( df \)).

    When estimating a single mean, degrees of freedom equals the sample size minus one:

    \[ df = n - 1 \]

    As your sample size increases, the t-distribution gets closer and closer to the normal distribution, the extra uncertainty becomes negligible when samples are large (usually \( n > 30 \)).


    Visual Insight

    Here’s how the t-distribution compares to the normal model:

    • Same center: both are centered at 0
    • Symmetric shape: both are bell curves
    • Heavier tails: t-distributions allow for more extreme values, they’re “wider” when n is small
    [Insert diagram here comparing the standard normal curve and t-distributions with df = 5, 10, 30]
    Lighter blue: normal distribution; darker curves: t-distributions with increasing degrees of freedom

    Example: Estimating Caffeine Consumption

    Consider the health researcher studying caffeine consumption mentioned earlier. Since she doesn’t know the population standard deviation, she will use the t-distribution, not the normal curve. The degrees of freedom will be \( df = 20 - 1 = 19 \).

    We’ll walk through how to calculate confidence intervals with the t-distribution below. For now, just remember:

    You can use the normal distribution when \( \sigma \) is known, use the t-distribution when \( \sigma \) is unknown and you must estimate with a sample.

    Definition: Confidence Interval for a Population Mean

    A confidence interval for a population mean is a range of values built around a sample mean, showing the plausible values for the population mean \( \mu \).

    When the population standard deviation \( \sigma \) is unknown and the sample size is modest, we use the t-distribution:

    \[ \bar{x} - t^* \left( \frac{s}{\sqrt{n}}\right) < \mu < \bar{x} + t^* \left( \frac{s}{\sqrt{n}}\right) \]

    • \( \bar{x} \): sample mean
    • \( s \): sample standard deviation
    • \( n \): sample size
    • \( t^* \): critical value from the t-distribution for the desired confidence level

    In this formula, we have \( \bar{x}\) which is the point estimate and \(t^* \left(\frac{s}{\sqrt{n}}\right)\) which is the margin of error (ME) — and a range we can be reasonably confident contains \( \mu \).


    What a Confidence Interval Really Means

    A confidence interval provides a range of plausible values for a population parameter. It’s not only about the calculation, it’s about interpretation.

    For example, suppose we calculate a 95% confidence interval for mean sleep to be (6.36, 7.44).

    What does that actually mean?

    We can say: We are 95% confident that the true average number of hours all students sleep falls between 6.36 and 7.44 hours.

    This does not mean there’s a 95% chance the true value is inside this specific interval, that’s a common misunderstanding.

    Instead: If we were to repeat this sampling method many times, 95% of the intervals we construct would contain the true mean. Confidence comes from the method, not the individual interval.


    Interpretation Tips

    When writing or reading a confidence interval conclusion, think carefully about these questions:

    • What is the population you’re estimating for?
    • What parameter are you trying to learn about, a mean or a proportion?
    • What does your interval say about that parameter?
    • What level of confidence are you working with?

    The more clearly you can communicate the variable, population, and level of confidence, the better your conclusion will be.


    Choosing a Confidence Level

    So far, we’ve been working with 95% confidence intervals. That’s a common choice, but it’s not the only one. Confidence levels are flexible, and we choose them depending on the situation and how much uncertainty we’re willing to accept.

    Here are some common levels:

    • 90% confidence: narrower interval, less confidence
    • 95% confidence: a standard balance of precision and confidence
    • 99% confidence: wider interval, more confidence

    The general rule is:

    Higher confidence → wider interval
    Lower confidence → narrower interval

    When the consequences of being wrong are high (safety studies, medication trials, policy decisions), we often want higher confidence. We’re willing to have a wider interval if it means we’re more certain.

    If we’re doing a quick exploratory study or working with limited data, we may accept lower confidence in exchange for narrower, more informative ranges.


    Thinking Critically About Confidence

    • How much certainty do I need before I take action?
    • How important is precision vs. accuracy in this case?
    • What are the risks if I underestimate or overestimate the true value?

    In later chapters, when we use intervals in hypothesis testing or decision-making, we’ll return to this idea more formally.


    Example 1: Sleep Hours Estimate

    A sample of 25 students reports an average of 6.9 hours of sleep per night, with a standard deviation of 1.3 hours. Construct a 95% confidence interval for the average amount of sleep all students get.

    • \( \bar{x} = 6.9 \), \( s = 1.3 \), \( n = 25 \), degrees of freedom = 24
    • From the t-table, critical value for 95% confidence and df = 24 is \( t^* \approx 2.064 \)
    • Standard error: \( \frac{1.3}{\sqrt{25}} = 0.26 \)
    • Margin of error: \( 2.064 \cdot 0.26 = 0.537 \)
    • Interval: \( (6.9 - 0.54, 6.9 + 0.54) = (6.36, 7.44) \)

    Interpretation: We are 95% confident that the average sleep among all students is between 6.36 and 7.44 hours per night.


    Example 2: Mean Rent for Off-Campus Housing

    A city planner wants to estimate the average rent of apartments near campus. She samples 50 listings and finds a mean rent of \$1,165 with a standard deviation of \$120.

    • \( \bar{x} = 1165, s = 120, n = 50 \), df = 49 → use \( t^* \approx 2.009 \)
    • Standard error: \( \frac{120}{\sqrt{50}} \approx 16.97 \)
    • Margin of error: \( 2.009 \cdot 16.97 \approx 34.08 \)
    • Interval: \( (1130.92, 1199.08) \)

    Conclusion: We are 95% confident that the true average rent in this area is between \$1,131 and \$1,199.


    Reflection: Shifting the Statistic

    So far, we've built confidence intervals based on the sample mean and on the sample proportion. In both cases we follow the same procedure (but with different calculations):

    • We take a sample
    • We compute a statistic (a mean or a proportion)
    • We estimate a margin of error
    • We build an interval that likely contains the population value

    Related Video


    Up Next:

    In the next section, we'll take a closer look at the connections between the margin of error, the confidence level, and the sample size


    This page titled 7.3: Confidence Intervals for a Population Mean is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Mathematics Department.

    • Was this article helpful?