\documentclass{article}
\usepackage{fullpage}
\usepackage{amsmath}

\begin{document}
\title{Regression Analysis-Fall '01: Solutions to HW5}
\maketitle
\hrule
\begin{enumerate}

\item RPD 4.3
  \begin{enumerate}
  \item Regression Equation:\\

Y \,=\, 51.5697 \,+\, 1.4974 $X_1$ \,+\, 6.7233 $X_2$\\

%%\begin{displaymath}
%%\begin{array}{ccc}
$\beta_0$ : plant weight when there is neither organic matter nor
supplemental nitrogen, measure in grams. \\
$\beta_1$ : increase in plant weight when organic matter increases
by 1\% (nitrogen supplement is kept fixed), measure in g/\%\\
$\beta_2$ : increase in plant weight when nitrogen supplement is
increased by 1 kg (organic matter is kept fixed), measure in g/kg\\
%%\end{array}
%%\end{displaymath}

\item SS(Res) has 7-2-1=4 df. $s^2$=SS(Res)/df=6.89, $\hat{var(\hat
    \beta)} \,=\, s^2 (X^TX)^{-1} \, \rightarrow
    var(\hat{\beta_1})=.0695, \, Cov(\hat{\beta_1},
    \hat{\beta_2})=-.0074$

\item Confidence Intervals:
  \begin{itemize}
  \item Univariate CI: $\beta_i \, \pm \,
    t_{(.025,4)}s(\hat{\beta_i})$. $\beta_1$: 1.4974 $\pm$
    0.7319. $\beta_2: 6.7233 \pm 1.7418$
  \item Bonferroni CI: $\beta_i \, \pm \, t_{(.025/3,
      4)}s(\hat{\beta_i})$. $\beta_1 : 1.4974 \pm 1.0441$, $\beta_2:
      3.7233 \pm 2.4848$
  \item Scheffe CI: $\hat{\beta_i} \pm \sqrt{3F_{(.05,3,4)}}
    s(\hat{\beta_i})$. $\beta_1: 1.4974 \pm 1.1722$, $\beta_2: 6.7233
    \pm 2.7897$
  \end{itemize}
\item $H_0: \beta_1=.5\beta_2,\, H_1:\beta_1 \ne .5\beta_2$ \\
$K=[0 \,\,\,\, 1 \, -.5]^T, \, m=0,\, 
t=(K^T\hat{\beta}-m)/\sqrt{(K^T(X^TX)^{-1}K)}s \,=\,
-4.454$. $t_{critical}=-2.77 \, \rightarrow$ reject $H_0$. 

\item $H_0: \beta_1=.5\beta_2,\, H_1:\beta_1 \ne .5\beta_2$\\
 $Q=(K^T\hat{\beta}-m)^T(K^T(X^TX)K)^{-1}(K^T\hat{\beta}-m) \,=\,
 136.79. \, F=Q/(rank(K)s^2)=19.84.\, F_{critical}=0.004 \,
 \rightarrow$ reject $H_0$. 

\item Q = SSR(small) - SSR(big) = 164.3325-27.5808 = 136.75, same
  result as in (e).  
  \end{enumerate}

\hrule
\item RPD 4.12\\
  \begin{itemize}
  \item Sequential: \\
    \begin{itemize}
    \item R($\beta_3 | \beta_0$): Testing $\beta_3$=0 when only the
    intercept is already in the model.
    \item R($\beta_1 | \beta_0, \beta_3$): Testing $\beta_1$=0 when
      the intercept and $X_3$ are already in the model. 
    \item R($\beta_2 | \beta_0, \beta_1, \beta_3$): Testing
      $\beta_2$=0 when intecept, $X_1$ and $X_3$ are already in the
      model. 
    \end{itemize}
  \item Partial:\\
    \begin{itemize}
    \item R($\beta_3 | \beta_0, \beta_1, \beta_2$): Testing
      $\beta_3$=0 when intercept, $X_1$ and $X_2$ are already in the
      model. 
    \item R($\beta_2 | \beta_0, \beta_1, \beta_3$): Testing
      $\beta_2$=0 when intercept, $X_1$ and $X_3$ are already in the
      model. 
    \item R($\beta_1 | \beta_0, \beta_2, \beta_3$): Testing
      $\beta_1$=0 when intercept, $X_2$ and $X_3$ are already in the
      model.
    \end{itemize}
  \end{itemize}

\hrule
\item Bank profits
  \begin{enumerate}
  \item Profit or loss (Y) vs. size of bank ($X_1$) and type of bank
    ($X_2, X_3$).
$$ Y \,=\, \beta+0 \,+\, \beta_1 X_1 \,+\, \beta_2 X_2 \,+\,
\beta_3X_3. $$
  \item Response functions:
    \begin{itemize}
    \item For commercial banks: Y = $\beta_0 \,+\, \beta_1X_1 \,+\,
      \beta_2$
    \item For mutual savings: Y = $\beta_0 \,+\, \beta_1X_1 \,+\,
      \beta_3$
    \item For savnigs and loan: Y = $ \beta_0 \,+\, \beta_1X_1 \,-\,
      \beta_2 \,-\, \beta_3$
  \end{itemize}
  \item Interpretation: Additional gain or loss for being a particular
    type of bank.
  \end{enumerate}

\hrule
\item RPD 7.13
  \begin{enumerate}
  \item See HW3
  \item $E[Y^TAY] = tr(A \,Var(Y)) \,+\, E(Y^T) \,A\, E(Y)$
    \begin{displaymath}
      \begin{array}{lll}
E(\hat{\sigma}^2) &=&E(Y^T(I-P_{X_1})Y/(n-p'))\\
                  &=&\frac{1}{n-p'}[tr[(I-P_{X_1})Var(Y)] \,+\,
                  E(Y^T)(I-P_{X-1})E(Y)]\\
                  &=&\frac{1}{n-p'}
                  [(n-tr(X_1(X_1^TX_1)^{-1}X_1^T))\sigma^2 \,+\,
                  (X_1\beta_1 + X_2\beta_2)^T(I-P_{X_1})(X_1\beta_1 +
                  X_2\beta_2)]\\
                  &=& \frac{1}{n-p'}[(n-p')\sigma^2 \,+\,
                  (X_1\beta_1)^T (I-P_{X_1})(X_1\beta_1) \,+\,
                  (X_2\beta_2)^T (I-P_{X_1})(X_2\beta_2)]\\
                  &=& \sigma^2 \,+\, (\beta_2^TX_2^TX_2\beta_2 \,-\,
                  \beta_2^TX_2^TP_{X_1}X_2\beta_2)/(n-p')\\
                  &=& \sigma^2 \,+\,
                  (X_2\beta_2)^T(I-P_{X_1})(X_2\beta_2)/(n-p')\\
                  &\ge& \sigma^2 since \,(I-P_{X_1}) \textnormal{is \,nonegative\,
                  definite \,and}n>p'\\
      \end{array}
    \end{displaymath}
When unbiased? $(X_2\beta_2)^T(I-P_{X_1})(X_2\beta_2) \,=\, 0$: columns
of $X_2$ is in the span\{columns of X$_1$\}. 
\item X = [$X_1 \: X_2$] $\rightarrow$ \, $(X^TX)^{-1} = \left[ 
    \begin{array}{lr}
X_1^TX_1 & X_1^TX_2\\
X_2^TX_1 & X_2^TX_2\\
\end{array}
\right] ^{-1}$\\
$\left[ 
  \begin{array}{lr}
X_1^TX_1 & X_1^TX_2\\
X_2^TX_1 & X_2^TX_2\\
  \end{array}
\right]
\left[ 
  \begin{array}{lr}
(X_1^TX_1)^{-1} + AQ^{-1} A^T & -AQ^{-1}\\
-Q^{-1}A^T                    & Q^{-1}\\
  \end{array}
\right]
= \left[ 
  \begin{array}{lr}
(1,1)&(1,2)\\
(2,1)&(2,2)\\
  \end{array}
\right]$\\
Just carry out the matrix multiplication, we have:\\
(1,1) = $ (X_1^TX_1)(X_1^TX_1)^{-1} + X_1^TX_1AQ^{-1}A^T + X_1^TX_2Q^{-1}A^T =I_{n-p'}$\\
(1,2) = $\hdots = 0_{n-p'}$\\
(2,1) = $\hdots = 0_{p'}$\\
(2,2) = $(-X_2^TX_1 + X_2TX_2)Q^{-1} = QQ^{-1} = I_{p'}$\\
Therefore, 
$\left[ 
  \begin{array}{lr}
(X_1^TX_1)^{-1} + AQ^{-1} A^T & -AQ^{-1}\\
-Q^{-1}A^T                    & Q^{-1}\\
  \end{array}
\right]
= \left[ 
    \begin{array}{lr}
X_1^TX_1 & X_1^TX_2\\
X_2^TX_1 & X_2^TX_2\\
\end{array}
\right] ^{-1}$\\

\item Var$(\hat{\beta_1}) =
  (X_1^TX_1)^{-1}Var(Y)X_1(X_1^TX_1)^{-1}=\sigma^2 (X_1^TX_1)^{-1}$
  (subset model).
From (c), \\
$\begin{array}{lll}
Var(\hat{\beta_1}) &=& \sigma^2 (X_1^TX_1)^{-1} + \sigma^2
AQ^{-1}A^T\\
                    &=& \sigma^2(X_1^TX_1)^{-1} +
                    \sigma^2(X_1^TX_1)^{-1}X_1T(I-P_{X_1})^{-1}X_1(X_1^TX_1)^{-1}\\
                    &\ge& \sigma^2 (X_1^TX_1)^{-1}\\
\end{array}$\\
As a result, $\beta_1$  in the subset model has a smaller variance
than that in the full model.\\
Bias/Variance tradeoff: I personally like estimators with smaller
variances because I have a better feel of the variance than the expected
value. However, if I include too many extra variables in the model, I
will end up other problems such as colinearity.   

  \end{enumerate}

\end{enumerate}
\hrule

\end{document}

