\magnification=\magstep1
\overfullrule=0pt
\def\dd{\partial}
\def\pd#1#2{{\dd #1 \over \dd #2}}
\def\wh#1{{\widehat{#1}}}
\def\bar#1{{\overline{#1}}}
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 1}
\centerline{February 4, 2010}
\bigskip
\noindent
7.10/  Since each $Y_i \sim N(\mu,\sigma^2)$, the mean of 
$Y_1,\ldots, Y_n$ is $\overline{Y} \sim N(\mu,\sigma^2/n)$,
and $Z = \sqrt{n} (\overline{Y} - \mu)/\sigma$ has an $N(0,1)$
distribution (standard normal).  
\item{a)} With $n = 9$,
$$P(\mu - .3 < \overline{Y} < \mu + .3) = P(-.45 < Z < .45) = 1 - 2(.3264) = .3472$$
\item{b)}  
$$\eqalign{
n = 25\ &P(-.75 < Z < .75) = 1 - 2(.2266) = .5468\cr
n = 36\ &P(-.9 < Z < .9) = 1 - 2(.1841) = .6318\cr
n = 49\ &P(-1.05 < Z < 1.05) = 1 - 2(.1469) = .7062\cr
n = 64\ &P(-1.2 < Z < 1.2) = 1 - 2(.1151) = .7698\cr}$$
\item{c)}  They increase as $n$ increases.
\item{d)}  The probabilities in this question are smaller
and increase more slowly than those in 7.1.
\bigskip
\noindent
7.13/  We have $P(|\overline{Y} - \mu| < .5) = $
$$P\left(-.5\sqrt{10/.4} < {\overline{Y} - \mu\over \sqrt{.4/10}} < .5\sqrt{10/.4}\right)
= P(-2.5 < Z < 2.5) = 1 - 2(.0062) = .9876.$$
\bigskip
\noindent
7.14/  To get $P(-.5 \sqrt{n/.4} < Z < .5 \sqrt{n/.4}) = .95$, from the 
standard normal table, take $.5 \sqrt{n/.4} = 1.96$, so $n = 4(.4)(1.96)^2 \doteq 6.15$.
Since $n$ must be an integer, any $n \ge 7$ will do.  
\bigskip
\noindent
7.15/  a)  
$E(\overline{X}-\overline{Y}) = E(\overline{X})-E(\overline{Y}) = \mu_1 - \mu_2$ by 
results from last semester.  

b)  Similarly, because the samples are independent,
$$V(\overline{X} - \overline{Y}) = V(\overline{X}) + (-1)^2 V(\overline{Y}) =
{\sigma_1^2\over m} + {\sigma_2^2\over n}.$$

c)  With $m = n$, we want
$$1.96 = 1/\sqrt{{\sigma_1^2\over n} + {\sigma_2^2\over n}}  = \sqrt{n}/\sqrt{4.5},$$
so $n = 17.29$, or $n \ge 18$.  
\bigskip
\noindent
7.16/  With $m = n = 10$ and $\sigma_1^2 = .4$, $\sigma_2^2 = .8$, 
$$P(\overline{X}-\overline{Y} \ge 1) = 
P\left({(\overline{X}-\overline{Y}) - (\mu_1-\mu_2)\over \sqrt{\sigma_1^2/n+\sigma_2^2/n}} \ge
\sqrt{n}/\sqrt{\sigma_1^2+\sigma_2^2}\right) = 
P(Z > 2.886) = .0019.$$
\bigskip
\noindent
7.21/  a)  If $S^2$ is the sample variance, then by the results in \S 7.2, 
${19S^2\over 1.4}$ has a $\chi^2(19)$ distribution, and 
$$P(S^2 \le b) = P\left({19 S^2\over 1.4} \le {19 b\over 1.4}\right) = .975$$
From the $\chi^2$ table, this means that ${19 b\over 1.4} = \chi^2_{.025}(10) = 32.8523$,
and $b = 2.420$.  

b)  Similarly if 
$$P(S^2 \ge a) = P\left({19 S^2\over 1.4} \ge {19 a\over 1.4}\right) = .975$$
From the $\chi^2$ table, this means that ${19 a\over 1.4} = \chi^2_{.975}(10) = 8.90655$,
and $a = .65627$.

c)  By basic rules for probability, $P(a \le S \le b) = 1 - (.025) - (.025) = .95$.  
\bigskip
\noindent
7.30/  Since $Z$ is standard normal, $E(Z) = 0$ and $E(Z^2) = 1$.  
(i)  By independence of $Z$ and $Y$, Theorem 5.9 applies, and 
$E(T) = E(Z)E(1/\sqrt{Y/\nu}) = 0\cdot E(1/\sqrt{Y/\nu}) = 0$.
(ii)  Similarly, $E(T^2) = E(Z^2)E(1/(Y/\nu)) = 1\cdot \nu \cdot E(1/Y)$.  
Since $\nu > 2$, using the formula for the expected values of powers
of $Y$ given in the problem,
$$E(1/Y) = E(Y^{-1}) = {\Gamma(\nu/2 - 1)\over \Gamma(\nu/2)}\cdot {1\over 2}$$
By the functional equation for the gamma function 
(i.e. $\Gamma(1 + x) = x\Gamma(x)$
from last semester), if $x = \nu/2 - 1$, then
$\Gamma(\nu/2 - 1)/\Gamma(\nu/2) = {1\over \nu/2 - 1}$.  
This gives 
$$E(1/Y) = {\nu\over 2(\nu/2 - 1)} = {\nu\over\nu -2}.$$
Then
$$V(T) = E(T^2) - E(T)^2 = {\nu\over \nu - 2},$$
since $E(T) = 0$.
\bigskip
\noindent
7.37/  a)  $\chi^2(5)$ distribution by Theorem 7.2.  b)  $\chi^2(4)$
distribution by Theorem 7.3.  c)   $\chi^2(5)$ by part b and Theorem 7.2
\bigskip
\noindent
7.38/  a)  $t(5)$ distribution by definition.  b)  
$$2Y_6/\sqrt{U} = Y_6/\sqrt{U/4}$$ a standard normal, 
divided by the square root of a $\chi^2(4)$ over its number
of degrees of freedom.  This is $t(4)$ by definition.
c)  $\overline{Y}$ is $N(0,1/\sqrt{5})$, so $\sqrt{5}\cdot  \overline{Y}$
is $N(0,1)$.  Hence
$$2(5\overline{Y}^2 + Y_6^2)/U = {((\sqrt{5}\cdot \overline{Y})^2 + Y_6^2)/2)\over(U/4)}$$
is the quotient of two $\chi^2$'s, each divided by its number of degrees of freedom.
By definition, this has an $F(2,4)$ distribution.
\bigskip
\noindent
8.6/ a)  Since $\widehat{\theta_1}, \widehat{\theta_2}$ are unbiased,
$$E(\widehat{\theta_3}) = aE(\widehat{\theta_1}) + (1-a) \widehat{\theta_2}
= a\theta + (1-a)\theta = \theta$$
This shows $\widehat{\theta_3}$ is also unbiased.

b)  Since we are given $\widehat{\theta_1},\widehat{\theta_2}$ are
independent,
$$V(\widehat{\theta_3}) = a^2 V(\widehat{\theta_1}) + (1-a)^2 V(\widehat{\theta_2})$$
To find the minimum, we apply optimization techniques from one-variable
calculus -- differentiate with respect to $a$ and set equal zero to 
find the critical points, etc.:
$$0 = {d\over da} (a^2 \sigma_1^2 + (1-a)^2 \sigma_2^2) = 2a \sigma_1^2 - 2(1-a)\sigma_2^2$$
when
$a = {\sigma_1^2\over \sigma_1^2 + \sigma_2^2}$.  This is a minimum 
by the second derivative test since 
$${d^2\over da^2} (a^2 \sigma_1^2 + (1-a)^2 \sigma_2^2) =  2\sigma_1^2 + 2\sigma_2^2 > 0.$$
\bigskip
\noindent
8.8/ a)  $\widehat{\theta_1}$ is unbiased since $E(\widehat{\theta_1}) = \theta$.
$\widehat{\theta_2}$ is unbiased since $E(\widehat{\theta_2}) = \theta/2 + \theta/2 = \theta$.
$\widehat{\theta_3}$ is unbiased since $E(\widehat{\theta_3}) = \theta/3 + 2\theta/3 = \theta$.
$\widehat{\theta_5}$ is unbiased since $E(\widehat{\theta_5}) = \theta/3 + \theta/3 + \theta/3 = \theta$.

