next up previous


Postscript version of these notes

STAT 350: Lecture 16

Reading: There is no really relevant part of the text.

Theory of F and t tests

Independence: If $U_1, U_2, \ldots U_k$ are random variables then we call $U_1, \ldots,U_k$ independent if

\begin{displaymath}P(U_1 \in A_1 , \ldots , U_k \in A_k) = P(U_1 \in A_1 ) \times \cdots
\times P(U_k \in A_k)
\end{displaymath}

for any sets $A_1, \ldots , A_k$.

We usually either:

How do we prove independence? We use the notion of a joint density.

We say $U_1, \ldots,U_k$ have joint density function $f =f(u_1,\ldots,u_k)$ if

\begin{displaymath}P((U_1, \ldots,U_k) \in A) = \idotsint\limits_A f(u_1,\ldots,u_k) du_1
\cdots du_k
\end{displaymath}

We are interested here in joint densities because independence of $U_1, \ldots,U_k$ is equivalent to

\begin{displaymath}f(u_1,\ldots,u_k) = f_1(u_1) \times \cdots \times f_k(u_k)
\end{displaymath}

for some densities $f_1 ,\ldots,f_k$. In this case fi is the density of Ui.

[ ASIDE: notice that for an independent sample the joint density is the likelihood function!]

Application to Normals: Standard Case

If

\begin{displaymath}Z = \left[ \begin{array}{c} Z_1 \\ \vdots \\ Z_n\end{array} \right]
\sim MVN(0,I_{n \times n})
\end{displaymath}

then the joint density of Z, denoted $f_Z(z_1,\ldots,z_n)$ is

\begin{displaymath}f_Z(z_1,\ldots,z_n) = \phi(z_1) \times \cdots \times \phi(z_n)
\end{displaymath}

where

\begin{displaymath}\phi(z_i) = \frac{1}{\sqrt{2\pi}} e^{-z_i^2/2}
\end{displaymath}

So
\begin{align*}f_Z & = (2 \pi)^{-n/2} \exp\left\{ -\frac{1}{2} \sum_{i=1}^n z_i^2 \right\}
\\
& = (2 \pi)^{-n/2} \exp\left\{ -\frac{1}{2}z^Tz\right\}
\end{align*}
where

\begin{displaymath}z=\left[ \begin{array}{c} z_1 \\ \vdots \\ z_n \end{array} \right]
\end{displaymath}

Application to Normals: General Case

If $X=AZ+\mu$ and A is invertible then for any set $B \in R^n$ we have
\begin{align*}P(X \in B) & = P(AZ+\mu \in B)
\\
& =P(Z \in A^{-1}(B-\mu))
\\
&...
...2 \pi)^{-n/2} \exp\left\{
-\frac{1}{2}z^Tz\right\} dz_1 \cdots dz_n
\end{align*}
Make the change of variables $x=Az+\mu$ in this integral to get

\begin{displaymath}P(X \in B) = \idotsint\limits_B (2 \pi)^{-n/2}
\exp\left\{-\f...
...^T \left( A^{-1}
(x-\mu)\right) \right\} J(x) dx_1 \cdots dx_n
\end{displaymath}

where J(x) denotes the Jacobian of the transformation

