5.4.5 - Sample Size Computation

Sample Size Computation for the Population Mean Confidence Interval Section

Recall that a \((1-\alpha)\)100% confidence interval for \(\mu\) is \(\bar{x}\pm t_{\alpha/2}\dfrac{s}{\sqrt{n}}\) where the multiplier \(t\) has a t-distribution with \(df = n - 1\). Thus, the margin of error, E, is equal to:

\(E=t_{\alpha/2}\dfrac{s}{\sqrt{n}}\)

To determine the sample size, one first decides the confidence level and the half width of the interval one wants. Then we can find the sample size to yield an interval with that confidence level and with a half width not more than the specified one. The crude method to find the sample size: \(n=\left(\dfrac{z_{\alpha/2}\sigma}{E}\right)^2\) Then round up to the next whole integer.

Example 5-8: Spring Break Section

A marketing research firm wants to estimate the average amount a student spends during the Spring break. They want to determine it to within \$120 with 90% confidence. One can roughly say that it ranges from \$100 to \$1700. How many students should they sample?

Answer

To use the formula, we need all the pieces for \(n=\left(\dfrac{z_{\alpha/2}\sigma}{E}\right)^2\). We know that \(z_{\alpha/2}=1.645\) (for 90%). The margin of error, \(E\), is 120. The only piece missing is \(\sigma\). Since the standard deviation is not given in the problem, we can estimate it using \(\dfrac{\text{range}}{4}\) from Lesson 1. Therefore, \(\sigma=\dfrac{1700-100}{4}=400\). So we have...

\begin{align} n &=\left(\dfrac{1.645(400)}{120}\right)^2\\ &=30.07 \end{align}

Therefore, a sample of size \(n=31\) is required.

Note! In homework and exams, it is fine if you simply use the cruder method. A more accurate method is provided in the following for your reference only.

The Iterative Method

A more accurate method to estimate the sample size: iteratively evaluate the formula since the t value also depends on n.

\(n=\left(\dfrac{t_{\alpha/2}s}{E}\right)^2\)

Use the example above for illustration. Start with an initial guess for $n$, plug in the formula, and iteratively solve for \(n\).

If the initial guess for \(n\) is 20, \(t_{0.05} = 1.729\) and degrees of freedom = 19,

\(n=\left(\dfrac{t_{\alpha/2}s}{E}\right)^2=n=\left(\dfrac{1.729(400)}{120}\right)^2=33.21\)

For \(n = 34\), degree of freedom = 33, and \(t_{0.05} = 1.697\)

\(n=\left(\dfrac{t_{\alpha/2}s}{E}\right)^2=n=\left(\dfrac{1.697(400)}{120}\right)^2=31.99\)

If we use \(n = 32\), the result is the same. Thus, the more accurate answer to the example is to sample 32 students.