6.4  Sample Size Computation for the Population Mean
Unit Summary 

Reading Assignment
An Introduction to Statistical Methods and Data Analysis, (See Course Schedule).
Margin of Error: Half Width of the Interval
A \(100(1  \alpha)%\) CI for \(\mu\) is:
\[\bar{x}t_{\alpha/2}\cdot \frac{s}{\sqrt{n}},\ \bar{x}+t_{\alpha/2}\cdot \frac{s}{\sqrt{n}}\]
where the tdistribution has df = n  1.
Thus, margin of error, sometimes denoted as E, is equal to:
\[E=\frac{t_{\alpha/2}\cdot s}{\sqrt{n}}\]
Sample Size Computation for Population Mean
How many graduate students should one sample if one wants to estimate the average height of PSU graduate students?
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 cruder method to find the sample size:
\[n=(\frac{z_{\alpha/2}\cdot \sigma}{E})^2\]
rounded up to the next whole integer.
Try to figure out your answer first, then click the graphic to compare answers.
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?
Margin of error = E = ?
\(\sigma\) ≈ ?
Sample size needed is ?
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.
A more accurate method to estimate the sample size: iteratively evaluate the formula since the t value also depends on n.
\[n=(\frac{t_{\alpha/2}\cdot s}{E})^2\]
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 for degree of freedom = 19, then
\[n=\frac{(t_{\alpha/2})^2 \cdot s^2}{E^2}=\frac{(1.729)^2\cdot {400}^2}{(120)^2}=33.21\]
For n = 34, degree of freedom = 33, and t_{0.05} = 1.697
\[n=\frac{(t_{\alpha/2})^2 \cdot s^2}{E^2}=\frac{(1.697)^2\cdot {400}^2}{(120)^2}=31.95\]
If we use n = 32, the result is the same. Thus, the more accurate answer to the example is to sample 32 students.