\begin{displaymath}J(x) = J(x_1,\ldots,x_n) = \left\vert {\rm det}\left( \frac{\...
...t\vert
= \left\vert {\rm det}\left( A^{-1} \right) \right\vert
\end{displaymath}

Algebraic manipulation of the integral then gives

\begin{displaymath}P(X \in B) = \idotsint\limits_B (2 \pi)^{-n/2}
\exp\left\{-\f...
... (x-\mu) \right\}
\vert{\rm det } A^{-1} \vert dx_1\cdots dx_n
\end{displaymath}

where
\begin{align*}\Sigma & = AA^T
\\
\Sigma^{-1} & = \left( A^{-1}\right)^T \left( ...
...\left({\rm det} A^{-1}\right)^2
\\
& = \frac{1}{{\rm det} \Sigma}
\end{align*}
The conclusion of this algebra is that the $MVN(\mu,\Sigma)$ density is

\begin{displaymath}(2 \pi)^{-n/2} \exp\left\{- \frac{1}{2} (x-\mu)^T \Sigma^{-1} (x-\mu)
\right\} ({\rm det} \Sigma)^{-1/2}
\end{displaymath}

What if A is not invertible? Ans: there is no density.

How do we apply this density?

Suppose

\begin{displaymath}X = \left[\begin{array}{c} X_1 \\ \hline X_2 \end{array}\right]
\end{displaymath}

and

\begin{displaymath}\Sigma = \left[\begin{array}{c\vert c} \Sigma_{11} & \Sigma_{12}
\\
\hline
\Sigma_{21} & \Sigma_{22} \end{array}\right]
\end{displaymath}

If $\Sigma_{12}=0$ then

1.
$\Sigma_{21} = 0$

2.
In the homework you will verify that

\begin{displaymath}\Sigma^{-1} = \left[\begin{array}{c\vert c} \Sigma^{-1}_{11} & 0
\\
\hline
0 & \Sigma^{-1}_{22} \end{array}\right]
\end{displaymath}

3.
Writing

\begin{displaymath}x = \left[ \begin{array}{c} x_1 \\ \hline x_2 \end{array} \right]
\end{displaymath}

and

\begin{displaymath}\mu = \left[ \begin{array}{c} \mu_1 \\ \hline \mu_2 \end{array} \right]
\end{displaymath}

we find

\begin{displaymath}(x-\mu)^T \Sigma^{-1} (x-\mu) =
(x_1-\mu_1)^T \Sigma^{-1}_{11} (x_1-\mu_1) +
(x_2-\mu_2)^T \Sigma^{-1}_{22} (x_2-\mu_2)
\end{displaymath}

4.
So, if $n_1={\rm dim}(X_1)$ and $n_2 = {\rm dim}(X_2)$ we see that
\begin{align*}f_X(x_1,x_2) = (2\pi)^{-n_1/2}& \exp\left\{-\frac{1}{2}(x_1-\mu_1)...
...eft\{-\frac{1}{2}(x_2-\mu_2)^T
\Sigma^{-1}_{22} (x_2-\mu_2)\right\}
\end{align*}
so that X1 and X2 are independent.

Summary: If ${\rm Cov}(X_1,X_2) = {\rm E}[(X_1-\mu_1)(X_2-\mu_2)^T]=0$ then X1 is independent of X2.

Warning: This only works provided

\begin{displaymath}X = \left[\begin{array}{c} X_1 \\ \hline X_2 \end{array}\right] \sim
MVN(\mu,\Sigma)
\end{displaymath}

Fact: However, it works even if $\Sigma$ is singular, but you can't prove it as easily using densities.

Application:


\begin{align*}\hat\mu & = X\hat\beta = X(X^TX)^{-1} X^T Y
\\
& = X\beta + H \ep...
...= Y - X\hat\beta
\\
& = \epsilon -H\epsilon
\\
& = (I-H)\epsilon
\end{align*}
So

\begin{displaymath}\left[
\begin{array}{c} \hat\mu \\ \hline \hat\epsilon \end{a...
...
\left[
\begin{array}{c} \mu \\ \hline 0 \end{array}\right]}_b
\end{displaymath}

Hence

\begin{displaymath}\left[
\begin{array}{c} \hat\mu \\ \hline \hat\epsilon \end{a...
...begin{array}{c} \mu \\ \hline 0 \end{array}\right];AA^T\right)
\end{displaymath}

Now

\begin{displaymath}A = \sigma\left[
\begin{array}{c} H \\ \hline I-H \end{array}\right]
\end{displaymath}

so
\begin{align*}AA^T & = \sigma^2 \left[
\begin{array}{c} H \\ \hline I-H \end{arr...
...sigma^2 \left[ \begin{array}{cc} H & 0
\\ 0 & I-H\end{array}\right]
\end{align*}
The 0s prove that $\hat\epsilon$ and $\hat\mu$ are independent. It follows that $\hat\mu^T\hat\mu$, the regression sum of squares (not adjusted) is independent of $\hat\epsilon^T
\hat\epsilon$, the Error sum of squares.

Joint Densities

Suppose Z1 and Z2 are independent standard normals. In class I said that their joint density was

\begin{displaymath}f(z_1,z_2) = \frac{1}{2\pi} \exp(-(z_1^2+z_2^2)/2) \, .
\end{displaymath}

Here I want to show you the meaning of joint density by computing the density of a $\chi_2^2$ random variable.

Let U = Z12+Z22. By definition U has a $\chi^2$ distribution with 2 degrees of freedom. The cumulative distribution function of U is

\begin{displaymath}F(u) = P(U \le u).\end{displaymath}

For $u \le 0$ this is 0 so take $u \ge 0$. The event that $U\le u$ is the same as the event that the point (Z1,Z2) is in the circle centered at the origin and having radius u1/2, that is, if A is the circle of this radius then

\begin{displaymath}F(u) = P((Z_1,Z_2)\in A) \, .
\end{displaymath}

By definition of density this is a double integral

\begin{displaymath}\int\int_A f(z_1,z_2) \, dz_1\, dz_2 \, .
\end{displaymath}

You do this integral in polar co-ordinates. Letting $z_1 = r\cos\theta$ and $z_2 = r\sin\theta$ we see that

\begin{displaymath}f(r\cos\theta,r\sin\theta) = \frac{1}{2\pi} \exp(-r^2/2) \, .
\end{displaymath}

The Jacobian of the transformation is r so that $dz_1\,dz_2$ becomes $r\, dr\, d\theta$. Finally the region of integration is simply $0 \le \theta \le 2\pi$ and $0 \le r \le u^{1/2}$ so that

\begin{eqnarray*}P(U \le u)& =& \int_0^{u^{1/2}}\int_0^{2\pi} \frac{1}{2\pi} \ex...
...xp(-r^2/2) \right\vert _0^{u^{1/2}} \\
& = & 1-\exp(-u/2) \, .
\end{eqnarray*}


The density of U can be found by differentiating to get

\begin{displaymath}f(u) = \frac{1}{2} \exp(-u/2)\end{displaymath}

which is the exponential density with mean 2. This means that the $\chi^2_2$ density is really an exponential density.


next up previous



Richard Lockhart
1999-01-13