\magnification=\magstep1
\def\Ybar{\overline{Y}}
\def\phat{\widehat{p}}
\def\that{{\widehat{\theta}}}
\def\se{{\sigma_\that}}
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions -- Problem Set 7}
\centerline{April 5, 2004}
\bigskip
\noindent
10.29/From problem 10.9, we have a lower tail $Z$-test with
$z = {\Ybar - 130\over 2.1/\sqrt{40}}$, so the rejection 
region is $\{z : z < -z_{.05}\} = \{z < - 1.645\}$, or 
$\{\Ybar < 130 - 1.644(2.1)/\sqrt{40} = 129.45\}$.  The 
desired Type II error probability is 
$$\eqalign{
\beta &= P(\Ybar \notin RR | \mu = 128)\cr
&= P(\Ybar > 129.45 | \mu = 128)\cr
&= P\left({\Ybar - 128\over 2.1/\sqrt{40}} > {129.45 - 128\over 2.1/\sqrt{40}}\right)\cr
&= P(z > 4.37)\cr
&< .0000317\cr}$$
(from the closest entry in the standard normal table).  Hence,
$\beta$ is ``approximately zero''.
\bigskip
\noindent
10.30/From problem 10.23, we have an $\alpha = .05$ upper tail $Z$-test with
rejection region (described in terms of $\phat_1 - \phat_2$):
$$\{\phat_1 - \phat_2 > 1.645\sqrt{{p_1q_1\over n} + {p_2q_2\over n}}\}$$
To get $\beta \le .2$, given that $p_1 - p_2 = .1$,
we want to choose $n$ so that 
$$\eqalign{\beta=.2 
&= P(\phat_1 - \phat_2 \notin RR | p_1 - p_2 =.1)\cr
&=P\left({\phat_1-\phat_2 - .1\over \sqrt{{p_1q_1\over n} + {p_2q_2\over n}}}
< {1.645 \sqrt{{p_1q_1\over n} + {p_2q_2\over n}} - .1\over \sqrt{{p_1q_1\over n} + {p_2q_2\over n}}}\right)\cr
&= P\left(z < {1.645 \sqrt{{p_1q_1\over n} + {p_2q_2\over n}} - .1\over \sqrt{{p_1q_1\over n} + {p_2q_2\over n}}}\right)\cr}$$
This implies
$${1.645 \sqrt{{p_1q_1\over n} + {p_2q_2\over n}} - .1\over \sqrt{{p_1q_1\over n} + {p_2q_2\over n}}}
=-z_{.2} \doteq -.84$$
So after some algebra isolating $n$:
$$\sqrt{n} = 10(2.485)\sqrt{p_1q_1 + p_2q_2}$$
At the risk of possibly taking $n$ larger than necessary in some
cases, we can replace $p_iq_i$ on the right by $.25$, which is the
maximum value of $pq = p(1-p)$ as per the hint:
$$\sqrt{n} \le 24.58 \sqrt{.5} \Rightarrow n \le 308.76$$
Hence $n = 309$ or so will work for any $p_1$ and $p_2$
with $p_1 - p_2 = .1$.  (Note: depending on how you round in 
the computations here, the answer can vary a bit.)
\bigskip
\noindent
10.33/a)  This is an upper-tail $Z$-test for the difference of the 
means.  The test statistic is:
$$z = {32.19 - 31.68\over \sqrt{{(4.34)^2\over 37} + {(4.56)^2\over 37}}} 
={.51\over 1.035} \doteq .493$$
The rejection region for the test with $\alpha = .05$ is 
$RR = \{z > 1.645\}$, or $\{\Ybar_1 - \Ybar_2 > (1.645)(1.035) = 1.702\}$.
Since $z = .493 \notin RR$, we cannot
reject the null hypothesis from this information.
\bigskip
\noindent
b)  Now, assuming that $\mu_1 - \mu_2 = 3$, 
$$\eqalign{
\beta &=P(z \notin RR | \mu_1 - \mu_2 = 3)\cr
      &=P(\Ybar_1 - \Ybar_2 < 1.702 |\mu_1 - \mu_2 = 3)\cr
      &=P\left({\Ybar_1 - \Ybar_2 - 3\over 1.035} < {1.702 - 3\over 1.035}\right)\cr
      &=P(z <  -1.254)\cr
      &=.1056\cr}$$