For $\widehat{\theta_4}$, we need to use the formulas for the pdfs of the
order statistics that we saw in class.  We have
$$f(y) = 3(1 - (1 - e^{y/\theta}))^2 e^{y/\theta}/\theta = {3\over \theta} e^{-3y/\theta}.$$
Hence we can recognize that $\widehat{\theta_4}$ also has an
exponential distribution, but with parameter $\theta/3$.  
Hence $E(\widehat{\theta_4}) = \theta/3$
so $\widehat{\theta_4}$ is a biased estimator for $\theta$.  
b)  By standard facts for variances (note samples are independent!)
$$\eqalign{
V(\widehat{\theta_1}) &= \theta^2\cr
V(\widehat{\theta_2}) &= \left({1\over 2}\right)^2 \theta^2 + \left({1\over 2}\right)^2 \theta^2 = {\theta^2\over 2}\cr
V(\widehat{\theta_3}) &= \left({1\over 3}\right)^2 \theta^2 + \left({2\over 3}\right)^2 \theta^2 = {5\theta^2\over 9}\cr
V(\widehat{\theta_5}) &= 3\cdot \left({1\over 3}\right)^2 \theta^2 = {\theta^2\over 3}\cr}$$
(General patterns:  For a fixed $n$, the usual mean gives a lower 
variance than any other weighted average; the variance decreases with $n$
for the usual mean.)
\bigskip
\noindent
8.10/a)  The mean $\overline{Y}$ is one such estimator since
$$E(\overline{Y}) = {1\over n}(E(Y_1) + \cdots E(Y_n)) = {1\over n}\cdot n\lambda = \lambda.$$
b)  $C = Y^2 + 3Y$, so 
$$E(C) = E(Y^2) + 3E(Y) = V(Y) + E(Y)^2 + 3E(Y) = 
(\lambda + \lambda^2) + 3\lambda = \lambda^2 + 4\lambda.$$
c)  We have $E(\overline{Y}^2) = \lambda^2 + \lambda/n$.  So
one unbiased estimator for $C$ is 
$$\overline{C} = \overline{Y}^2 + \left(4 - {1\over n}\right)\overline{Y}$$
because 
$$E(\overline{C}) = \lambda^2 + \lambda/n + \left(4 - {1\over n}\right) \lambda = \lambda^2 + 4\lambda.$$
\bigskip
\noindent
8.12/a) $E(\overline{Y}) = {\theta + 1\ + \theta\over 2} = \theta + {1\over 2}$,
(so $\overline{Y}$ is a biased estimator for $\theta$).
b)  The bias is $B(\overline{Y}) = 1/2$.  $\overline{Y} - 1/2$
gives an unbiased estimator for $\theta$.  c)  Using the formula on page
367:
$$MSE(\overline{Y}) = V(\overline{Y}) + B(\overline{Y})^2 = {1\over 12n} + {1\over 4}$$
Note that with the interval $[\theta,\theta+1]$, the 
formula for $V(Y)$ for a uniform $Y$ gives $V(Y) = 1/12$.  But
we want the variance of the sample mean,
$$V(\overline{Y}) = {1\over n^2}\cdot n \cdot {1\over 12} = {1\over 12n}.$$
\bigskip
\noindent
8.13 a)  Using 
$$\widehat{v} = n\cdot {Y\over n}\cdot \left(1 - {Y\over n}\right) = Y - {1\over n}Y^2$$
as estimator for the variance $npq$ of a binomial random variable, 
$$E(\widehat{v}) = E(Y) - {1\over n}E(Y^2) = np - {1\over n}(npq + n^2p^2)
= npq - pq = (n-1)pq$$
This is biased, since $V(Y) = npq$.  But b) -- if we use 
$$\widehat{v_1} = 
{n^2\over n-1}{Y\over n}\left(1 - {Y\over n}\right)$$
then we get an unbiased estimator.

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 2}
\centerline{February 11, 2010}
\bigskip
\noindent
8.22/  The estimator value is $\widehat{\mu} = \overline{x} = 7.2$.
The $2\sigma$ bound is $2 {s\over \sqrt{n}} = 2{5.6\over 200} \doteq .79$.
(Note that even though the data are given as percents -- a form
of proportion -- the target parameter is a {\it mean}, and the 
${s\over \sqrt{n}}$ formula for the standard error is used.)

\bigskip
\noindent
8.23/a) (Mean case) Estimator:  $\widehat{\mu} = 11.3$.  Error bound:
We use the sample variance to estimate the population variance $\sigma$:
$2{s\over \sqrt{n}} = 2{16.6\over \sqrt{467}} \doteq 1.54$.  

\bigskip
b)  (Difference of means case) Estimator:  $\widehat{\mu_C - \mu_R} = 46.4 - 45.1 = 1.3$.   
Error bound: We use the sample variances to estimate
the population variances: $2 \sqrt{{\sigma_1^2\over n_1} + {\sigma_2^2\over n_2}}
\doteq 2\sqrt{{(10.2)^2\over 467} + {(9.8)^2\over 191}} \doteq 1.7$.
(Note the interval $[1.3 - 1.7, 1.3 + 1.7]$ contains both positive
and negative values.  This means the evidence does not 
support the conclusion $\mu_C - \mu_R > 0$.)

\bigskip
c) (Difference of proportions case) Estimator:  $\widehat{p_C - p_R} = .78 - .61 = .17$.  
Error bound:  We use the sample proportions to 
estimate $p_i$:   $2\sqrt{{p_1q_1 \over n_1} + {p_2q_2\over n_2}} 
\doteq \sqrt{{(.78)(.22)\over 467} + {(.61)(.39)\over 191}} \doteq .08$.
(This time, the interval $[.17-.08, .17+.08]$ contains only 
positive values, so evidence indicates $p_C > p_R$.)

\bigskip
\noindent
8.24/ (Proportion case) Estimator: $\widehat{p} =  .69$.  The $2\hat{\sigma}$ 
error bound in this case is
$2\sqrt{{(.69)(.31)\over 1001}} \doteq .029$, which explains the $3\%$
sampling error reported.  Since $.69 - .3 = .66$ is still (much) larger
than $.5$, yes, we can conclude that a majority of the individuals
in the 18$+$ age group thought that the cost of gasoline was a crisis
or major problem.  

\bigskip
\noindent
8.25/ (Difference of means case) (a) Estimator:  $\widehat{\mu_2 - \mu_1}
= 3.1 - 2.4 = .7$.
(b) Error bound:  $2\sqrt{{1.44\over 100} + {2.64\over 100}} \doteq .404$.


\bigskip
\noindent
8.32/ Estimate for the total accounts receivable $T$ 
is $\widehat{T} = 500\overline{Y} = 500 (197.1) = 98,550$.  Using
the sample variance $s^2 = {1\over 19}\sum_{i=1}^{20} (Y_i - \overline{Y})^2
\doteq 8255.04$ to estimate the population variance, and
$s = \sqrt{8255.04} \doteq 90.86$, the 2 standard error bound
{\it for the total} is 
$$2\cdot 500\cdot {90.86\over \sqrt{20}} \doteq 20316.30$$
For the mean account value (not the total), we use 
the 2 standard error bound
$$2\cdot {90.86\over \sqrt{20}} \doteq 40.63$$
Since $197.1 + 40.63 = 237.7 < 250$, it unlikely that
the average account value is as large as 250.

\bigskip
\noindent
8.33/ Estimator $\widehat{p} = {6\over 20} = .3$.  Error bound:
$2\sqrt{{(.3)(.7)\over 20}} \doteq .205$.  The interval
$[.3 - .205,.3+.205]$ does include $.2 = 1 - .8$, so 20\% not
in compliance, or 80\% in compliance is
a possible value based on this evidence.  (You could also
look at the interval $.7 \pm .205$ for the proportion of 
accounts that do comply.)

