\magnification=\magstep1
\def\sol{\medskip\item{} {\it Solution}\/:\ }
\centerline{Mathematics 376 -- Mathematical Statistics}
\centerline{Solutions for Midterm Exam I}
\centerline{March 15, 2012}
\bigskip
\noindent
I.  Let $X_1,\ldots,X_n$ and $Y_1, \ldots, Y_n$ be two 
independent random samples of equal sizes from a population
with a normal distribution having a
{\it known} mean $\mu$, but {\it unknown}
variance $\sigma^2$.  Let $\Sigma_X^2$ and $\Sigma_Y^2$
be the statistics:
$$
\Sigma_X^2 = {1\over n}\sum_{i=1}^n (X_i - \mu)^2 \qquad
\Sigma_Y^2 = {1\over n}\sum_{i=1}^n (Y_i - \mu)^2.$$
Answer the following questions, giving complete explanations.
\item{A)}  (5) What is the distribution of ${X_i - \mu \over \sigma}$?  
\sol This is the usual standardization of the normal random variable $X_i$, so
it has a standard normal distibution.
\item{B)} (5) What is the distribution of 
$$W = {n\Sigma^2_X\over \sigma^2}?$$
\sol We see that
$$n\Sigma^2_X/\sigma^2 = \sum_{i=1}^n \left({X_i - \mu\over\sigma}\right)^2$$
is the sum of squares of $n$ independent standard normals.  Hence
$W$ has a $\chi^2$ distribution with $n$ degrees of freedom. 
(It's {\it not} $n-1$ degrees of freedom here because we know the exact 
population $\mu$ and we use that rather than the sample mean $\overline{X}$.)
\medskip
\item{C)}  (10) What is the distribution of 
$$V = {\Sigma_X^2\over\Sigma_Y^2}?$$
\sol Rewriting the quotient as 
$$V = \Sigma_X^2/\Sigma_Y^2 = {{n\Sigma_X^2\over \sigma^2}/n \over {n\Sigma_Y^2\over \sigma^2}/n}$$
using part A we see that $V$ has an $F$ distribution with $n$ degrees of
freedom in the numerator and $n$ degrees of freedom in the denominator.
\medskip
\item{D)}  (10) What is the distribution of 
$$U = { Y_1 - \mu\over \Sigma_X}?$$
\sol To see what is going on here, we need to note that $\Sigma_X$ appears here
rather than $\Sigma_X^2$.  So a square root has been extracted in the denominator.  Rewriting we have
$${(Y_1 - \mu)/\sigma \over \sqrt{(n \Sigma_X^2/\sigma^2)/n}}$$
Therefore we have a standard normal, divided by the square root of a $\chi^2(n)$ divided
by its number of degrees of freedom.  The standard normal and the $\chi^2$ are independent 
by assumption.  Hence $U$ has a $t$ distribution with $n$
degrees of freedom.
\bigskip
\noindent
II.  Assume that the calorie content
of Nature Valley granola bars is normally distributed.  
A random sample of 10 granola bars yields
calorie content values of:
$$210,220,234,227,229,240,221,228,225,219$$
\medskip
\item{A)} (15) Find a $90\%$ confidence interval for the population
mean calorie content, $\mu$.  Explain how you know which method to use.  
\sol We estimate $\mu$ with the sample mean $\overline{Y} \doteq 225.3$. 
The sample variance of the calorie content
values above is $S^2 \doteq 70.68$, so $S \doteq 8.407$ cal.
Since $n = 10$, we use the small sample formula (using percentage
points of the $t$-distribution with $n - 1 = 9$ degrees of freedom).
Since we want a $90\%$ confidence interval we want $\alpha = (1 - .9)/2 = .05$.
$$\eqalign{\mu &= 225.3 \pm t_{.05} {8.407 \over \sqrt{10}}\cr
 &= 225.3 \pm (1.833) {8.407\over \sqrt{10}}\cr
 &= 225.3 \pm 4.87\cr}$$
