Statistics 1

In-Class Exercise 12

Yu-You Liou

Shih Chien University

2026-09-16

Question 1

Confidence Interval for a Proportion

In a survey of 500 commuters, 180 said they use public transportation daily.

  1. Compute \hat{p} and \hat{q}.
  2. Verify that n\hat{p}\ge5 and n\hat{q}\ge5.
  3. Report the 95% confidence interval for p using \hat{p}\pm z_{\alpha/2}\sqrt{\hat{p}\hat{q}/n}.
  4. Compare your answer with prop.test(180, 500)$conf.int.

Question 2

Sample Size for a Proportion

A researcher wants to estimate the proportion of households that recycle, with a margin of error of 3 percentage points at the 95% confidence level.

  1. Find the required sample size when no prior estimate of p is available, so \hat{p}=0.5.
  2. Find the required sample size when a previous study reported \hat{p}=0.78.
  3. Always round up with ceiling(). Explain in one sentence why rounding down is not acceptable.

Question 3

Confidence Interval for a Variance

A sample of 20 batteries has a standard deviation of 6.4 hours of life. The population is normally distributed.

  1. Find the two chi-square values for a 95% confidence level with qchisq() and d.f.=n-1.
  2. Report the 95% confidence interval for \sigma^2.
  3. Report the 95% confidence interval for \sigma.