\bigskip
\noindent
8.34/  For the Poisson random variables, $E(Y) = V(Y) = \lambda$.
This says that if we have samples $Y_1, \ldots, Y_n$ from 
a Poisson distribution, then a reasonable estimator for $\lambda$
is $\widehat{\lambda} = \overline{Y}$.  (It's unbiased if nothing
else!)   Then
$V(\overline{Y}) = {\lambda \over n}$, so the standard
error is $\sigma_{\overline{Y}}
\doteq \sqrt{{\lambda\over n}}$.  But of course, the exact 
value of $\lambda$ is what we're trying to estimate by sampling -- 
we don't know it.  So we estimate the standard error by 
replacing the $\lambda$ with $\overline{Y}$:
$$\sigma_{\overline{Y}} \doteq \sqrt{{\overline{Y}\over n}}$$
(This is not an exact equality; it's an approximation that is 
used in this situation.)

\bigskip
\noindent
8.36/ For the exponential case, $\mu = \theta$, and $\sigma^2 = \theta^2$.
 Estimator $\widehat{\theta} = \overline{Y} = 1020$.  
Error bound:  $2\sigma_{\widehat{\theta}} \doteq 2 {\overline{Y}\over \sqrt{n}}$.

\bigskip
\noindent
8.40/ a)  For a normal $Y$ with $\sigma^2 = 1$, 
$Y - \mu$ has a known ($N(0,1)$ distribution) so it 
can be used as a pivotal quantity:
$P(-a < Y - \mu < a) = P(Y - a < \mu < Y + a) = .95$ when 
$a = z_{0.25} = 1.96$ (from the standard normal table).  The interval is 
$[Y - 1.96, Y + 1.96]$.

b)  $P(\mu < a) = .95$ when $P(Y - \mu > Y - a) = .95$, so 
$Y - a = -1.645$, and $a = Y + 1.645$.  The interval is
$(-\infty, Y + 1.645]$.

c)  $P(\mu > a) =.95$ when $P(Y - \mu < Y - a) = .95$,
so $Y - a = 1.645$, and $a = Y - 1.645$.  Interval is
$[Y - 1.645, +\infty)$.

\bigskip
\noindent
8.41/ a)  ${\overline{Y}^2\over \sigma^2}$ has a $\chi^2$ distribution
with $\nu = 1$ degree of freedom.  So from the $\chi^2$ table,
$$.95 = P\left(\chi^2_{.975}(1) < {Y^2\over \sigma^2}
< \chi^2_{.025}(1)\right) = P(.0009821 < {Y^2\over \sigma^2} < 5.02389)$$
Now invert and multiply through by $Y^2$:
$$= P(.1990 Y^2 < \sigma^2 < 1018.2 Y^2).$$

b)  Similarly,
$$.95 = P\left(\chi^2_{.95}(1) < {Y^2\over \sigma^2}\right)
= P\left(\sigma^2 < {Y^2\over \chi^2_{.95}(1)}\right) = P(\sigma^2 < 254.32 Y^2)$$

c)  Similarly again,
$$.95 = P\left({Y^2\over \sigma^2} < \chi^2_{.05}(1)\right)
= P\left(\sigma^2 > {Y^2\over \chi^2_{.05}(1)}\right) = P(\sigma^2 > .2603 Y^2)$$

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 3}
\centerline{February 18, 2010}
\bigskip
\noindent
8.58/From the standard normal table, $z_{.025} = 1.96$.  So the interval is
$$5.4 \pm (1.96) \cdot {3.1 \over \sqrt{500}} = 5.4 \pm .27.$$

\bigskip
\noindent
8.59/(a)  From the standard normal table, $z_{.05} \doteq 1.645$.  So 
the interval is $.78 \pm 1.645\sqrt{(.78)(.22)\over 1030} = .78 \pm .021$.

(b)  Since the whole confidence interval is in the range $p > .75$, yes,
it is very likely that more than $75\%$ of the ``tweens'' enjoy ads
that are silly in nature.  

\bigskip
\noindent
8.61/ (two-sided $95\%$ confidence interval for a difference of means):
$\widehat{\mu_1 - \mu_2} = 167.1 - 140.9 = 26.2$.  Then interval is
$$\left[26.2 - (1.96)\sqrt{{(24.3)^2\over 30} + {(17.6)^2\over 30}}, 
26.2 + (1.96)\sqrt{{(24.3)^2\over 30} + {(17.6)^2\over 30}}\right]
=[15.46,36.94].$$
(Note that the interval contains only positive numbers.  This indicates
that the evidence supports the conclusion that $\mu_1 > \mu_2$ pretty strongly.)

\bigskip
\noindent
8.62/(a) From the standard normal table, $z_{.005} \doteq 2.575$.  So the interval
is 
$$24.8 - 21.3 \pm 2.575\sqrt{{(7.1)^2\over 33} + {(8.1)^2\over 41}} =  3.5 \pm 4.52.$$

(b)  Since the interval contains both positive and negative numbers, there is
not sufficient evidence to conclude that the normal males have longer time
to molt than the ``split'' males.  
\bigskip
\noindent
8.63/(a) From the standard normal table, $z_{.025} = 1.96$.  So the interval is
$$.78 \pm (1.96) \cdot \sqrt{(.78)(.22) \over 1000} = .78 \pm 0.026.$$

(b) Although $.031$ is rather close to $.026$, there is a problem with
the error reported in the study.  There are no real solutions of the equation
$$1.96\sqrt{p(1-p)\over 1000} = .031(!)$$
But $p = .5$ gives something quite close.  Since $p = .5$ maximizes
the standard error in this case, the authors of the study were probably
just being conservative in reporting the estimation error.

\bigskip
\noindent
8.64/(a)  From the standard normal table, $z_{.01} \doteq 2.33$.  So
the interval is
$$.77 - .35 \pm 2.33 \sqrt{{(.77)(.23)\over 150} + {(.35)(.65)\over 340}} = .42 \pm .100.$$

(b) Since the confidence interval is $(.32,.52)$, it is not likely
that the difference is as big as $.6$.  

\bigskip
\noindent
8.65/(a) The confidence interval for the difference of 
proportions of defectives is 
$$
.18 - .12 \pm 2.33\sqrt{{(.18)(.82)\over 100} + {(.12)(.88)\over 100}} = .06 \pm .117.
$$

(b)  No -- the confidence interval contains both positive and negative values, 
so there is not enough evidence to say that either line produces more defectives.  

\bigskip
\noindent
8.66/(a)  The $90\%$ CI for the mean posttest score for the BACC students is
$$18.50 \pm 1.645 \cdot {8.03\over \sqrt{365}} = 18.50 \pm .691.$$

(b)  The $95\%$ CI for the difference between the mean posttest scores for BACC
and traditionally-taught students is:
$$18.50 - 16.50 \pm 1.96 \cdot \sqrt{{(8.03)^2\over 365} + {(6.96)^2\over 298}} = 
2.0 \pm 1.14.$$

(c)  Yes.  The CI contains only positive values, so there is evidence
that the BACC students do better on the posttest than the traditionally-taught
students.

\bigskip 
\noindent
8.71/Using the $2\hat{\theta}$ error bound, we want to choose $n$ so
that 
$$2 \cdot {10\over \sqrt{n}} = 2,$$
so $n = 100$.  

\bigskip
\noindent
8.81/ Start by computing the sample mean and standard deviation:
$\overline{Y} = 60.8$ and $s = 7.969$.  Then since $n = 10$, we
must use the small sample
confidence interval:
$$60.8 \pm t_{.025}(9) {7.969\over \sqrt{10}} = 60.8 \pm (2.262)(2.52) = 
60.8 \pm 5.7 = [55.1, 66.5]$$