\item{B)} (10)  Find a $95\%$ confidence interval for the 
calorie content variance $\sigma^2$.
\sol The 95\% confidence interval is found using the percentage
points of the $\chi^2$ distribution with $n - 1 = 9$ degrees of freedom:
$$\eqalign{
\sigma^2 &\in \left[{9(70.68)\over \chi^2_{.025}}, {9(70.68)\over \chi^2_{.975}}\right]\cr
&= \left[{9(70.68)\over 19.0228}, {9(70.68)\over 2.70039}\right]\cr
&=\left[33.44,235.57\right]\cr}$$
(Note: The fact that this interval is so large comes from the fact
that the number of samples is quite small.  It is difficult to 
pin down the population variance from this little data.)
\bigskip
\noindent
III.  A researcher found that 107 out of 200 apple 
seeds germinated when they were planted in soil maintained 
at $5 {}^\circ C$, while 123 out of 200 seeds germinated when they 
were planted in soil maintained at $15 {}^\circ C$.
\item{A)} (20)  Construct a $95\%$ confidence interval for 
the difference in the proportions of seeds that germinate
at the two temperatures. 
\sol  Since $n = 200 > 30$ for the two samples, we use the large-sample
formula for the difference of proportions (with the percentage
points of the standard normal distribution).  The point
estimators for the two proportions are $\hat{p}_{5^\circ} = 107/200 = .535$
and $\hat{p}_{15^\circ} = 123/200 = .615$.  Then
$$p_{15^\circ} - p_{5^\circ} = 
.615-.535 \pm (1.96)\sqrt{{(.615)(.385)\over 200} + {(.535)(.465)\over 200}}
\doteq 0.08 \pm .0966$$
\item{B)} (5)  Do the results of this study suggest that 
a greater proportion of apple seeds will germinate at the 
higher temperature in general?  Why or why not?
\sol No -- the data does not support that conclusion because the
confidence interval contains zero and positive numbers as well
as negative numbers.  The fact that $\hat{p}_{5^\circ} < \hat{p}_{15^\circ}$
might be a result of random variation.  
\bigskip
\noindent
IV. (15)Let $Y_1,\ldots,Y_n$ denote a random sample from a 
uniformly distributed population on an interval $[\theta,2\theta]$
where $\theta$ is unknown.  Consider the estimator
$\widehat{\theta} = \min(Y_1,\ldots,Y_n)$.  Is $\widehat{\theta}$
biased or unbiased?
\sol We need to compute the expected value of $\widehat{\beta} = Y_{(1)}$, 
so we need the pdf for the sample minimum in this case.  The 
general formula is $f_{(1)}(y) = n(1 - F(y))^{n-1}f(y)$, where
$F(y)$ is the cdf for the distribution.  From the formulas for uniform
distributions we have 
$$f(y) = \cases{ {1\over \theta} & if $\theta \le y \le 2\theta$\cr
                        0 & otherwise\cr}$$
and
$$F(y) = \cases{0 & if $y < \theta$\cr
                {(y - \theta)\over\theta} & if $\theta \le y\le 2\theta$\cr
                1 & if $y > 2\theta$\cr}. $$
Hence 
$$f_{(1)}(y) = n\left(1 - {(y - \theta)\over\theta}\right)^{n-1} {1\over \theta} = n{(2\theta - y)^{n-1}\over \theta^n}$$
if $\theta \le y \le 2\theta$ and $0$ otherwise.  To find the expected value, 
we can integrate by parts with $u = y$, $dv = n{(2\theta - y)^{n-1}\over \theta^n}\ dy$.
Then $du = dy$, $v = {-(2\theta - y)^n\over\theta^n}$ and
$$\eqalign{
E(Y_{(1)}) &= \int_\theta^{2\theta} y n{(2\theta - y)^{n-1}\over \theta^n} dy\cr
&=\left. {-y(2\theta - y)^n\over \theta^n}\right|_\theta^{2\theta} + \int_\theta^{2\theta}  
{(2\theta - y)^n\over\theta^n}\ dy \cr
&=\theta + \left. {-(2\theta - y)^{n+1}\over (n+1)\theta^n}\right|_\theta^{2\theta}\cr
&= \theta + {\theta\over n+1}\cr
&= {(n+2)\theta\over n+1}\cr}$$
Since we do not get exactly $\theta$, this is a {\it biased} estimator.
\bigskip
\noindent
{\it Extra Credit} (10)  In honor of $\pi$-day, here is the fact
behind one of the demos that we were running in the McBrien 
Student Common Room.  Suppose we drop a rod 1 unit long 
so that its midpoint lands at a point with $y$-coordinate
uniformly distributed on the interval $[0,1/2]$, and the 
angle between the horizontal and the rod is also uniformly
distributed on the interval $[0,\pi]$.  Show that the
probability that the rod intersects the $x$-axis is ${2\over \pi}$.
\sol  Supposing the midpoint lands at a position making an angle $\theta$
with the horizontal,
the rod will hit the $x$-axis if $0 \le y \le {\sin(\theta)\over 2}$
(draw the picture)!  Hence the probability we want is 
$$\int_0^\pi \int_0^{\sin(\theta)/2} {2\over \pi}\ dy\ d\theta = 
{2\over \pi}\cdot \int_0^\pi {\sin(\theta)\over 2}\ d\theta = {2\over\pi}\cdot (-\cos(\pi) + \cos(0))/2 = 
{2\over \pi} $$

\bye
