To find the sample size needed to estimate the percentage of adults who can wiggle their ears when the proportions \( \hat{p} \) and \( \hat{q} \) are unknown, we use the formula:
\[
n = \frac{z^2 \cdot \hat{p} \cdot \hat{q}}{E^2}
\]
where:
- \( z \) is the z-score corresponding to the desired confidence level,
- \( \hat{p} = 0.5 \) (maximum variability),
- \( \hat{q} = 1 - \hat{p} = 0.5 \),
- \( E = 0.03 \) (margin of error).
For a confidence level of \( 99\% \), the z-score is approximately \( 2.576 \). Plugging in the values:
\[
n = \frac{(2.576)^2 \cdot (0.5) \cdot (0.5)}{(0.03)^2} \approx 1844
\]
Thus, rounding up, the sample size needed is:
\[
\boxed{n = 1844}
\]
Next, we calculate the sample size assuming that \( 23\% \) of adults can wiggle their ears. Here, we set:
\[
\hat{p} = 0.23 \quad \text{and} \quad \hat{q} = 1 - \hat{p} = 0.77
\]
Using the same formula:
\[
n = \frac{z^2 \cdot \hat{p} \cdot \hat{q}}{E^2}
\]
Substituting the values:
\[
n = \frac{(2.576)^2 \cdot (0.23) \cdot (0.77)}{(0.03)^2} \approx 1306
\]
Thus, rounding up, the sample size needed is:
\[
\boxed{n = 1306}
\]
- Part (a): \( \boxed{n = 1844} \)
- Part (b): \( \boxed{n = 1306} \)