\bigskip
\noindent
8.82/ With $n = 20$, again the small-sample formulas are indicated:
a)  confidence interval for the SAT verbal scores:  
$$419 \pm t_{.05}(19) {57\over \sqrt{20}} = 419 \pm (1.729)(12.1746) = 
[396.96,441.04]$$
b)  This interval does include the national average $422$.  So that
number would be consistent with this data.  In other words, this data would
not support the conclusion that the national mean is different
from $422$.  (But it is also true that any other number in the 
interval would also be consistent at the $90\%$ confidence level.)    
c)  for the SAT math scores:
$$455 \pm (1.729) {69\over \sqrt{20}} = [428.32,481.68]$$
d)  Again the value $\mu = 474$ is in the interval, so it would
be consistent with the data.  In other words, this data would
not support the conclusion that the national mean is different
from $474$.  

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 4}
\centerline{February 25, 2010}
\bigskip
\noindent
Extra problem: 1) By definition, if $Y$ has an $F(m,n)$ distribution,
then $1/Y$ has an $F(n,m)$ distribution -- the number of degrees
of freedom in the numerator and denominator get switched.  So
$$\eqalign{ &\ P(Y \ge f_\alpha(m,n)) = \alpha\cr  
            \Leftrightarrow &\ P\left(1/Y \le {1\over f_\alpha(m,n)}\right) = \alpha\cr
            \Leftrightarrow &\ P\left(1/Y \ge {1\over f_\alpha(m,n)}\right) = 1 - \alpha\cr}$$
So by the definition, 
$$f_{1-\alpha}(n,m) = {1\over f_\alpha(m,n)}.$$
(This says that the other percentage points for $F$ distributions 
can be obtained from the ones in the table by taking reciprocals,
and switching $m,n$, so 
that's why they are not given.)

2)  Using this observation,
$$f_{.99}(7,10) = {1\over f_{.01}(10,7)} = {1\over 6.62} \doteq .151.$$

\bigskip
\noindent
Text problems:

\bigskip
\noindent
8.88/Compute $\overline{Y} =  9$ and $s = 6.4244$ first.  With $n = 12$,
we need the small sample formula:
$$\overline{Y} \pm t_{.05}(11) {s\over\sqrt{n}} = 9 \pm (1.796){6.4244\over \sqrt{12}}
= 9 \pm 3.3308$$

\bigskip
\noindent
8.89/ a) We have $\overline{Y} = 3.57$, $s = 3.6692$ (the large value of 
$s$ comes because of the difference between the first data point and 
the other two(!)).  The $90\%$ confidence interval is
$$\overline{Y} \pm t_{.05}(2) {s\over \sqrt{3}}= 3.57 \pm (2.920){3.6692\over \sqrt{3}}
=3.57\pm 6.1858.$$
Since the quantity measured is a concentration, it cannot be
negative.  So you could also report this confidence
interval as $[0,9.75]$.

b)  (See comments at end).  For small sample confidence intervals for differences
of means, to get a pivotal quantity with a $t$-distribution, 
we have to assume that the subpopulation variances are the same.  
This means that the best estimator for the variance is a ``pooled''
estimator which lumps the two subpopulations together:
$$s_p^2 = {(n_1-1)s_1^2 + (n_2 - 1)s_2^2 \over (n_1 + n_2 - 2)} = 
{(11)(6.4244)^2 + (2)(3.6692)^2\over 13} \doteq 36.9945$$
So $s_p = 6.0823$.  Then the confidence interval for the difference
of the means is
$$(9 - 3.57) \pm t_{0.5}(13) s_p \sqrt{1/n_1 + 1/n_2} =
5.43 \pm (1.771)(6.0823)\sqrt{1/12 + 1/3} = [-1.52,12.38]$$
We are assuming the subpopulation variances are equal and 
the LC50 levels are normally distributed, independent, and the samples
are random.  

\bigskip
\noindent
8.96/  We have $s^2 \doteq 63.505$.  To derive the 
confidence interval for $\sigma^2$, we use the idea from 8.41 
on Problem Set 2:  ${(n-1)S^2\over \sigma^2}$ has a 
$\chi^2(n-1)$ distribution, so 
$$P\left({(n-1)S^2\over \chi^2_{\alpha/2}} \le \sigma^2 \le
{(n-1)S^2\over \chi^2_{1 - \alpha/2}}\right) = 1-\alpha$$
Here with $\alpha = .1$ and $n = 10$,
$${(9)(63.505)\over 16.919} \le \sigma^2 \le {(9)(63.505)\over 3.32511}$$
or $33.78 \le \sigma^2 \le 171.89$.  

\bigskip
\noindent
8.100/ We compute the sample standard deviation $s = 186.69$.
For a $99\%$ upper confidence bound on $\sigma$, we
proceed as in 8.37 from Problem Set 2 with $n = 20$:
$$P\left(\chi^2_{.99}(19) \le {(19)S^2\over \sigma^2}\right) = .99$$
so 
$$P\left(\sigma^2 \le {(19) S^2\over \chi^2_{.99}(19)}\right) = .99
\Leftrightarrow
P\left(\sigma \le {\sqrt{19}\cdot S\over \sqrt{\chi^2_{.99}(19)}}\right) = .99$$
We have
$${\sqrt{19}\cdot S\over \sqrt{\chi^2_{.99}(19)}} = {\sqrt{19}\cdot(186.69)\over \sqrt{7.63273}}
\doteq 294.549.$$

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 5}
\centerline{March 18, 2010}
\bigskip
\noindent
9.1/Using the results from Exercise 8.8 we have
$$\eqalign{
{\rm eff}(\widehat{\theta_1},\widehat{\theta_5}) &= {\theta^2/3\over \theta^2} = {1\over 3}\cr
{\rm eff}(\widehat{\theta_2},\widehat{\theta_5}) &= {\theta^2/3\over \theta^2/2} = {2\over 3}\cr
{\rm eff}(\widehat{\theta_3},\widehat{\theta_5}) &=  {\theta^2/3\over 5\theta^2/9} = {3\over 5}\cr
}$$
(In intuitive terms, this means that $\widehat{\theta_5}$ is the best of 
all -- three times as efficient as $\widehat{\theta_1}$, and so forth.)

\bigskip
\noindent 
9.2/ a)  All of these are weighted averages of the $Y_i$: linear combinations
$a_1Y_1 + \cdots + a_nY_n$ with $\sum a_i = 1$.  For any such weighted
average
$$E(a_1Y_1 + \cdots + a_nY_n) = a_1E(Y_1) + \cdots + a_nE(Y_n) = (a_1 + \cdots + a_n)\mu = \mu,$$
so this is an unbiased estimator for $\mu$. 
b)  Efficiency of $\widehat{\mu_3}$ relative to $ \widehat{\mu_1}$:
$${V(\widehat{\mu_3})\over V(\widehat{\mu_1})} = {{1\over 2}\sigma^2 \over {1\over n}\sigma^2} = {n \over 2}$$
(That is, the larger $n$ is, the more efficient $\widehat{\mu_3}$ is relative
to $\widehat{\mu_1}$.)  Efficiency of $\widehat{\mu_3}$ relative to $\widehat{\mu_2}$:
$${\rm eff}(\widehat{\mu_1},\widehat{\mu_3}) = {V(\widehat{\mu_3})\over V(\widehat{\mu_1})} = {\left(2\cdot {1\over 16} + (n-2)\cdot {1\over 4(n-2)^2}\right)\sigma^2 \over {1\over n}\sigma^2} 
= {n \over 8} + {n\over 4(n-2)}$$

\bigskip
\noindent
9.7/  By the given information $E(\widehat{\theta_1}) = \theta$ (unbiased),
and $\theta^2 = MSE(\widehat{\theta_1}) = V(\widehat{\theta_1}) + B(\widehat{\theta_1})^2 = 
V(\widehat{\theta_1})$.  By our general formulas,
$V(\widehat{\theta_2}) = n\cdot {1\over n^2}V(Y_i) = \theta^2/n$.  So
$${\rm eff}(\widehat{\theta_1},\widehat{\theta_2}) = {{1\over n}\theta^2\over \theta^2} = {1\over n}$$

\bigskip
\noindent
9.17/  First, the given estimator is unbiased, since
$$E(\overline{X} - \overline{Y}) = E(\overline{X}) - E(\overline{Y}) = \mu_1 - \mu_2.$$
Then 
$$V(\overline{X} - \overline{Y}) = V(\overline{X}) + V(\overline{Y}) = {\sigma_1^2\over n} + 
{\sigma_2^2\over n}.$$
This clearly $\to 0$ as $n \to \infty$.  Hence Theorem 9.1 applies and the family
of estimators is consistent.

