\documentclass[11pt,a4paper]{article}%
\usepackage{amsfonts}
\usepackage{amsmath}%
\setcounter{MaxMatrixCols}{30}%
\usepackage{amssymb}%
\usepackage{graphicx}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2890}
%TCIDATA{LastRevised=Sunday, March 01, 2009 20:27:10}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\setlength{\topmargin}{0mm}
\setlength{\headheight}{0mm}
\setlength{\headsep}{0mm}
\setlength{\textheight}{227mm}
\setlength{\textwidth}{158mm}
\setlength{\topskip}{\baselineskip}
\begin{document}
$%
\begin{tabular}
[c]{p{1.8in}p{2.15in}p{1.8in}}%
\multicolumn{1}{l}{{\Large \textbf{Part A: Statistics}}} & \quad &
\multicolumn{1}{r}{{\Large \textbf{Problem Sheet 4}}}\\\hline
\end{tabular}
\ $

\vspace{0.25in}

\begin{enumerate}
\item[\textbf{1.}] The observations $(x_{i},Y_{i})$ satisfy the equation
\[
Y_{i}=\alpha+\beta(x_{i}-\overline{x})+\varepsilon_{i},\quad i=1,2,\ldots,n,
\]
where $\alpha$ and $\beta$ are unknown constants, $\overline{x}=n^{-1}\sum
x_{i}$ and the $\varepsilon_{i}$s are independent normal random variables with
mean zero and variance $\sigma^{2}$. The $x_{i}$s are not all equal.\medskip
\ \newline Show that the covariance matrix of the least squares estimators of
$\alpha$ and $\beta$ is
\[
\sigma^{2}n^{-1}\left(  \sum_{i=1}^{n}(x_{i}-\overline{x})^{2}\right)
^{-1}\left(
\begin{array}
[c]{cc}%
%TCIMACRO{\dsum \limits_{i=1}^{n}}%
%BeginExpansion
{\displaystyle\sum\limits_{i=1}^{n}}
%EndExpansion
(x_{i}-\overline{x})^{2} & 0\\
0 & n
\end{array}
\right)  .
\]


How would you estimate $\sigma^{2}$? How would you obtain $100\left(
1-\gamma\right)  \%$ confidence intervals for $\alpha$ and $\beta$%
?\medskip\ \newline What estimate would you use for the value of $y$ when
$x=0,$ and what is the variance of your estimate?\ \newline Now suppose that
$y$ depends upon two explanatory variables $x_{i}$ and $z_{i}$ according to
the model
\[
Y_{i}=\alpha+\beta(x_{i}-\overline{x})+\gamma z_{i}+\varepsilon_{i},\quad
i=1,2,\ldots,n,
\]
where the vectors $(x_{1},x_{2},\ldots,x_{n})$, $(z_{1},z_{2},\ldots,z_{n})$
and $(1,1,\ldots1)$ are linearly independent. Show that the variance of the
least squares estimate of $\beta$ is
\[
\frac{\sigma^{2}%
%TCIMACRO{\dsum \limits_{i=1}^{n}}%
%BeginExpansion
{\displaystyle\sum\limits_{i=1}^{n}}
%EndExpansion
(z_{i}-\overline{z})^{2}}{%
%TCIMACRO{\dsum \limits_{i=1}^{n}}%
%BeginExpansion
{\displaystyle\sum\limits_{i=1}^{n}}
%EndExpansion
(x_{i}-\overline{x})^{2}%
%TCIMACRO{\dsum \limits_{i=1}^{n}}%
%BeginExpansion
{\displaystyle\sum\limits_{i=1}^{n}}
%EndExpansion
(z_{i}-\overline{z})^{2}-\left(
%TCIMACRO{\dsum \limits_{i=1}^{n}}%
%BeginExpansion
{\displaystyle\sum\limits_{i=1}^{n}}
%EndExpansion
(x_{i}-\overline{x})(z_{i}-\overline{z})\right)  ^{2}}.
\]


