\documentclass{article}

\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{7.0in}
\setlength{\textheight}{9.5in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.05in}
\setlength{\columnseprule}{0.3pt}
\usepackage{fancyvrb}
\usepackage{relsize}
\usepackage{hyperref}

\begin{document}

Name: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

Directions: {\bf Work only on this sheet} (on both sides, if needed); do not
turn in any supplementary sheets of paper. There is actually plenty of room
for your answers, as long as you organize yourself BEFORE starting writing.

{\bf \Large SHOW YOUR WORK!} 

{\bf 0.} Advice:  The first three problems have half-line answers and
should be very quick.  Most of the other problems also have very short
answers, but may or may not be quick.

{\bf 1.} (15) Fill in the blank with a term from our course:  In comparing
two estimators of some population quantity, we might consider the better
one to be the one with smaller
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_.

{\bf 2.} (15) Consider the R code on p.262, which consists of assignments
to {\bf md} and {\bf lmout}.  Suppose we wish to fit a model with no
first-degree term, i.e. (9.12) would change to

\begin{equation}
m_{A;b}(b) = \beta_0 + \beta_1 b^2
\end{equation}

How should we change the code in the line on p.262 that assigns to {\bf
lmout}?  Assume that the line assigning to {\bf md} is retained.

{\bf 3.} (10) Consider the R code at the top of p.200.  Give an
approximate 95\% confidence interval for the population value $\lambda$.
Your answer will be in the form $(c \pm d$, where c and d are
numerical expressions, e.g. $2.37^8/5$.

{\bf 4.} Suppose the random variable X is equal to 1, 2 and 3, with
probabilities c, c and 1-2c.  The value c is thus a population
parameter.  We have a random sample $X_1,...,X_n$ from this population.

\begin{itemize}

\item [(a)] (15) Show that the Method of Moments Estimator of c, which we
will denote by $\hat{c}$, is $(3 - \overline{X})/3$.

\item [(b)] (15) Find the bias of $\hat{c}$.  Cite mailing tubes and other
reasons!

\end{itemize}

{\bf 5.} In the notation of Chapter 9, give matrix and/or vector
expressions for each of the following in the linear regression model:

\begin{itemize}

\item [(a)] (10) $s^2$, our estimator of $\sigma^2$ 

\item [(b)] (10) the standard error of the estimated value of the
regression function $m_{Y;X}(t)$ at $t = c$, where $c =
(c_0,c_1,...,c_r)$.

\end{itemize}

{\bf 6.} (10) Suppose Jack and Jill each collect random samples
of size n from a population having unknown mean $\mu$ but KNOWN variance
$\sigma^2$.  They each form an approximate 95\% confidence interval for
$\mu$, using (6.21) but with s replaced by $\sigma$.  Find the
approximate probability that their intervals do not overlap.  Express
your answer in terms of $\Phi$, the cdf of the N(0,1) distribution.

{\bf Solutions:}

{\bf 1.}  Mean squared error.  Partial credit was given for some other
answers, but it was emphasized that MSE is the major criterion, as it
balances variance and bias.

{\bf 2.} 

\begin{Verbatim}[fontsize=\relsize{-2}]
lm(md[,2] ~ md[,3])
\end{Verbatim}

{\bf 3.} $1.027 \pm 1.96 \cdot 0.117$

{\bf 4a.} $EX = c \cdot 1 + c \cdot 2 + (1-2c) \cdot 3 = 3 - 3c)$, so c =
(3-EX)/3.  So, set $\hat{c} = (3-\overline{X})/3$.

{\bf 4b.}

\begin{eqnarray}
E \hat{c} &=& E[(3-\overline{X})/3) ~~~~ \textrm{(from (a))} \\ 
&=& \frac{1}{3} \cdot (3 - E\overline{X}) ~~~~ (3.13) \\
&=& \frac{1}{3} [ 3 - EX ] ~~~~ \textrm{(6.8)} \\
&=& \frac{1}{3} [ 3 - (3-3c) ] \\
&=& c
\end{eqnarray}

So, the bias is 0.

{\bf 5a.}

\begin{equation}
\frac{1}{n} 
(V-Q \hat{\beta})'
(V-Q \hat{\beta})
\end{equation}

Note that hats!

{\bf 5b.}

\begin{equation}
m_{Y;X}(c) = c' \beta
\end{equation} 

so

\begin{equation}
\widehat{m}_{Y;X}(c) = c' \hat{\beta}
\end{equation} 

Then (5.88) yields

\begin{equation}
Var[\widehat{m}_{Y;X}(c)] = c' Cov(\hat{\beta}) c 
= \sigma^2 c' (Q'Q)^{-1} c
\end{equation} 

Thus the sample estimated variance is

\begin{equation}
s^2 c' (Q'Q)^{-1} c
\end{equation} 

so that the standard error is

\begin{equation}
s \sqrt{c' (Q'Q)^{-1} c}
\end{equation} 

{\bf 6.} The probability of nonoverlap is double the probability that
Jack's interval is entirely to the left of Jill's.  Since each interval
has radius $1.96\sigma/\sqrt{n}$, Jack's interval will be entirely to
the left of Jill's if 

\begin{equation}
\overline{X} + 1.96\sigma/\sqrt{n} <
\overline{Y} - 1.96\sigma/\sqrt{n} 
\end{equation}

we have

\begin{equation}
P(\textrm{nonoverlap}) = 2 P(\overline{X} - \overline{Y} 
< -1.96\sigma/\sqrt{n})
\end{equation}

So, we need the distribution of $W = \overline{X} - \overline{Y}$.  
But $EW = \mu - \mu = 0$ and by independence

\begin{equation}
Var(W) = Var(\overline{X} - \overline{Y}) = 2 \sigma^2/n
\end{equation}

so W has standard deviation $\sigma \sqrt{2/n}$.  Thus

\begin{equation}
P(\textrm{nonoverlap}) = 2 \Phi \left(
\frac
{-1.96\sigma/\sqrt{n}}
{\sigma \sqrt{2/n}}
\right )
\approx
2 \Phi(-1.39)
\end{equation}

You might be surprised to see that the answer is independent of n.  The
actual value is about 0.16.  So, Jack and Jill have about a 16\% chance
of having nonoverlapping intervals.

\end{document} 