\bigskip
\noindent
9.18/  We will use the fact that if $X_1,\ldots,X_n$ are a random sample from 
a normal $N(\mu,\sigma)$ population, then  
$${(n-1)S^2\over \sigma^2} \sim \chi^2(n-1).$$
Note that the given estimator for $\sigma^2$ is the {\it pooled estimator}
as in our small sample confidence interval formulas:
$$S = {(n-1)S_X^2 + (n-1)S_Y^2 \over 2(n-1)}.$$
Hence with the given information 
$$\eqalign{
E(S) &= {1\over 2(n-1)}E\left(\sigma^2 {(n-1)S_X^2\over \sigma^2} + {(n-1)S_Y^2\over\sigma^2}\right)\cr
&={1\over 2(n-1)}\left(E\left(\sigma^2 {(n-1)S_X^2\over \sigma^2}\right) + E\left(\sigma^2 {(n-1)S_Y^2\over\sigma^2}\right)\right)\cr
&={\sigma^2\over 2(n-1)}\left(E\left({(n-1)S_X^2\over \sigma^2}\right) + E\left({(n-1)S_Y^2\over\sigma^2}\right)\right)\cr
&={\sigma^2 \over 2(n-1)}((n-1) + (n-1))\cr
&= \sigma^2,}$$
using the formula for expected value of a $\chi^2$ random variable (see table inside
back cover of text!)   This shows that $S$ is an unbiased estimator for $\sigma$.  
Then, to apply Theorem 9.1, we need to know $V(S)$.  This is computed by the same
kind of $$\eqalign{
V(S) &= {1\over 4(n-1)^2}V\left(\sigma^2 {(n-1)S_X^2\over \sigma^2} + {(n-1)S_Y^2\over\sigma^2}\right)\cr
&={1\over 4(n-1)^2}\left(V\left(\sigma^2 {(n-1)S_X^2\over \sigma^2}\right) + V\left(\sigma^2{(n-1)S_Y^2\over\sigma^2}\right)\right)\cr
&={\sigma^4\over 4(n-1)^2}\left(V\left({(n-1)S_X^2\over \sigma^2}\right) + V\left({(n-1)S_Y^2\over\sigma^2}\right)\right)\cr
&={\sigma^4 \over 4(n-1)^2}(2(n-1) + 2(n-1))\cr
&= {\sigma^4\over n-1}}$$
by the formula for the variance of a $\chi^2$ random variable.  This tends to 0 as $n \to \infty$.
So the family of estimators given by $S$ (for increasing $n$) is consistent.  
\bigskip
\noindent
9.19/  We use the statement of Theorem 9.1 (or Example 9.2).  
$$E(\overline{Y}) = E(Y) = \int_0^1 y\cdot \theta y^{\theta - 1}\ dy
= {\theta \over \theta+1}$$
So $\overline{Y}$ is an unbiased estimator for ${\theta\over\theta + 1}$.
Then $V(\overline{Y}) = {1\over n} V(Y_i)$ and 
$$V(Y) = \int_0^1 y^2\cdot \theta y^{\theta-1}\ dy - \left({\theta\over \theta+1}\right)^2
= {\theta \over \theta+2} - \left({\theta\over \theta+1}\right)^2$$
is finite.  Hence $\lim_{n\to\infty} V(\overline{Y}) = 
\lim_{n\to\infty} {1\over n}V(Y_i) = 0.$
This shows that $\overline{Y}$ is a consistent estimator for
${\theta \over \theta + 1}$.   {\it Note:}  The same kind of argument will
show that $\overline{Y}$ is consistent, whenever it is unbiased and the 
variance of the underlying distribution (i.e. the variance of 
one of the samples) is {\it finite}.
\bigskip
\noindent
%9.42/We want to show that the factorization criterion from 
%Theorem 9.4 is satisfied.  Since $Y_i$ are geometric, the likelihood
%function can be written as follows:
%$$\eqalign{
%L(y_1,\ldots,y_n|p) &= (q^{y_1 - 1}p) \cdots (q^{y_n - 1}p)\cr
%&=(1-p)^{n(\overline{y}-1)}p^n\cr
%}$$
%This has the form $g(\overline{y},p)h(y_1,\ldots,y_n)$ (with $h = 1$).  
%Hence $\overline{y}$ is a sufficient statistic for estimation of $p$.
\bigskip
\noindent
9.43/  We want to show that the factorization criterion from 
Theorem 9.4 is satisfied. Writing $\pi = \prod_{i=1}^n y_i$, 
the likelihood function factors as follows (note that the problem 
says $\theta$ is {\it known}, so this is just a constant in 
the formula):
$$\eqalign{
L(y_1,\ldots,y_n|\alpha) &= \left({\alpha y_1^{\alpha - 1}\over \theta^\alpha}\right) \cdots  \left({\alpha y_n^{\alpha - 1}\over \theta^\alpha}\right)\cr
&= {\alpha^n\over \theta^{n\alpha}} \pi^{\alpha - 1}\cr
}$$
This has the form $g(\pi,\alpha)h(y_1,\ldots,y_n)$, where $h$ is the constant $1$ (this is 
OK, since the theorem just requires this factor to be independent of $\alpha$).
Hence $\pi$ is a sufficient statistic for estimation of $\alpha$.
\bigskip
\noindent
9.44/  We want to show that the factorization criterion from 
Theorem 9.4 is satisfied. Writing $\pi = \prod_{i=1}^n y_i$, 
the likelihood function factors as follows (note that the problem 
says $\theta$ is {\it known}, so this is just a constant in 
the formula):
$$\eqalign{
L(y_1,\ldots,y_n|\alpha) &= \left(\alpha\beta^\alpha y_1^{-\alpha - 1}\right) \cdots  \left(\alpha \beta^\alpha y_n^{-\alpha - 1}\right)\cr
&= {\alpha^n\beta^{n\alpha}} \pi^{-\alpha - 1}\cr
}$$
This has the form $g(\pi,\alpha)h(y_1,\ldots,y_n)$, where $h$ is the constant $1$ (this is 
OK, since the theorem just requires this factor to be independent of $\alpha$).
Hence $\pi$ is a sufficient statistic for estimation of $\alpha$.
\bigskip
\noindent
9.49/The factorization criterion from Theorem 9.4 is less convenient here, so
we can go back to the definition of sufficient statistics.  The conditional
density for the samples, given the value of the sample maximum is the ratio
$${\left({1\over \theta}\right)^n \over n(y/\theta)^{n-1}(1/\theta)} = {1\over ny^{n-1}}.$$
Since this is independent of $\theta$, it follows that the sample maximum
$Y_{(n)}$ is a sufficient statistic for $\theta$.  
 \vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 6}
\centerline{March 25, 2010}
\bigskip
\noindent
9.70/  Using the method of moments, use $\widehat{\lambda} = \overline{Y}$
(the sample mean).

\bigskip
\noindent
9.71/  The second moments about 0 are 
$$\mu_2' = E(Y^2) = \sigma^2 + \mu^2 = \sigma^2$$
(since it is given that $\mu = 0$), and 
$$m_2' = {1\over n}\sum_{i=1}^n Y_i^2$$
So, by the method of moments, use
$$\widehat{\sigma^2} = {1\over n}\sum_{i=1}^n Y_i^2.$$

\bigskip
\noindent
9.80/ a)  The likelihood function is 
$$L(y_1,\ldots,y_n|\lambda) = {e^{-\lambda} \lambda^{y_1}\over y_1!}\cdot\cdots\cdot 
{e^{-\lambda} \lambda^{y_n}\over y_n!} = {e^{-n\lambda}\lambda^{y_1 + \cdots + y_n}\over
y_1! \cdots y_n!}$$
To find the maximum likelihood estimator, we maximize $\ln(L)$:
$$\ln(L) = -\ln(y_1!\cdots y_n!) - n\lambda + (y_1+\cdots+y_n)\ln(\lambda)$$
{\it as a function of $\lambda$}.  The first term is constant
with respect to $\lambda$, so the derivative with respect to $\lambda$ is:
$${d\over d\lambda}(\ln(L)) = -n + {(y_1+\cdots+y_n)\over \lambda}$$
This is $=0$ when $\lambda = \widehat{\lambda} = \overline{Y} 
= (y_1 + \overline + y_n)/n$ (sample mean).  (We can also see
that the second derivative with respect to $\lambda$:
$${d^2\over d\lambda^2}(\ln(L)) = {-(y_1+\cdots+y_n)\over \lambda^2}$$
 is negative (since all $y_i \ge 0$ from a Poisson sample), 
so this is a maximum by the second derivative test

b)  $E(\widehat{\lambda}) = \lambda$, so this is an unbiased
estimator.  $V(\widehat{\lambda}) = {1\over n}\lambda$.

