Skip to main content
Statistics LibreTexts

7.4: Effect of Sample Size and Confidence Level

  • Page ID
    58918
  • \( \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}\)

    Now that we’ve built and interpreted confidence intervals, it’s time to reflect on something subtle but important: what affects how wide or narrow those intervals are?

    In this section, we’ll focus on two powerful factors:

    1. The confidence level (like 90%, 95%, 99%)
    2. The sample size used to build the interval

    Higher Confidence Comes with a Cost

    When we want to be more confident (say, 99% instead of 95%), we’ll need to include a wider range of values. This makes sense to be more sure we’ve captured the true value, we must cast a wider net.

    Here’s how it looks with the same sample data:

    • Confidence level = 90% → narrower interval
    • Confidence level = 95% → standard choice
    • Confidence level = 99% → wider interval

    The critical value (z* or t*) increases as confidence increases and so does the margin of error.


    Larger Samples Give Greater Precision

    Sample size also plays a critical role. As the sample size increases:

    • The standard error decreases
    • The margin of error gets smaller
    • The confidence interval becomes narrower

    Reminder: Standard error is affected by sample size:

    \( \text{SE} = \frac{s}{\sqrt{n}} \) for a mean   or   \( \text{SE} = \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}} \) for a proportion


    Example 1: Different Confidence Levels

    You survey 100 students about weekly screen time. The average is 23.4 hours/week with a standard deviation of 5.1 hours.

    Compare the width of the following intervals:

    • 90% confidence: \( t^* \approx 1.660 \), ME = 0.85 → Interval = (22.55, 24.25)
    • 95% confidence: \( t^* \approx 1.984 \), ME = 1.02 → Interval = (22.38, 24.42)
    • 99% confidence: \( t^* \approx 2.626 \), ME = 1.35 → Interval = (22.05, 24.75)

    Note that the standard error (SE) is the same in all these calculations, only the critical value changes.

    Conclusion: As confidence increases, the interval gets wider.


    Example 2: Changing the Sample Size

    The same data is collected, but from only 25 students. Now compare with:

    • Mean = 23.4, SD = 5.1, n = 25 → SE = 1.02

    Notice that while the sample standard deviation is the same, the smaller n means there is a larger standard error (SE). This makes the margin of error (ME) bigger as well.

    • 95% CI: ME = \( 2.064 \cdot 1.02 \approx 2.11 \), Interval = (21.29, 25.51)

    If n=100 (the previous example). 95% CI: (22.38, 24.42)

    Conclusion: A larger sample size gives a more precise or narrow interval with the same confidence level.


    Interactive Demo: Confidence Interval Width

    Adjust the sliders below to change the sample size (n) and confidence level. Watch how the margin of error and confidence interval width respond.

    100

    Sample mean: 50
    Sample standard deviation: 15
    Standard error:
    Margin of error:
    Confidence interval:

    Check Your Understanding: Confidence Intervals

    Question 1: Compared to a 90% confidence interval, a 99% confidence interval for the same data is...



    Question 2: Compared to a 90% confidence interval, a 99% confidence interval for the same data is...

    narrow
    widen
    stay the same

    Why This Matters

    Different studies require different levels of precision and certainty. These tools help researchers design better surveys and polls. You’ll use these relationships to:

    • Plan studies with a target margin of error
    • Decide how trustworthy an estimate may be
    • Compare results responsibly

    Now that we’ve built our understanding of confidence intervals, we’re ready to apply them in new ways including hypothesis testing. But first, let’s reflect on how we interpret and communicate these results effectively.

    Related Video


    This page titled 7.4: Effect of Sample Size and Confidence Level is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Mathematics Department.

    • Was this article helpful?