\item[\textbf{2.}] Consider the linear model
\[
\mathbf{Y}=\mathbf{X\theta}+\mathbf{\epsilon},
\]
where $\mathbf{Y}$ is a random $n$-vector, $\mathbf{X}$ is an $n\times p$
design matrix of rank $p<n$, $\mathbf{\theta}$ is a $p$-vector of parameters
and $\mathbf{\epsilon}$ is an $n$-vector of independent random variables with
mean zero and variance $\sigma^{2}$. Derive the least squares estimator
$\widehat{\mathbf{\theta}}$ of $\mathbf{\theta}$ and show that it is unbiased.
Find its covariance matrix. Under what circumstances is the least squares
estimator also the maximum likelihood estimator?\medskip\newline A sailor uses
a sextant to measure the two angles in the horizontal plane subtended by three
distant landmarks $A$, $B$, $C$: their true values are $\lambda$ and $\mu$.%
%TCIMACRO{\FRAME{dhF}{1.5402in}{1.4269in}{0pt}{}{}{fig_ps7.eps}%
%{\special{ language "Scientific Word";  type "GRAPHIC";
%maintain-aspect-ratio TRUE;  display "USEDEF";  valid_file "F";
%width 1.5402in;  height 1.4269in;  depth 0pt;  original-width 1.8896in;
%original-height 1.7495in;  cropleft "0";  croptop "1";  cropright "1";
%cropbottom "0";  filename '../Fig_ps7.eps';file-properties "XNPEU";}}}%
%BeginExpansion
\begin{center}
\includegraphics[
height=1.4269in,
width=1.5402in
]%
{../Fig_ps7.eps}%
\end{center}
%EndExpansion
He takes four measurements, the first two, $y_{1}$ and $y_{2}$, being of
$\lambda$ and $\mu$ respectively and the third and fourth, $y_{3}$ and $y_{4}%
$, each\ being of the combined angle $\lambda+\mu$. The measurements are
subject to independent, normally distributed random errors with known variance
$\sigma^{2}$. Obtain maximum likelihood estimates $\widehat{\lambda}$,
$\widehat{\mu}$ of $\lambda$ and $\mu$. Show that the variance of
$\widehat{\lambda}$ is $\frac{3}{5}\sigma^{2}$ and that the correlation
coefficient between $\widehat{\lambda}$ and $\widehat{\mu}$ is $-\frac{2}{3}%
$.\medskip\newline The sailor suspects that each of the measurements has a
constant bias $\beta$. Show that this bias is estimated as $y_{1}+y_{2}%
-\frac{1}{2}\left(  y_{3}+y_{4}\right)  $ and show how to test the hypothesis
that the bias is zero.

\item[\textbf{3.}] A team of researchers believe that the outcome $Y$ of an
experiment obeys the linear regression model%
\[
Y=\alpha+\beta x+\varepsilon
\]
where $\alpha$ and $\beta$ are unknown constants, the error $\varepsilon\sim
N\left(  0,\sigma^{2}\right)  $ with $\sigma^{2}$ unknown, and where they can
control the value of $x$. They conduct the experiment $r$ times at $x=a$, $r$
times at $x=-a,$ and $n-2r$ times at $x=0$. Assume the associated errors
$\varepsilon_{1},\ldots,\varepsilon_{n}$ are independent.\medskip\newline
Derive explicit expressions for the maximum likelihood estimators of $\alpha$
and $\beta$. If the researchers' only interest is in estimating $\beta$, which
value of $r$ should they have chosen?\medskip\newline How should they estimate
the value of $\sigma^{2}$?\medskip\newline Consider a new experiment about to
be conducted, resulting in a new observation $\widetilde{Y}$ taken at
$x=x_{0}$. Show how to construct 

\begin{enumerate}
\item[i)] a $100\left(  1-\delta\right)  \%$ confidence interval for the mean
value of $\widetilde{Y}$

\item[ii)] a $100\left(  1-\delta\right)  \%$ prediction interval for the new
value of $\widetilde{Y}.$
\end{enumerate}

\item[\textbf{4.}] Consider the model in Question 1 and suppose that two
further independent observations, $\widetilde{Y}_{1},\widetilde{Y}_{2}$ are to
be made at the point $x^{\prime}$, that is%
\[
\widetilde{Y}_{j}=\alpha+\beta\left(  x^{\prime}-\overline{x}\right)
+\widetilde{\epsilon}_{j},\quad\text{for }j=1,2.
\]
Find an expression for the variance $\tau^{2}$ of the predictor of
$\widetilde{Y}_{1}$ and explain how it can be used to construct a prediction
interval for $\widetilde{Y}_{1}$. Show that the correlation between the
prediction error of $\widetilde{Y}_{1}$ (defined as the difference between the
true value of $\widetilde{Y}_{1}$ and the predictor of $\widetilde{Y}_{1}$)
and the prediction error of $\widetilde{Y}_{2}$ is $\frac{\tau^{2}}{\tau
^{2}+\sigma^{2}}$.\bigskip

