\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 3, 2006}
\bigskip
\noindent
7.2/  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.5/  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.6/  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.7/  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.8/  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.11/  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.14/  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.19/  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.20/  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.2/ 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.4/ 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}$$
(exponential 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.6/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.8/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.9 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.  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 10, 2006}
\bigskip
\noindent
8.18/  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.19/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.22/ (Proportion case) Estimator: $\widehat{p} =  .67$.  Error bound
$2\sqrt{{(.67)(.33)\over 1752}} \doteq .022$.

\bigskip
\noindent
8.24/ (Difference of proportions case) Estimator:  $\widehat{p_1 - p_2}
= {126\over 180} - {54\over 100} = .7 - .54 = .16$.
Error bound:  $2\sqrt{{(.7)(.3)\over 180} + {(.54)(.46)\over 100}} \doteq .121$.


\bigskip
\noindent
8.28/ 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.29/ 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.30/  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.33/ 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}}
 = 2{1020\over \sqrt{20}} \doteq 645.1$.

\bigskip
\noindent
8.36/ 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.37/ 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.32Y^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)$$

\bigskip
\noindent
8.38/Take square roots everywhere in 8.37:
a)  $.4464 Y < \sigma < 31.9092 Y$.
b)  $\sigma < 15.95 Y$.
c)  $\sigma > .5102 Y$.

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 3}
\centerline{February 17, 2006}
\bigskip
\noindent
8.42/ a)  Estimator $\widehat{p} = 268/500 = .536$.  For $98\%$ confidence interval,
use $z_{.01} = 2.33$:
$$\left[.536 - (2.33)\sqrt{{(.536)(.464)\over 500}}, .536 + (2.33)\sqrt{{(.536)(.464)\over 500}}\right]
= [.484, .588].$$
b)  The interval does include $.51$, so we {\it cannot} conclude that
Proposition 48 has had an effect on graduation rates.  
\bigskip
\noindent
8.45/ a)  From the standard normal table, $z_{.05} \doteq 1.645$.  
The $90\%$ confidence interval is 
$$\left[.667 - (1.645)\sqrt{{(.667)(.333)\over 224}},.667 + (1.645) \sqrt{{(.667)(.333)\over 224}}\right]
= [.615, .719].$$  b) Taking ``most'' to mean more than $.5$, the 
evidence does support the conclusion that most children want to 
experience space travel.  

\bigskip
\noindent
8.46/  (two-sided $95\%$ confidence interval for a mean):  $z_{.025} \doteq 1.96$,
so
$$\left[4.2 - (1.96){1.5\over \sqrt{75}}, 4.2 + (1.96){1.5\over \sqrt{75}}\right]
= [3.861,4.539].$$

\bigskip
\noindent
8.47/ (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.49/  a)  (confidence interval for a proportion -- we use the estimates
for $p$ and $q$ in the standard error):
$$\left[.73-(1.96)\sqrt{{(.73)(.27)\over 1506}}, .73-(1.96)\sqrt{{(.73)(.27)\over 1506}}\right]=
[.7076,.7524]$$
b)  The assumptions are that the sampling must be random and the 
individuals must respond independently.

\bigskip
\noindent
8.50/  a)  ($98\%$ confidence interval for a difference of proportions -- we use 
the estimates for $p_i$ and $q_i$ in the standard error):  $.59-.53 = .06$, so
$$\left[.06 - (2.33)\sqrt{{(.59)(.41)\over 1250} + {(.53)(.47)\over 1251}}, 
.06 + (2.33)\sqrt{{(.59)(.41)\over 1250} + {(.53)(.47)\over 1251}}\right]=
[.0139, .1067]$$
b)  Probably yes, since the interval contains only positive values.
(``With $98\%$ confidence,'' the proportion of people who ate recommended
amounts of fiber decreased.)

\bigskip
\noindent
8.54/ a)  (two-sided $95\%$ confidence interval for a difference of means):
$13.21-11.48=1.73$, so for the cultural activity scale:
$$\left[1.73 - (1.96)\sqrt{{(5.69)^2\over 252} + {(5.31)^2\over 307}}, 
1.73 + (1.96)\sqrt{{(5.69)^2\over 252} + {(5.31)^2\over 307}}\right]
=[.8102,2.6498].$$
b)  For the social fun scale, with a $90\%$ confidence interval:
$25.96-33.05=3.91$, and the interval is
$$\left[3.91 - (1.645)\sqrt{{(5.12)^2\over 252} + {(5.07)^2\over 307}}, 
3.91 + (1.645)\sqrt{{(5.12)^2\over 252} + {(5.07)^2\over 307}}\right] = 
[3.197,4.623]$$
c)  Yes, in each case, the interval contains only positive values,
so there appear to be significant differences (the conclusion
$\mu_1 = \mu_2$ is unlikely).

