\documentstyle[11pt,bj]{article}

\begin{document}

\frenchspacing

\input info.tex

\def\ul#1{\underline{#1}}

\def\title{Homework 3}
\def\due{Thursday, September 27, 2001}

\pagestyle{myheadings}
\markboth{\title}{\title}
\makeatletter
%\def\@oddhead{\hbox{}\bf\leftmark \hfil \rightmark}
\def\@oddhead{\bf\rightmark\hfil} %\rm\thepage}
\let\@evenhead\@oddhead
\newsavebox{\datebox}
\savebox{\datebox}{\llap{\term}{}}
\def\@oddfoot{\class\hfil\usebox{\datebox}}
\let\@evenfoot\@oddfoot
\makeatother

\begin{center}\large\bf
\title\\ 
Due: \due \\
\end{center}

%\begin{problist}

\begin{enumerate}

\item Reading.  
\begin{itemize}
\item In RPD you
\begin{itemize}
\item Review Ch 2 on Matrix Algebra.  I will not cover much of this in class.
\item Read Ch 3 on Multivariate Regression.
\end{itemize}
\item Work through pp 1--7 of the Splus tutorial on Models,
  ``Statistical Modeling in Splus'', available in many places, for
  example, at {\tt http://www.stat.cmu.edu/\~{}brian/707/S-Tutorial}.
  [The remaining pages deal with extensions of linear models which we
  may encounter later in the course.]  {\em You do not have to hand
  anything in for this question.}

\end{itemize}

\item{} [Related to RPD Ch 2.] Please make sure you can do question
  2.1 through 2.13, pp. 69--70, in RPD.  To check (or speed) your
    work, the following commands in Splus are helpful: 
\begin{verbatim}
A <- matrix(scan(),byrow=T,ncol=4)   
     Makes a matrix with 4 columns (and as many rows as needed) by 
     prompting you for input at the keyboard (fills the matrix row-wise).
x <- c(3,-3,2,1,3.14159)
     Makes a vector of 5 elements (usually Splus assumes this is a
     column vector but it also usually doesn't object to it being
     treated as a row vector).  
x %*% y 
A %*% x
A %*% B
     Computes the dot product of two vectors, or does matrix
     multiplication between a matrix and a vector, or between
     conformable matrices.
t(x), t(A)
     Computes the transpose of a vector x or matrix A
solve(A)
     Computes the inverse of an invertible square matrix A
tmp <- eigen(A)
     Computes the eigensystem of square matrix A:
     tmp$values is the vector of eigenvalues
     tmp$vectors is the matrix of eigenvectors (in columns)
prod(eigen(A)$values)
     Computes the determinant of square matrix A.
\end{verbatim}
{\em You do not have to hand anything in for this question.}


% \item Suppose both $X$ and $Y$ are transformed by $X' = (X-\bar X)/s_X$
% and $Y' = (Y-\bar Y)/s_Y$, where $s_X = \sqrt{S_{XX}/(n-1)}$ (the
% sample standard deviation of the $X_i$) and $s_Y$ is similarly
% defined.  Let $\hat \beta_0'$, $\hat \beta_1'$, $\hat \sigma'$ and
% $R'^2$ be the statistics calculated from the transformed variables.
% \begin{enumerate}
% \item Compute $\hat \beta_0'$, $\hat \beta_1'$, $\hat \sigma'$ and $R'^2$
% and compare them with $\hat \beta_0$, $\hat \beta_1$, $\hat \sigma$
% and $R^2$.
% \item What well--known quantity is $\hat \beta_1'$?
% \item Is there any change in the $t$--test of the null hypothesis
% $\beta_1 = 0$ in moving from the untransformed variables to the 
% transformed variables?
% \end{enumerate}

\item We can express simple regression in matrix form
\[
        \ul Y =  X \ul\beta + \ul\varepsilon
\]
using the matrices $\ul Y = (Y_1, Y_2, \ldots, Y_n)'$,
$\ul\beta=(\beta_0,\beta_1)$, $\ul\varepsilon=(\varepsilon_1,
\varepsilon_2, \ldots, \varepsilon_n)$, and
\[
        X = \left[\begin{array}{cc}
            1 & X_1 \\
            1 & X_2 \\
            \vdots & \vdots \\
            1 & X_n
            \end{array}\right]
\]
Show that the matrix form of the least-squares estimate of $\ul\beta$
reduces to
\[
        \hat\beta_1 = \frac{\sum_i (X_i-\bar X)(Y_i - \bar Y)}
                           {\sum_i (X_i-\bar X)^2}
\]
and $\hat\beta_1 = \bar Y - \hat\beta_1\bar X$ as usual for simple
regression.

\item RPD, problem 3.12 (pp. 96--97).

\item RPD, problem 3.13 (pp. 97--98).

\item A collector of antique grandfather clocks knows that the
price received for the clocks increases linearly with the age
of the clocks.  Moreover, the collector hypothesizes that the auction
price of the clocks will increase linearly as the number of
bidders increases.  Thus the hypothesized model is:

$$ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 +\epsilon, $$

where $Y$ is the auction price, $X_1$ is the age of the clock in
years, and $X_2$ is the number of bidders.  The file {\tt clocks.dat}
in the data area of the 707 website contains observations on a sample
of 32 clocks; for each, the collector recorded the price for which it
sold, its age and the number of bidders present at auction. You have
been called by the collector to help him evaluate his hypotheses.
  
\begin{enumerate}
\item Test the hypothesis that the auction price of a clock
increases as the number of bidders increases, when age is
held constant.  
\item Interpret the estimates of the $\beta$ coefficients in
the model.
\item Compare the
values of $R^2$ and adjusted $R^2$. Does the adjustment
change your interpretation of the usefulness of the
model?
\item Conduct an overall $F$ test for the usefulness of the
model.  What do you conclude?
\end{enumerate}



\end{enumerate}

\end{document}

  




%\end{problist}

\end{document}






\item Suppose the collector, having observed many auctions,
believes that the {\it rate of increase} of the auction price
with age will be driven upward by a large number of bidders.
In other words, he believes that there is an {\it interaction}
between age and the number of bidders and hence that the model

$$ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_1 X_2 +
\epsilon $$ 

is suitable.  State two ways in which 
you might test the hypothesis that the price--age slope
increases as the number of bidders increases.  Perform
one of these tests.  Would your results differ if you had
used the other possible test?  Why or why not?

\item Write a brief (one or two paragraph) report to
the collector, summarizing your findings after performing
the series of regression analyses described above.  Remember,
this collector is not a statistician, so keep your summary
non--technical.

% \item RPD, problem 3.12 (pp. 96--97).  The data are in
%  {\tt /afs/andrew/stat/data/707/water.dat}

