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? There are three factors we will consider:
- The confidence level (like 90%, 95%, 99%)
- The sample size used to build the interval
- The standard deviation of the population the data is sampled from
The Trade off with Higher Confidence
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.
If we have a 95% confidence interval and decide to calculate new ones with different confidence levels, here are the effects:
- Confidence level = 90% → narrower interval
- Confidence level = 99% → wider interval
This can be seen mathematically as obtaining a larger critical value (z* or t*) which will increase the margin of error. We can also imagine it as a large proportion of the area under the estimated sample distribution.
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.01 → Interval = (22.39, 24.41)
- 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.
- n=25 CI: 95% confidence, ME = \( 2.064 \cdot 1.02 \approx 2.11 \), Interval = (21.29, 25.51)
- n=100 CI: 95% confidence, ME = \( 1.984 \cdot 0.51 \approx 1.01 \), Interval = (22.39, 24.41)
Conclusion: A larger sample size gives a more precise or narrow interval with the same confidence level.
Interactive Demo: Confidence Interval Width
Use the sliders above to change the sample size, confidence level and population mean and standard deviations. It will generate a random sample and then build a confidence interval around that. Click on the circle to the left of D to view the actual distribution of data points.
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 determine how large a sample size we need to achieve a desired margin of error.