\bigskip
\noindent
8.55/ a) $95\%$ confidence interval is
$$7.2 \pm (1.96){\sqrt{8.8}\over \sqrt{60}} = 7.2 \pm .751 = [6.449,7.951]$$
b)  Difference of sample means is $\overline{Y_1} - \overline{Y_2} = 7.2-4.7=2.5$.
Then  $95\%$ confidence interval is
$$2.5 \pm (1.645)\sqrt{{8.8\over 60} + {4.9\over 90}} = 2.5 \pm .7377 = [1.76,3.24]$$
c)  Population used is the differences between daily mean ships
in summer months and winter months.  A possible problem is that
the months selected might not be chosen independently or randomly
(e.g. there could be interactions if they were all from the same year).
This illustrates potential problems with statistical studies,
since it would be very difficult to get complete independence 
in the data you could realistically collect.  

\bigskip
\noindent
8.69/ 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.70/ 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 24, 2006}
\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.74/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.75/ 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.82/  From 8.69, we get $s^2 \doteq 63.505$.  To derive the 
confidence interval for $\sigma^2$, we use the idea from 8.37 
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.86/ 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 17, 2006}
\bigskip
\noindent
9.1/Using the results from Exercise 8.4 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}$:
$${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.13/  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)$ 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(\overline{Y}) = 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.62/  Using the method of moments, use $\widehat{\lambda} = \overline{Y}$
(the sample mean).

\bigskip
\noindent
9.63/  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.72/ 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.73/  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.75/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}$$

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 6}
\centerline{March 24, 2006}
\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.7/ a)  Here the null hypothesis is $H_0 : \mu = 900$ and
the alternative $H_a : \mu \ne 900$.  This corresponds
to a two-tailed test.  (Note, the problem says ``differs from 900''
not ``is less than 900''.  That's what indicates the two-tailed
test here.   In a real-world statistical study, of 
course, the choice of which type of test to use
would be motivated by the information you were
trying to get out of the test.  For instance, you might
really want to test the hypothesis that $\mu < 900$ as the 
alternative, and then you would use a one-tailed test.)

b)  The test statistic is 
$$Z = {\overline{Y} - \mu\over \sigma/\sqrt{n}} = \sqrt{35}\cdot {\overline{Y} - 900 \over 50}$$
The rejection region for the level $\alpha = .01$ test is
$|z| > z_{.005} = 2.575$.

c)  With $\overline{Y} = 885$, we have $z = \sqrt{35}\cdot {885-900\over 50} = -1.775$

d)  This is not in the rejection region, so our conclusion is that 
there is not enough evidence here to reject the null hypothesis 
(in effect, $\mu = 900$ is still consistent with the data, for this level test).

\bigskip
\noindent
10.8/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.11/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.12/a)  It would be reasonable (based on traditional gender stereotypes, 
if nothing else) to say $H_0$:  There is no difference in interest
in sports between the boys and girls.  $H_a$:  The boys have
a greater interest in sports than the girls.  

b)  This way of framing the question leads to a one-tailed test.

c)  The rejection region for the level $\alpha = .01$ test is 
$z > z_{.01} = 2.33$.   The test statistic is
$$z = {13.65 - 9.88 \over \sqrt{{(4.82)^2\over 252} + {(4.41)^2\over 307}}} \doteq 9.559$$
This is very far into the rejection region, so we reject the null hypothesis
and conclude that there is evidence to say the boys are more interested
in sports.  

\bigskip
\noindent
10.16/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 -.889$$
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.24/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$.