c)  Since $\widehat{\lambda}$ is unbiased and 
$\lim_{n\to\infty} V(\widehat{\lambda}) = \lim_{n\to\infty} {\lambda\over n} = 0$, 
the estimator is consistent (Theorem 9.1).  (See comment in solution for 9.13 above.)

d)  By the {\it invariance property} of MLE's (see discussion on page
452), the MLE for $P(Y = 0) = e^{-\lambda}$ is $e^{-\overline{Y}}$

\bigskip
\noindent
9.81/  The pdf is $f(y) = {e^{-y/\theta}\over\theta}$ for $y > 0$
and zero otherwise.  Hence the likelihood function is
$$L = {e^{-y_1/\theta}\over\theta} \cdot\cdots\cdot {e^{-y_n/\theta}\over\theta}
= {e^{-(y_1+\cdots+y_n)/\theta}\over \theta^n}$$
and 
$$\ln(L) = {-(y_1+\cdots+y_n)\over \theta} - n\ln(\theta)$$
So 
$${d\over d\theta}(\ln(L)) = {(y_1+\cdots+y_n)\over\theta^2} - {n\over\theta}$$
This is zero when $\theta = \widehat{\theta}_{ML} = (y_1+\cdots+y_n)/n = \overline{Y}$,
and when $\theta = \overline{Y}$,
$${d^2\over d\theta^2}(\ln(L)) = {-2(y_1+\cdots+y_n)\over\theta^3} + {n\over \theta^2}
= {-2n^4 + n^3 \over(\overline{Y})^2} < 0$$
for all $n \ge 1$, so we have a maximum of the likelihood
function by the second derivative test.     By
the invariance property, since $\sigma^2 = \theta^2$, which is a 
one-to-one function of $\theta \ge 0$, the maximum 
likelihood estimator for $\sigma^2$ is 
$$\widehat{\sigma^2}_{ML} = (\overline{Y})^2$$

\bigskip
\noindent
9.83/a)  We have $f(y) = {1\over 2\theta + 1}$ for $0 \le y \le 2\theta + 1$.
Note this says $2\theta + 1 > 0$, so $\theta > -1/2$.  This means
the likelihood function:
$$L(y_1,\ldots,y_n) = {1\over (2\theta + 1)^n}$$
is {\it strictly decreasing}  (there's a vertical asymptote of $L$
at $\theta = -1/2$, and the graph of $L$ tends to the horizontal
axis as $\theta$ increases.   In this case there are no critical 
points of $L$ and to maximize $L$ given the sample data, we have
to ask, what is the {\it biggest value of $L$ that is consistent
with the information in a sample $y_1,\ldots,y_n$?}  In other words,
what is the {\it smallest} value of $\theta$ (recall $L$ is decreasing!)
that is consistent with the samples?  The smallest value $\theta$
could have if we observe $y_1,\ldots,y_n$ uniform on the interval
$[0,2\theta + 1]$ is if $2\theta + 1 = y_{(n)}$ (the order statistic
giving the {\it maximum} of the sample values).  Hence
$$\widehat{\theta}_{ML} = {Y_{(n)} - 1\over 2}.$$

b)  By the invariance property, the MLE for $\sigma^2 = (2\theta + 1)^2/12$
is 
$$\widehat{\sigma^2}_{ML} ={(2\widehat{\theta}_{ML} + 1)^2\over 12} = {(Y_{(n)})^2\over 12}$$
\bigskip
\noindent
10.2/a)  A Type I error occurs if $p = .8$ (that is, $H_0$ is true), but
we observe 12 or fewer insomniacs for which the drug induces sleep,
so we reject $H_0$.
b)  
$$\alpha = P({\rm Type\ I\ error}) = \sum_{y=0}^{12} {20\choose y} (.8)^y (.2)^{20-y} \doteq .032$$
c)  A Type II error occurs if $p \ne .8$, but we observe
13 or more insomniacs for which the drug induces sleep,
so we do not reject $H_0$.

\noindent
d)  If $p = .6$, 
$$\beta = P({\rm Type\ II\ error}) = \sum_{y=13}^{20} {20\choose y} (.6)^y (.4)^{20-y} \doteq .416$$
e)
If $p = .4$,
$$\beta = P({\rm Type\ II\ error}) = \sum_{y=13}^{20} {20\choose y} (.4)^y (.6)^{20-y} \doteq .021$$
(Note -- as we might intuitively expect, here the probability of a
Type II error decreases as the probability gets farther away from 
the $H_0$ value of $.8$.) 

\bigskip
\noindent
10.5/  $Y_1,Y_2$ are independent and uniformly distributed on the interval
$(\theta,\theta+1)$.  In Test 1, we have the Type I error probability
$$\alpha = P({\rm reject}|H_0) = P(Y_1 > .95|\theta = 0) = .05.$$
Then in Test 2, we must pick $c$ to make $\alpha = .05$ in
that test as well.  Under the null hypothesis, the joint density of 
$Y_1,Y_2$ equals 1 on the unit square $(0,1) \times (0,1)$ and 
zero outside.  The lines $y_1 + y_2 = c$ have slope $-1$ and intersect
the square as long as $0 < c < 2$.  Since $c = 1$ gives 
$P(Y_1 + Y_2 > c|\theta = 0) = 1/2$,  we clearly want $c > 1$.  Then
the region within the unit square defined by $y_1 + y_2 > 2$
is an isosceles right triangle with side $s < 1$.  The area equals
$.05$ when $s^2/2 = .05$, so $s \doteq .316$.  This means that 
$c$ can be computed from $y_1 + y_2$ at the point where the 
line cuts through the right edge of the unit square:
$c = 1 + (1 - .316) = 1.684$.  
\bigskip
\noindent
10.18/Test has $H_0$:  $\mu = 13.20$ and $H_a: \mu < 13.20$ (note the
wording ``substandard wages'' indicates a one-tailed $Z$-test).  We have
RR:  $z < -z_{.01} = -2.33$.  The test statistic is
$$z = \sqrt{40} \cdot {12.20 - 13.20\over 2.50} = -2.53$$
This is in the rejection region, so we reject the null hypothesis;
there is evidence to support the statement that the
wages are substandard (at the $\alpha = .01$ level).  

\bigskip
\noindent
10.19/We have $H_0$: $\theta = 130$ and $H_a$: $\theta < 130$ (``... against
the alternative that it is less than 130'').  The rejection region
is $z < -z_{.05} = -1.645$.  The test statistic is:
$$Z = {128.6 - 130\over 2.2/\sqrt{40}} \doteq -4.22.$$
This is well into the rejection region so we reject $H_0$ and conclude
there is strong evidence that $\theta < 130$.  

\bigskip
\noindent
10.21/Test has $H_0$:  $\mu_1 - \mu_2 = 0$ and $H_a$: $\mu_1 - \mu_2 \ne 0$
(``appears to differ'').  The rejection region is $|z| > z_{.005} = 2.575$.
The test statistic is
$$z = {1.65 - 1.43 - 0\over \sqrt{{(.26)^2\over 30} + {(.22)^2\over 35}}}
\doteq 3.65.$$
This is in  the rejection region, so the data indicates that there is
a difference in the average shear strengths.  
(Also note the zero in the numerator
of the test statistic -- that's the value of $\mu_1 - \mu_2$
under the assumption that $H_0$ is true.)


