\documentclass[a4paper,12pt]{article}
\usepackage{epsfig}
\begin{document}
\parindent=0pt

QUESTION The body-work of four-year old cars was compared for two
different models.  Of 20 cars of the first model, 9 showed a
considerable degree of rusting, whereas only 6 out of the 25 of
the second model did so.  Is there any evidence that the finish of
the second model is superior to that of the first?

ANSWER

\begin{tabular}{ccc}
  &n&rust\\
  Model 1&20&9\\
  model 2&25&6\\
  Total&45&15
  \end{tabular}

  $H_0: p_1=p_2\ \ H_1=p_1>p_2\ \ \alpha=5\%$

  Test2, single proportion $\hat{p}=\frac{15}{45}=\frac{1}{3}\ \
  \hat{q}=\frac{2}{3}\ \ \frac{20}{3}>5$ hence
  $\begin{array}{cc}n_1&\hat{p}\\n_2 &\hat{q}\end{array}>5\\
  z=\frac{\frac{r_1}{n_1}-\frac{r_2}{n_2}}{\sqrt{\hat{p}\hat{q}(
  \frac{1}{n_1}+\frac{1}{n_2})}}
  \sim N(0,1)\\
  z=\frac{\frac{9}{20}-\frac{6}{25}}{\sqrt{\frac{1}{3}\times
  \frac{2}{3}(\frac{1}{20}+\frac{1}{25})}}=1.48$

  $\begin{array}{l}
  \textrm{Hence }z \textrm{is not significant}\\
  \textrm{accept }H_0:P_1=P_2.
  \end{array}
   \ \ \
  \begin{array}{c}
  \epsfig{file=641-5-3.eps, width=60mm}
  \end{array}$

\end{document}
