Statistik 3 - Prüfung 2.2.2005 - Beispiel 3

From StatWiki
Jump to: navigation, search

Sei Y=X \beta + u, \operatorname{E}(u) = 0, X \, eine nichtzufällige n \times k\, Matrix, \operatorname{rang}(X) = k \,.

Weiters sei eine 1. Spalte von X\, der Vektor i = (1, \ldots, 1)'\,.

Beispiel 3 a

Zeigen Sie, dass TSS = ESS + RSS \, und definieren Sie R^2\,.

Meine Lösung: Statistik 3 - Beispiel 31
Nina's Lösung:
 
TSS = \sum_{i=1}^n (y_i - \bar y)^2 
1. TSS in Matrix Schreibweise

 \bar y = 
\frac 1 n \sum_{i=1}^n y_i \cdot 1 = 
\frac 1 n
\begin{pmatrix} 1 & 1 & \ldots & 1 \end{pmatrix} 
\begin{pmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{pmatrix} = 
\frac 1 n i ' Y


wobei i = \begin{pmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{pmatrix} 

 \begin{matrix}
Y - i \overline Y = 
Y - i \frac 1 n i ' Y =
Y - \frac 1 n i i ' Y =
& \underbrace{(I_n - \frac 1 n i i')} & Y = A Y \\
& A & 
\end{matrix}
 

(Y - i \overline Y)^2 = (Y - i \overline Y)'(Y - i \overline Y) = Y'A'AY = TSS 

A' = 
(I_n - \frac 1 n i i')' =
I_n' - \frac 1 n (i i')' =
I_n - \frac 1 n i i' = A \Rightarrow
 symmetrisch

i ' i = n \, 

A \cdot A =
(I_n - \frac 1 n i i') (I_n - \frac 1 n i i') =
I_n - \frac 1 n i i' - \frac 1 n i i' + \frac{1}{n^2} i i' i i'  =
  

 =
I_n - \frac 2 n i i' + \frac{n}{n^2} i i' =
I_n - \frac 1 n i i' =
A \Rightarrow  Idempotent

definiere äquivalent dazu ESS als \hat Y ' A \hat Y\,

da A \hat u = \hat u \,

\begin{matrix}
A \hat u = (I_n - \frac 1 n i i') \hat u = \hat u - & \underbrace{\frac 1 n i i' \hat u} & = \hat u \\
& \bar{\hat u} = 0 & 
\end{matrix}


\begin{matrix}
TSS =
Y'AY = (\hat Y + \hat u)' A (\hat Y + \hat u) =
& \underbrace{\hat Y' A \hat Y} & +
\hat Y' & \underbrace{A \hat u} & + 
& \underbrace{\hat u' A} & \hat Y +
& \underbrace{\hat u ' A \hat u} & = \\
& ESS & & \hat u & & \hat u' & & RSS &
\end{matrix}


\begin{matrix}
TSS = ESS + RSS + & \underbrace{\hat Y ' \hat u} & + &\underbrace{\hat u ' \hat Y} \\
& 0 & & 0 
\end{matrix}


\begin{matrix}
\hat Y ' \hat u = (X \hat \beta)' \hat u =
\hat \beta'  X' \hat u =
\hat \beta ' & X'(Y - X \hat \beta) & = \hat \beta' \cdot 0 = 0\\
& = 0 \qquad \mathrm{Normalgleichungen} & 
\end{matrix}


R^2 = \frac{ESS}{TSS} = \frac{\hat Y ' A \hat Y}{Y'AY} 

Beispiel 3 b

Zeigen Sie, dass R^2 = r_{Y \hat Y}^2 \,, wobei r_{Y \hat Y}^2\, der empirische Korrelationskoeffizient zwischen Y\, und \hat Y\, ist.


R^2 = 
\frac{\hat Y ' A \hat Y}{Y'AY} = 
\frac{\hat Y ' A \hat Y}{Y'AY} \cdot \frac{\hat Y ' A \hat Y}{\hat Y ' A \hat Y} = 

\hat Y ' A \hat Y \, hat Dimension  1 \times n \qquad n \times n \qquad n \times 1 \,
 = 
\frac{(\hat Y ' A \hat Y)^2}{Y'AY \hat Y ' A \hat Y} = 
\frac{((Y - \hat u) ' A \hat Y)^2}{Y'AY \hat Y ' A \hat Y} = 
\frac{(Y ' A \hat Y - \hat u ' A \hat Y)^2}{Y'AY \hat Y ' A \hat Y} = 

\hat u ' A = \hat u ' \,
 =
\frac{(Y ' A \hat Y - \hat u ' \hat Y)^2}{Y'AY \hat Y ' A \hat Y} = 

\hat u ' \hat Y = 0 \,
 =
\frac{(Y ' A \hat Y)^2}{Y'AY \hat Y ' A \hat Y} = 
\frac{(Y ' A ' A \hat Y)^2}{Y'AY \hat Y ' A \hat Y} = 
\frac{((A  Y) ' (A \hat Y))^2}{Y'AY \hat Y ' A \hat Y} = 


=
\frac{ (\sum_{i=1}^n (y_i - \overline y) (\hat{y}_i - \overline \hat y) )^2}
{\sum_{i=1}^n (y_i - \overline y)^2 \sum_{i=1}^n (\hat{y}_i - \overline \hat y)^2} =
\frac{ \frac{1}{n^2} (\sum_{i=1}^n (y_i - \overline y) (\hat{y}_i - \overline \hat y) )^2}
{ \frac 1 n \sum_{i=1}^n (y_i - \overline y)^2 \frac 1 n \sum_{i=1}^n (\hat{y}_i - \overline \hat y)^2} =


 =
\frac{s_{y,\hat y}^2}{s_y^2 s_{\hat y}^2} = 
\left( \frac{s_{y,\hat y}}{s_y s_{\hat y}} \right)^2 = 
r_{y,\hat y}^2