\bigskip
\noindent
10.26/The test has $H_0$:  $p = .45$ and $H_a$:  $p \ne .45$ (two-tailed).
With $\alpha = .01$, the rejection region is $|z| > z_{.005} = 2.575$.
The test statistic is
$$z = {{32\over 80} - .45\over \sqrt{(.45)(.55)\over 80}} \doteq -.899$$
Note the way the standard error
for the estimator (that is, the $\sqrt{pq/n}$) is calculated using
 $p = .45$ from $H_0$.
The $z$-value is not in the rejection region, so there is not sufficient 
evidence to conclude that the proportion of brown-eyed people
in this region is different from the $p = .45$ reported in the 
{\it Washington Post}.  

\bigskip
\noindent
10.34/The test has $H_0$:  $\mu = 5$ and $H_a$: $\mu > 5$ (one-tailed).
The rejection region for $\alpha = .05$ is $z > z_{.05} = 1.645$.
The test statistic is
$$z = {5.4 - 5\over 3.1/\sqrt{500}} \doteq 2.88$$
Since this is in the rejection region, there is sufficient
evidence to reject $H_0$.



\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 7}
\centerline{April 8, 2010}
\bigskip
\noindent
\bigskip
\noindent
10.51/Using a 2-tailed $Z$-test (note $n_i = 50$ is in the large
sample range), the test statistic is
$$Z = {74 - 71 \over \sqrt{{9^2\over 50} + {10^2\over 50}}} \doteq 1.577.$$
The smallest value $p$ of $\alpha$ for which this would be in the 
rejection region would have $z_{p/2} = 1.577$, so $p = 2(.0571) = .1142$.
This is the attained significance level.  If we desired an $\alpha = .05$,
then there would not be sufficient evidence to reject the null hypothesis.

\bigskip
\noindent
10.55/Let $\pi$ be the proportion of bad checks (after the new verification system
was introduced).  
We want to test
$H_0$: $\pi = .05$ against the alternative $H_a$: $\pi < .05$  (we
want to know whether the new system has reduced the proportion).  Since
we have a sample of size $n = 1124$, we use a lower-tail $z$-test.  With
$\alpha = 0.01$, the rejection region is $z < -z_{.01} = -2.33$.  The
estimate for $\pi$ is $45/1124 \doteq .04$.  Then the test statistic is
$$z = {.04 - .05 \over \sqrt{(.05)(.95)\over 1124}} \doteq -1.538.$$
(Note that the values of $\pi,1 - \pi$ in the formula for the standard error
in this case come from the $\pi = .05$ in the null hypothesis.)  This is
not in the rejection region, so we {\it cannot reject} the null hypothesis.
Using the approximation $z \doteq -1.54$, 
the attained significance level is $p = .0618$ (the smallest $\alpha$-value
for which the test statistic would be in the rejection region).    

\bigskip
\noindent
10.66/  The test has $H_0$:  $\mu = 100$ and $H_a$: $\mu < 100$.  
Since $n$ is only 20, we use the small-sample ($t$) test.  
Rejection region is $t < -t_{.01}(19) = -2.539$ (from the $t$-table).  
The test statistic is 
$$t = {\overline{Y} - \mu_0\over s/\sqrt{n}} = {89.85 - 100\over 14.90/\sqrt{20}} \doteq -3.046$$
This is in the rejection region, so we reject $H_0$.
The attained significance $p$ is $p < .005$ using the $t$-table.  Using
Maple:
\bigskip
\centerline{\tt TCDF(19,-3.046);}
\bigskip
\noindent
returns a much closer approximation to the exact $p$-value: $.0033238808$.
 
\bigskip
\noindent
10.67/ The point of this problem is to show that the confidence
intervals we studied earlier and the machinery of hypothesis
testing that we have studied more recently are essentially
equivalent -- two different ways of saying the same thing.

a)  Using an upper-tail $t$-test (i.e $H_a$ is $\mu > 280$), 
we have 
$$t = {358 - 280 \over 54/\sqrt{10}} \doteq 4.568$$
With 9 degrees of freedom, $t_{.01} = 2.821$.  So the $t$-statistic
is in the rejection region and we reject $H_0$:  The potato wedges
apparently have a higher average calorie content than claimed.  

b)  The $99\%$ lower confidence bound is 
$$\mu = 358 - t_{.01}(9) {54\over \sqrt{10}} = 309.8.$$

c)  Since $280 < 309.8$, the claimed average calorie content
is less than the $99\%$ lower confidence bound.  So the value
$280$ is not a believable value for the average calorie content.
Note that this is {\it the same} conclusion as in part (a).