\bigskip
\noindent
10.31/ The rejection region for the one-tailed $\alpha = .05$ test
is $z > z_{.05} = 1.645$.  We want the probability that a 
Type II error occurred (i.e. $z$ was not in the rejection region given
that $\mu = \mu_a = 5.5$).  That is, we want to compute
$P\left({Y - 5\over 3.1/\sqrt{500}} < 1.645\right)$ when the samples
actually come from a normal distribution with $\mu = 5.5$ and $\sigma= 3.1$.
This is computed by isolating $\overline{Y}$, then ``restandardizing'' with the 
actual $\mu=5.5$:
$$\eqalign{
\beta = P\left({\overline{Y} - 5\over 3.1/\sqrt{500}} < 1.645\right) &=
P\left(\overline{Y} < 5 + (1.645){3.1\over \sqrt{500}}\right)\cr
&= P(\overline{Y} < 5.228)\cr
&= P\left({\overline{Y}-5.5\over 3.1/\sqrt{500}} < {5.228 - 5.5\over 3.1/\sqrt{500}}\right)\cr
&= P(Z < -1.96)\cr
&=.025\cr}$$

\bigskip
\noindent
10.32/We want to find $n$ so that the probability 
we are not in the rejection region of the $\alpha = .01$ test, 
given that $\mu = 5.5$, is $\beta = .05$.  In other words, for 
which $n$ is 
$$P\left({ \overline{Y} - 5 \over 3.1/\sqrt{500}} < z_{0.1} = 2.33\right) = .05$$
assuming the samples $Y_i$ come from a normal distribution with
$\mu = 5.5$ and $\sigma  = 3.1$.  Proceeding as in 10.31, this
means that we want 
$$P\left({\overline{Y} - 5.5\over 3.1/\sqrt{500}} < 2.33 + {5 - 5.5\over 3.1/\sqrt{n}}\right) = .05$$
This means
$$2.33 + {5 - 5.5\over 3.1/\sqrt{n}} = -z_{.05} = - 1.645$$
Solving for $n$,  $\sqrt{n} (.1613) = 3.975 \Rightarrow n \doteq 607.3$.
We will get this small a $\beta$ for integers $n \ge 608$.   
(There is also a general formula for this given on page 479 in 
the text.  This example shows how to derive it(!))

\vfill\eject

\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions for Problem Set 7}
\centerline{March 31, 2006}
\bigskip
\noindent
10.41/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.42/a)  The test has $H_0$:  $p_1 = p_2$ and $H_a$: $p_1 > p_2$ (``effective
in increasing use of safety seats'').  Since the null hypothesis
controls the form of the test statistic, and the standard error for
a difference of proportions is 
$$\sqrt{{p_1q_1\over n_1} + {p_2q_2\over n_2}}$$
we want to use a pooled estimator for the value of $\widehat{p} = p_1 = p_2$.  Lumping
the two groups together, our estimator is
$$\widehat{p} = {(.96)(78) + (.78)(58)\over 136} = .883$$
Then the test statistic is
$$z = {.96 - .78 \over \sqrt{(.883)(.117)(1/78 + 1/58)}} \doteq 3.23.$$
The rejection region for the $\alpha = .05$ test is $z > z_{.05} = 1.645$
so we reject the null hypothesis at that level.  The attained significance
level would be the smallest $\alpha$ such that $3.23$ would 
be rejected.  This gives $p < .00135$ from the table in the text.
(Note this $p$ is {\it different} from the common proportion above!!)
(Using our Maple package, the command
\bigskip
\centerline{\tt 1 - NormalCDF(0,1,3.23);}
\bigskip
\noindent
returns the value $.0006189511$, which is the actual $p$-value.
(This is $P(Z > 3.23)$, which would be one of the entries in our table, 
if it went that far!)  In general, a $p$-value this small is 
almost always {\it really strong} evidence to reject $H_0$.

\bigskip
\noindent
10.54/  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 1 - TCDF(19,3.046);}
\bigskip
\noindent
returns a much closer approximation to the exact $p$-value: $.0033238808$.
 
\bigskip
\noindent
10.55/ 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 a two-tailed $t$-test (i.e $H_a$ is $\mu \ne 400$), 
we have 
$$t = {365 - 400 \over 46/\sqrt{20}} \doteq -3.403$$
From Maple, we get $p \doteq .0015$, so we would reject $H_0$ for
all $\alpha > .0015$.  

b)  The $95\%$ confidence interval is 
$$\mu = 365 \pm t_{.025}(19) {46\over \sqrt{20}}= [343.47, 386.53]$$

c)  Since $400$ is not in this interval the value $\mu = 400$
is not likely.  This is the same as saying we reject $H_0$ at level
$\alpha = .05$.

\bigskip
\noindent
10.61/ 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 larger
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
}$$

\bigskip
\noindent
11.23/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}}.$$  
\bye