\bigskip
\noindent
10.34/Continuing from 33, we want to determine $n$ so that
$\alpha = \beta = .05$ if $\mu_1 - \mu_2 = 3$ (and we use the
variance estimates as before).  The rejection region for
a level $\alpha$ test should be:
$$\{z : z > z_{.05}=1.645\}\ \Leftrightarrow\ 
\{\Ybar_1 - \Ybar_2 > (1.645)\sqrt{{(4.34)^2\over n} + {(4.56)^2\over n}} 
= {10.356\over\sqrt{n}}\}.$$
So we want
$$\eqalign{
.05 = \beta &= P(\Ybar_1 - \Ybar_2 \notin RR | \mu_1 - \mu_2 = 3)\cr
&=P\left(z < {{10.356\over\sqrt{n}} - 3\over {6.295\over\sqrt{n}}}\right)\cr
&=P\left(z < {10.356 - 3\sqrt{n}\over 6.295}\right)\cr}$$
This says 
$${10.356 - 3\sqrt{n}\over 6.295} = -z_{.05} = -1.645$$
so 
$$\sqrt{n} = (2)(10.356)/3 \Rightarrow n = 47.7$$
Hence $n = 48$ will suffice.
\bigskip
\noindent
10.36/We have
$$\eqalign{{\that - \theta_0\over\se} > z_\alpha &\Rightarrow 
\that - \theta_0 > z_\alpha\se\cr
&\Rightarrow \that > \theta_0 + z_\alpha\se\cr}$$
This is exactly the formula for the $(1-\alpha)\times 100\%$
upper confidence bound (see page 386).
\bigskip
\noindent
10.38/We have
$$\eqalign{ {\that - \theta_0\over\se} < -z_\alpha &\Rightarrow 
\that - \theta_0 < -z_\alpha\se\cr
&\Rightarrow \that < \theta_0 - z_\alpha\se\cr}$$
This is exactly the formula for the $(1-\alpha)\times 100\%$
lower confidence bound (see page 386).
\bigskip
\noindent
10.41/For the two-tailed $Z$-test, our test statistic is
$$z = {74-71\over \sqrt{9^2/50+10^2/50}} = 1.5768 \doteq z_{.0571}.$$
To find the $p$-value of the test, 
we see that $.0571$ is $\alpha/2$ from the 2-tail test rejection region
formula.  The smallest $\alpha$ for which $z \in RR$
is $\alpha = 2(.0571) = .1142$, so $p = .1142$.
\bigskip
\noindent
10.43 a)  For this lower-tail $Z$-test,
$$z = {3.6-3.8\over 1.1/\sqrt{30}} = -.9959$$
This is approximately $-z_{.1587}$, so the $p$-value for the 
test is $.1587$.
b)  There is not enough evidence to reject the null hypothesis 
at that level.
c)  From the FVC data for the women,
$$z = {2.7-3.1\over 1.2/\sqrt{30}} = -1.83$$
This is approximately $-z_{.0336}$, so the $p$-value this
time is $p = .0336$.
d)  There is sufficient evidence to reject the null hypothesis 
for the women.
\bigskip
\noindent
10.51/Since $n = 5$ (small sample case), we use a lower-tail $T$-test.
From the data, $S^2 = 69.5$, and $\Ybar = 795$ so
$$t = {795-800\over S/\sqrt{5}} = -1.3406$$
From the $t$-table in the text (with $n-1 = 4$ degrees of freedom), 
$-t_{.05}(4) = -2.132$.  There is not sufficient evidence to 
reject $H_0$ ($\mu = 800$).  The $p$-value of the test is $>.1$,
since $-t_{.1}(4) = -1.533$ is the nearest tabulated value.
\bigskip
\noindent
10.53 a)  From the data, $\Ybar = 39.65$ and 
$S^2 \doteq 51.51$.  Since $n = 18$, this also calls for 
a lower-tail $T$-test.  
$$t = {39.56 - 45 \over 7.18/\sqrt{18}} \doteq -3.2145$$
From the book's $t$-table, $t_{.005} = 2.898$, so 
we can say that the $p$-value of the test is $p < .005$.
This is very convincing evidence to reject the null hypothesis
and conclude that the average tax per gallon was less that $\$0.45$ 
\bigskip
\noindent
b)  The $95\%$ confidence interval is
$$39.56 \pm t_{.025}(17){7.18\over \sqrt{18}} \doteq 39.56 \pm 3.55$$
This is consistent with the conclusion in part a:  $45$ is not contained
in this interval.
\bye