\bigskip
\noindent
10.73/ a) For the small-sample test for equality of two subpopulation
means, in order to get a test statistic with an exact $t$-distribution,
the two subpopulations must be normal, with {\it equal variances}.
This means that the best estimate for the sample variance is the 
pooled estimator
$$s_p^2 = {(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2\over (n_1 + n_2 - 2)}$$
given on page 492 of the text.  (The number of degrees of freedom
is the  $n_1 + n_2 - 2 = 10 + 10 - 2 = 18$ in this problem.   We have
$$s_p^2 = {(9)(3.92)^2 + (9)(3.98)^2\over 18} \doteq 15.6034$$
The test statistic is
$$t = {14.5 - 11.1 - 0\over \sqrt{15.6034(1/10 + 1/10)}} \doteq 1.92$$
The rejection region for the $\alpha = .05$ two-tailed test
is $|t| > t_{.025}(18) = 2.101$.  The test statistic is not in
the rejection region, so there is not sufficient evidence to 
reject $H_0$.  The attained significance (using Maple) is
about $p = 2(.034) = .068$ (slightly larger than $.05$).

b)  Similar:
$$t = {12.2 - 11.5\over \sqrt{ {(9)(3.49)^2 + (9)(4.95)^2\over 18} } \sqrt{1/10 + 1/10}} \doteq .365$$
 The test statistic is not in
the rejection region, so there is not sufficient evidence to 
reject $H_0$.  The attained significance (using Maple) is quite large:
about $p = 2(.36) = .72$.  The evidence is even weaker to
reject $H_0$ in this part.

\vfill\eject
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Problem Set 8 Solutions}
\centerline{April 12, 2006}
\bigskip
\noindent
A)  
\item{1)} From the linear model, $\epsilon_i = Y_i - \beta_0 - \beta_1 x_i$
is normally distributed ($N(0,\sigma^2)$).  Hence the pdf for $\epsilon_i$
is 
$$f(\epsilon) = {1\over\sqrt{2\pi\sigma^2}} e^{-\epsilon^2/2\sigma^2}$$
From observations $(x_1,y_1),\ldots,(x_n,y_n)$ of 
$Y$, the likelihood of these observations (as a function
of $\beta_0$ and $\beta_1$) is given by 
$$\eqalign{
L(\beta_0,\beta_1) &= \left({1\over \sqrt{2\pi\sigma^2}}\right)^n 
\exp\left(\left(-\sum_{i=1}^n \epsilon_i^2\right)
{1\over 2\sigma^2}\right)\cr
&=  \left({1\over \sqrt{2\pi\sigma^2}}\right)^n 
\exp\left(\left(-\sum_{i=1}^n (y_i - \beta_0 - \beta_1x_i)^2\right)
{1\over 2\sigma^2}\right)\cr}$$
\item{2)}  Continuing from the last line, we have
$$\ln(L) = {-n\over 2}\ln(2\pi\sigma^2) - 
{1\over 2\sigma^2} \sum_{i=1}^n (y_i - \beta_0 - \beta_1x_i)^2$$
Hence
$$\eqalign{
\pd{\ln(L)}{\beta_0} &= {-1\over 2\sigma^2}\sum_{i=1}^n 2(y_i - \beta_0 - \beta_1x)(-1)\cr
&={1\over \sigma^2}\left((\Sigma y_i) - n\beta_0 - (\Sigma x_i)\beta_1\right)\cr
\pd{\ln(L)}{\beta_1} &= {-1\over 2\sigma^2}\sum_{i=1}^n 2(y_i - \beta_0 - \beta_1x)(-x_i)\cr
&={1\over \sigma^2}\left((\Sigma x_iy_i) - (\Sigma x_i)\beta_0 - (\Sigma x_i^2)\beta_1\right)\cr
}$$
Setting $\pd{\ln(L)}{\beta_0} = \pd{\ln(L)}{\beta_1} = 0$ and 
multiplying by $\sigma^2$, we get exactly the same normal equations
as from the least-squares approach:
$$\eqalign{
n\beta_0 + (\Sigma x_i)\beta_1 &= \Sigma y_i\cr
(\Sigma x_i)\beta_0 + (\Sigma x_i^2)\beta_1 &= \Sigma x_iy_i\cr}$$
Thus, the maximum likelihood estimators for $\beta_0,\beta_1$ are
the same as the least-squares estimators.
\item{3)}  To check that $(\wh{\beta}_0,\wh{\beta}_1)$ gives a 
maximum of the likelihood, we continue on to the second derivative 
test:
$$\eqalign{
{\dd^2 \ln(L)\over \dd\beta_0^2} &= {-n\over \sigma^2}\cr
{\dd^2 \ln(L)\over \dd\beta_1^2} &= {-(\Sigma x_i^2)\over \sigma^2}\cr
{\dd^2 \ln(L)\over \dd\beta_1\dd\beta_0} 
&= {-(\Sigma x_i)\over \sigma^2}\cr}$$
The Hessian determinant is 
$$H = 
{\dd^2 \ln(L)\over \dd\beta_0^2}{\dd^2 \ln(L)\over \dd\beta_1^2}
-\left({\dd^2 \ln(L)\over \dd\beta_1\dd\beta_0}\right)^2
= {n(\Sigma x_i^2) - (\Sigma x_i)^2 \over \sigma^4}$$
The numerator here is $nS_{xx} > 0$  (see B below).  Hence $H > 0$ at all 
points (including the critical point found in part 2).
Furthermore, ${\dd^2 \ln(L)\over \dd\beta_0^2} = {-n\over \sigma^2} < 0$,
so $(\wh{\beta}_0,\wh{\beta}_1)$ is a local (and global) maximum.
\bigskip
\item{}
{\it Comment:}  If you missed some points on this problem, be sure
to review the second derivative test for functions of two variables
again and be ready to use it correctly on the final exam(!)
\bigskip
\noindent
B) 
\item{1)}  We have 
$$\eqalign{S_{xx} &= \Sigma (x_i - \bar{x})^2\cr
&=(\Sigma x_i^2) - 2\bar{x}(\Sigma x_i) + n\bar{x}^2\cr
&=(\Sigma x_i^2) - 2n \bar{x}^2 + n\bar{x}^2\cr
&=(\Sigma x_i^2) - n \bar{x}^2\cr}$$
Similarly,
$$\eqalign{
S_{yy} &=\Sigma (x_i - \bar{x})(y_i - \bar{y})\cr
&=(\Sigma x_iy_i) - \bar{x}(\Sigma y_i) - \bar{y}(\Sigma x_i) + n\bar{x}\bar{y}\cr
&=(\Sigma x_iy_i) - 2n \bar{x}\bar{y} + n\bar{x}\bar{y}\cr
&=(\Sigma x_iy_i) - n \bar{x}\bar{y}\cr}$$
Hence
$$\eqalign{
{S_{xy}\over S_{xx}} 
&= {(\Sigma x_iy_i) - n \bar{x}\bar{y}\over (\Sigma x_i^2) - n \bar{x}^2}\cr
&= {n(\Sigma x_iy_i) - n^2 \bar{x}\bar{y}\over n(\Sigma x_i^2) - n^2 \bar{x}^2}\cr
&= {n(\Sigma x_iy_i) - (\Sigma x_i)(\Sigma y_i)\over n(\Sigma x_i^2) - (\Sigma x_i)^2}\cr
&=\wh{\beta}_1\cr}$$
\item{2)}  Then we have 
$$\eqalign{
\bar{y} - \bar{x}\wh{\beta}_1
&=\bar{y} - \bar{x}{n(\Sigma x_iy_i) - (\Sigma x_i)(\Sigma y_i)\over n(\Sigma x_i^2) - (\Sigma x_i)^2}\cr
&={\bar{y} (n(\Sigma x_i^2) - (\Sigma x_i)^2) - \bar{x}(n(\Sigma x_iy_i) - (\Sigma x_i)(\Sigma y_i))
\over n(\Sigma x_i^2) - (\Sigma x_i)^2}\cr
&={{1\over n}(\Sigma y_i) (n(\Sigma x_i^2) - (\Sigma x_i)^2) - {1\over n}(\Sigma x_i)(n(\Sigma x_iy_i) - (\Sigma x_i)(\Sigma y_i))
\over n(\Sigma x_i^2) - (\Sigma x_i)^2}\cr
&={(\Sigma y_i)(\Sigma x_i^2) - (\Sigma x_i)(\Sigma x_iy_i)\over
n(\Sigma x_i^2) - (\Sigma x_i)^2}\cr
&=\wh{\beta}_0\cr
}$$
\vfill\eject
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Problem Set 8 Solutions}
\centerline{April 12, 2006}
\bigskip
\noindent
\bigskip
\noindent
11.27/a)  By various portions of our ``Big Theorem'' on the 
distribution of the least squares estimators $\widehat{\beta}_i$,
we know that, under the assumption $\varepsilon_i \sim N(0,\sigma^2)$
for all $i$:
\item{$\bullet$} $\widehat{\beta}_i$ are normally distributed
with mean $\beta_{i0}$, and variance $c_{ii}\sigma^2$.
\item{$\bullet$} $S^2 = SSE/(n-2)$ is an unbiased estimator
for $\sigma^2$, 
\item{$\bullet$} ${(n-2)S^2\over \sigma^2} \sim \chi^2(n-2)$, and
\item{$\bullet$} $S^2$ and $\widehat{\beta}_i$ are independent.

\noindent
Thus,
$${\widehat{\beta_i} - \beta_{i0}\over \sigma\sqrt{c_{ii}}} \sim N(0,1).$$
If we replace $\sigma$ by the estimator $S$:
$$\eqalign{
{\widehat{\beta_i} - \beta_{i0}\over S\sqrt{c_{ii}} } 
&= {\widehat{\beta_i} - \beta_{i0}\over \sigma\sqrt{c_{ii}}}/{S\over \sigma}\cr
&={\widehat{\beta_i} - \beta_{i0}\over \sigma\sqrt{c_{ii}}}/ \sqrt{{(n-2)S^2\over \sigma^2}/(n-2)}\cr}$$
This last has the form ${Z\over\sqrt{W/\nu}}$, where $Z$ is standard
normal, $W$ has a $\chi^2(\nu)$ distribution, and $Z,W$ are independent.
By definition 7.2 in the book, this says 
${\widehat{\beta_i} - \beta_{i0}\over S\sqrt{c_{ii}}}$
has a $t$-distribution with $\nu = n-2$ degrees of freedom.

b)  The quantity ${\widehat{\beta_i} - \beta_i\over S\sqrt{c_{ii}}}$
is a pivotal quantity for $\beta_{i}$ so we can use it to derive
confidence intervals as usual:
$$\eqalign{1 - \alpha &= P(-t_{\alpha/2} < {\widehat{\beta_i} - \beta_i\over S\sqrt{c_{ii}}} < t_{\alpha/2})\cr
&= P(-t_{\alpha/2} S \sqrt{c_{ii}} < \widehat{\beta_i} - \beta_i < t_{\alpha/2} S \sqrt{c_{ii}})\cr
&= P(-\widehat{\beta_i} -t_{\alpha/2} S \sqrt{c_{ii}} < -\beta_i < -\widehat{\beta_i} + t_{\alpha/2} S \sqrt{c_{ii}})\cr
&= P(\widehat{\beta_i} - t_{\alpha/2} S \sqrt{c_{ii}} < \beta_i < \widehat{\beta_i} + t_{\alpha/2} S \sqrt{c_{ii}})\cr}$$
(after multiplying through by $-1$ and flipping inequalities back so 
the terms increase left to right).  This gives the formula for the
confidence interval:
$$\beta_i = \widehat{\beta}_i \pm t_{\alpha/2} S \sqrt{c_{ii}}.$$  

\noindent
{\it See Maple worksheet for other solutions}.
\bye