\textbf{Optional Computer Exercises\medskip}

\item[\textbf{1.}] The data file \emph{wind.txt}, which you will find on the
website, contains data from an investigation into the relationship between
electrical current produced by a wind generator and wind speed (in miles per
hour). Observations were recorded in the matched vectors \emph{output} and
\emph{speed}.

\begin{enumerate}
\item[(i)] Load the data and use the \texttt{plot()} function to look at a
scatterplot of \emph{output} against \emph{speed}. Also produce scatterplots
of \emph{output} against the square root of \emph{speed}, \emph{output}
against the logarithm of \emph{speed} and \emph{output} against the reciprocal
of \emph{speed}. Does any of these plots show a plausible straight line relationship?

\item[(ii)] In the light of your investigations from part (i) of this
question, fit the most plausible straight line. Produce a vector of fitted
values and a vector of residuals.

\item[(iii)] Use the residuals to produce a normal probability plot; also
produce a plot of residuals against fitted values. Comment briefly upon the
suitability of your model in the light of the assumptions of the regression
model.\medskip\newline[You may find it helpful to fit your linear model using
an R command of the form \texttt{output
%TCIMACRO{\TEXTsymbol{<}}%
%BeginExpansion
$<$%
%EndExpansion
- lm(reponse \symbol{126}variable1 + variable2 + ...}. You can then obtain a
model summary with \texttt{summary(output)} and fitted values and residuals
are obtained respectively from \texttt{fitted(output)} and
\texttt{resid(output)}.]\newpage
\end{enumerate}

\item[\textbf{2.}] The proportion of successful putts ($y$) in a series of
golf tournaments was recorded for different putt lengths ($x$), measured in
feet. The data are taken from Iman, R.L. (1994) \emph{A Data-based Approach to
Statistics}, and are in the table below.
\[%
\begin{tabular}
[c]{ccccc}\hline
$x$ & $y$ &  & $x$ & $y$\\\hline
2 & 0.93 &  & 12 & 0.26\\
3 & 0.83 &  & 13 & 0.24\\
4 & 0.74 &  & 14 & 0.31\\
5 & 0.59 &  & 15 & 0.17\\
6 & 0.55 &  & 16 & 0.13\\
7 & 0.53 &  & 17 & 0.16\\
8 & 0.46 &  & 18 & 0.17\\
9 & 0.32 &  & 19 & 0.14\\
10 & 0.34 &  & 20 & 0.16\\
11 & 0.32 &  &  & \\\hline
\end{tabular}
\
\]


\begin{enumerate}
\item[(i)] Enter these data into the computer and plot the variable $y$
against $x$. Is it useful to model these data by fitting a regression line?

\item[(ii)] Fit the straight line $y=\alpha+\beta x$. According to your model,
at what putting distance (in feet) is the chance of a successful putt equal to
$\frac{1}{2}$?

\item[(iii)] Try the effect of the transformation $y_{2}=\sqrt{y}$ by plotting
against $x$. Does this transformation seem to be effective?\medskip\newline
The usual approach to regression when the response variable $y$ is a
proportion is to transform to a new variable
\[
y_{3}=\log\left(  \frac{y}{1-y}\right)  .
\]
Try the effect of this transformation by plotting $y_{3}$ against $x$. Fit the
models $y_{2}=\alpha+\beta x$ and $y_{3}=\alpha+\beta x$ obtaining vectors of
fitted values and residuals. Which transformation do you prefer and why?

\item[(iv)] According to your preferred fitted model in part (iii), at what
putting distance (in feet) is the chance of a successful putt equal to
$\frac{1}{2}$?

\item[(v)] Use your fitted line to estimate the success rate at a putting
distance of 40 feet. Does your answer make sense? What can you conclude?
\end{enumerate}
\end{enumerate}


\end{document}