\documentclass{article}

\usepackage{LectureNotes}

\begin{document}
\pagestyle{empty}

\begin{centering}
\large
Intro to Econometric Theory \linebreak
Heinz School, Carnegie Mellon University \linebreak
90-906, Spring 2003-4 \linebreak
\vspace{0.2in} \linebreak
Solution \#3
\normalsize

\end{centering}
\vspace{0.3in}

Consider the hospital cost data described on the datasets page
of the course website.  Suppose we are interested in understanding
the costs of hospital care in California.
We are going to model these data with the following CNLRM:

  \begin{equation}
  \mathrm{cost}_i = \beta_1 + \beta_2 \mathrm{days}_i 
                  + \beta_3 \mathrm{visits}_i + \epsilon_i
                  \nonumber
  \end{equation}

Analysis of these data appears in the file hwk3.lst available
on the homework page of the course website.  The analysis was
generated with SAS from the program hwk3.sas also available
on the course website.


\begin{enumerate}
\item Interpret $\beta_2$.

      \textbf{
      $\beta_2$ is the effect, on hospital costs, of a one unit
      increase in inpatient days.  That is, it is the marginal
      cost of inpatient days.
      }

\item Interpret $\hat{\beta}_2$.

      \textbf{
      $\hat{\beta}_2$ is an \emph{estimator} 
      of the effect, on hospital costs, of a one unit
      increase in inpatient days.  That is, it is an estimator of
      the marginal cost of inpatient days.
      }

      \textbf{
      In our case, it is the OLS estimator of the marginal cost of an
      inpatient day.
      }

\item Interpret 207.82

      \textbf{
      207.82 is our \emph{OLS estimate} of
       the effect, on hospital costs, of a one unit
      increase in inpatient days.  That is, it is our OLS estimate of 
      the marginal cost of inpatient days.
      }

\item Form a 95\% confidence interval for the marginal cost of
      an outpatient visit.

      \textbf{
      We are asked for a confidence interval for $\beta_3$.  Notice,
      since $N$ is so large, the $t$ and normal tables are basically
      the same.
      }

      \begin{eqnarray}
      \beta_2 &=& \hat{\beta}_{2,OLS} 
                  \pm 1.96 \sqrt{\hat{V}(\hat{\beta}_{2,OLS})}
                  \nonumber\\
              &=& 1477 \pm 1.96(12.5) \nonumber\\
              &=& 1477 \pm 25 \nonumber
      \end{eqnarray}

\item Test, at the 1\% confidence level, the hypothesis that 
      the marginal cost of an inpatient day is one fifth the
      marginal cost of an outpatient visit.

      \textbf{
      The null hypothesis here is: 
      $H_0: \; \beta_2=0.2\beta_3$ or 
      $H_0: \; \beta_2-0.2\beta_3=0$.
      }

      \begin{eqnarray}
      \mathrm{t-stat} &=& \frac{\hat{\beta}_{2,OLS}-0.2 \hat{\beta}_{3,OLS}-0}
                               {\sqrt{
                                  \left( \begin{array}{r r r}
                                           0 & 1 & -0.2
                                         \end{array}
                                  \right)
                                  \hat{V}(\hat{\beta}_{OLS})
                                  \left( \begin{array}{r}
                                           0 \\ 1 \\ -0.2
                                         \end{array}
                                  \right)
                                }
                               } \nonumber\\
                      &=& \frac{-87.6}
                               {\sqrt{24.13+0.04(156)+2(0.2)(-44)}}
                          \nonumber\\
                      &=& \frac{-87.6}
                               {\sqrt{12.77}}
                          \nonumber\\
                      &=& -24.5
                          \nonumber
      \end{eqnarray}

      \textbf{
      Clearly, 24.5 is high enough that the null hypothesis will be
      rejected at any reasonable significance level.
      }


\item What is $X'X$?  (hint: first prove that 
      $X'X = (N-1)\hat{V}(X) + N \overline{X} \; \overline{X}'$)

      \textbf{
      We have argued in class that $V(x) = E(xx')-E(x)(E(x))'$.  This
      is the same as $E(x-Ex)(x-Ex)' = E(xx')-E(x)(E(x))'$, or
      $E(xx') = E(x-Ex)(x-Ex)' + E(x)(E(x))'$.  The sample analogue
      of this (which is proved by following the exact same steps) is:
      }

      \begin{equation}
        \frac{1}{N} \sum X^i X^{i'} 
           = \frac{1}{N} \sum (X^i - \overline{X^i}) (X^i - \overline{X^i})'
           + \overline{X^i} \; \overline{X^{i'}} \nonumber
      \end{equation}

      \textbf{
      Multiplying the equation by $N$ gives the result.
      }

      \textbf{
      Now, calculating:
      }

      \begin{eqnarray}
      X'X &=& (N-1) \hat{V}(x) + N \overline{x} \; \overline{x} \nonumber\\
          &=& 7534 
              \left[
              \begin{array}{r r r}
              0 &         0 &         0 \\
              0 & 584022051 & 165336858 \\
              0 & 165336858 &  90425970 
              \end{array}
              \right]
              + 7535
              \left[
              \begin{array}{r}
              1 \\
              20785 \\
              9853
              \end{array}
              \right]
              \left[
              \begin{array}{r r r}
              1 & 20785 & 9853
              \end{array}
              \right]
              \nonumber\\
          &=& 7534 
              \left[
              \begin{array}{r r r}
              0 &         0 &         0 \\
              0 & 584022051 & 165336858 \\
              0 & 165336858 &  90425970 
              \end{array}
              \right]
              + 7535
              \left[
              \begin{array}{r r r}
              1     &     20785 &      9853 \\
              20785 & 432016225 & 204794605 \\
              9853  & 204794605 &  97081609
              \end{array}
              \right]
              \nonumber\\
          &=& \left[
              \begin{array}{r r r}
              7535             & 1.57 \times 10^8  & 7.42 \times 10^7 \\
              1.57 \times 10^8 & 7.66 \times 10^12 & 2.79 \times 10^12 \\
              7.42 \times 10^7 & 2.79 \times 10^12 & 1.41 \times 10^12
              \end{array}
              \right]
              \nonumber
      \end{eqnarray} 

 


\item When there is a constant in the model, what do the first
      row and the first column of $X'X$ contain?

      \textbf{
      The 1,1 position contains $N$ and the other elements of the
      first row/column contain the sum of each of the corresponding
      $X$s.
      }

\end{enumerate}

\end{document}