Kim wants to determine a 99 percent confidence interval for the true proportion p of high school students in the area who attend their home basketball games. Out of n randomly selected students she finds that that exactly half attend their home basketball games. About how large would n have to be to get a margin of error less than 0.02 for p?

To determine the minimum sample size needed to achieve a specified margin of error for estimating a proportion, we can use the formula:

n = (Z^2 * p * (1 - p)) / E^2

Where:
- n is the required sample size.
- Z is the z-score corresponding to the desired confidence level. For a 99% confidence level, the z-score is approximately 2.576.
- p is the estimated proportion (in this case, we can use 0.5 as a conservative estimate since we don't have any prior information).
- E is the desired margin of error, which is 0.02.

Substituting the values into the formula:

n = (2.576^2 * 0.5 * (1 - 0.5)) / 0.02^2

Simplifying the equation:

n = (6.646 * 0.25) / 0.0004

n = 16615

Therefore, to achieve a margin of error less than 0.02 for estimating the proportion p, Kim would need a sample size of at least 16615 high school students.