\documentclass[]{article}
\begin{document}

\begin{Large}



\begin{center}

Psychology 594

Multivariate Analysis


\end{center}


\vspace{2ex}

\noindent Solve all the problems first by hand; redo the numerical analyses
with MATLAB to check your results.  Note: you don't need to do any symbolic work in MATLAB; only reproduce the numerical results.

\vspace{6ex}


\noindent Homework I

\vspace{3ex}

\noindent Problem 1:

\medskip

\noindent Let $\mathbf{x}^{'} = [6, 2, 1]$ and $\mathbf{y}^{'} = [-1, 3, 1]$.\\

\bigskip

(a) Graph the two vectors.

\medskip


(b) Find (i) the length of $\mathbf{x}$, (ii) the angle between
$\mathbf{x}$ and $\mathbf{y}$, and (iii) the projection of
$\mathbf{y}$ on $\mathbf{x}$.

\medskip


(c) Because $\bar{x}=3$ and $\bar{y}=1$, graph the mean centered vectors, $[6-3, 2-3, 1-3] =[3,
-1, -2]$ and $[-1 -1, 3-1, 1-1]=[-2, 2, 0]$.  Calculate the correlation between the three observation pairs.  Find the cosine of the angle between the two mean-corrected vectors, and comment on the relation to the correlation.

\vspace{4ex}

\noindent Problem 2:

\medskip

\noindent Given the matrices

\[
\mathbf{A} = \left[
  \begin{array}{cc}
    1 & 4 \\
      2 & 6 \\
    3 & 8 \\
    \end{array}
\right] \ , \hspace{2em}
\mathbf{B} = \left[
  \begin{array}{cc}
    1 & 3 \\
      1 & 4 \\
    \end{array}
\right] \ ,\hspace{2em}
 \mathbf{C} = \left[
  \begin{array}{c}
    5  \\
   -4  \\
    2  \\
    \end{array}
\right]
\]

\noindent perform the indicated multiplications:

\vspace{1ex}

(a) 5$\mathbf{A}$

\smallskip

(b) $\mathbf{A} \mathbf{B}$

\smallskip


(c)  $\mathbf{B}^{'} \mathbf{A}^{'}$

\smallskip


(d) $\mathbf{C}^{'} \mathbf{A}$

\smallskip

(e) Is $\mathbf{B} \mathbf{A}$ defined?  If so, calculate it.



\vspace{4ex}

\noindent Problem 3:

\medskip

\noindent Verify the following properties of the transpose and inverse when


\[
\mathbf{A} = \left[
  \begin{array}{cc}
    2 & 4 \\
      3 & 1 \\
    \end{array}
\right] \ , \hspace{2em} \mathbf{B} = \left[
  \begin{array}{cc}
    5 & 2 \\
      2 & 1 \\
    \end{array}
\right]
\]


 (a) $(\mathbf{A}^{'})^{'} = \mathbf{A} $

\smallskip


(b) $(\mathbf{B}^{'})^{-1} = (\mathbf{B}^{-1})^{'} $

\smallskip


(c) $(\mathbf{A} \mathbf{B})^{'} = \mathbf{B}^{'} \mathbf{A}^{'}$

\smallskip

(d) $(\mathbf{AB})^{-1} = \mathbf{B}^{-1} \mathbf{A}^{-1}$


\vspace{4ex}

\noindent Problem 4:

\noindent Verify that


\[
\mathbf{Q} = \frac{1}{3}\left[
  \begin{array}{ccc}
    2 & -2 & 1 \\
    1 & 2 & 2 \\
    2 & 1 & -2 \\
  \end{array}
\right]
\]

\noindent is an orthogonal matrix; calculate $\mathbf{QQ}'$, $\mathbf{Q}'\mathbf{Q}$, and $\mathbf{Q}^{-1}$.

\newpage

\noindent Homework II




\bigskip

\noindent Problem 1:

\medskip

\noindent Let


\[
\mathbf{A} = \left[
  \begin{array}{cc}
    9 & -3 \\
      -3 & 1 \\
    \end{array}
\right]
\]

 (a) Is $\mathbf{A}$ symmetric?

\smallskip


(b) Is $\mathbf{A}$ positive definite?


\vspace{6ex}

\noindent Problem 2:

\medskip

\noindent Let

\[
\mathbf{A} = \left[
  \begin{array}{cc}
    1 & 2 \\
      2 & -2 \\
    \end{array}
\right]
\]

a) Determine the eigenvalues and associated eigenvectors of $\mathbf{A}$.  Find the spectral decomposition of $\mathbf{A}$.

\medskip

b) Find $\mathbf{A}^{-1}$.

\medskip

c) Compute the eigenvalues and eigenvectors of $\mathbf{A}^{-1}$, and write out the spectral decomposition of $\mathbf{A}^{-1}$.  Compare this spectral decomposition with that for $\mathbf{A}$.


\vspace{6ex}

\noindent Problem 3:

\medskip

\noindent A quadratic form $\mathbf{x}^{'}\mathbf{A}\mathbf{x}$ is
said to be positive definite if the matrix $\mathbf{A}$ is positive
definite. Is the quadratic form, $4x_1^2 + 4 x_2^2 - 6 x_1 x_2$ ,
positive definite?

\vspace{6ex}

\noindent Problem 4:

\medskip

\noindent Determine the square root matrix $\mathbf{A}^ {1/2}$ using
the matrix $\mathbf{A}$ from the previous problem 3. Also, determine
$\mathbf{A}^ {-1/2}$, and show that $\mathbf{A}^ {1/2}\mathbf{A}^
{-1/2} = \mathbf{A}^ {-1/2} \mathbf{A}^ {1/2} = \mathbf{I}$.

\vspace{6ex}

\noindent Problem 5:

\medskip


\noindent (a) Consider an arbitrary $n \times p$ matrix $\mathbf{A}$.  Then $\mathbf{A}'\mathbf{A}$ is a symmetric $p \times p$ matrix.  Show that $\mathbf{A}'\mathbf{A}$ is necessarily positive semi-definite. (Hint: set $\mathbf{y} = \mathbf{A}\mathbf{x}$ so that $\mathbf{y}'\mathbf{y} = \mathbf{x}'\mathbf{A}'\mathbf{A}\mathbf{x}$)

\bigskip

\noindent (b) Using the matrix

\[
\mathbf{A} = \left[
  \begin{array}{ccc}
    4 & 8 & 8\\
      3 & 6 & -9 \\
    \end{array}
\right]
\]

(1) Calculate $\mathbf{A}\mathbf{A}'$ and obtain its eigenvalues and eigenvectors.

(2) Calculate $\mathbf{A}'\mathbf{A}$ and obtain its eigenvalues and eigenvectors.  Check that the nonzero eigenvalues are the same as those in (1).

(3) Obtain the singular-value decomposition of $\mathbf{A}$.




\newpage

\noindent Homework III




\bigskip



\noindent Problem 1:

\medskip



\noindent Let $\mathbf{X}$ have covariance matrix

\[
\mathbf{\Sigma} = \left[
  \begin{array}{ccc}
    25 & 0 & 2 \\
   0 & 1 & 1 \\
    2 & 1 & 9 \\
  \end{array}
\right]
\]

 (a) Determine \mbox{\boldmath$\rho$} (the correlation matrix) and $\mathbf{V}^{1/2}$ (a diagonal matrix containing the standard deviations along the main diagonal).

\smallskip


(b) Multiply your matrices to check the relation $ \mathbf{V}^{1/2}
\mbox{\boldmath$\rho$} \mathbf{V}^{1/2} = \mathbf{\Sigma}$.

\smallskip


(c) Find $\rho_{13}$.

\smallskip


(d) Find the correlation between $X_1$ and $\frac{1}{4} X_2 +
\frac{1}{2} X_3$.


\vspace{6ex}

\noindent Problem 2:

\medskip

\noindent (a) Derive expressions for the mean and variances of the following linear combinations in terms of the means and covariances of the random variable $X_{1}$, $X_{2}$, and $X_{3}$.

1) $X_{1} - 2 X_{2}$

2) $- X_{1} + 3 X_{2}$

3) $X_{1} + X_{2} + X_{3}$

4) $X_{1} + 2 X_{2} - X_{3}$

5) $3 X_{1} - 4 X_{2}$, when $X_{1}$ and $X_{2}$ are independent random variables.


\bigskip

\noindent (b) The random vector $\mathbf{X}' = [X_{1}, X_{2}, X_{3}, X_{4}]$ has mean vector $[4, 3, 2, 1]$ and variance-covariance matrix

\[
\left[
  \begin{array}{cccc}
    3 & 0 & 2 & 2 \\
   0 & 1 & 1 & 0 \\
    2 & 1 & 9 & -2 \\
    2 & 0 & -2 & 4 \\
  \end{array}
\right]
\]

Let $\mathbf{X}^{(1)}$ = $[X_{1}, X_{2}]'$ and  $\mathbf{X}^{(2)}$ = $[X_{3}, X_{4}]'$, and let $\mathbf{A} = [1 \ \ 2]$ and
\[
\mathbf{B} = \left[
  \begin{array}{cc}
    1 & -2 \\
      2 & 1 \\
    \end{array}
\right]
\]

Find: $E(\mathbf{X}^{(1)})$; $E(\mathbf{AX}^{(1)})$; $E(\mathbf{X}^{(2)})$; $E(\mathbf{BX}^{(2)})$; $Cov(\mathbf{X}^{(1)})$; $Cov(\mathbf{AX}^{(1)})$; $Cov(\mathbf{X}^{(2)})$; $Cov(\mathbf{BX}^{(2)})$; $Cov(\mathbf{X}^{(1)}, \mathbf{X}^{(2)})$; $Cov(\mathbf{AX}^{(1)},\mathbf{BX}^{(2)})$.

\bigskip

For

\[
\mathbf{A} = \left[
  \begin{array}{cc}
    9 & -2 \\
      -2 & 6 \\
    \end{array}
\right]
\]

find the maximum value of $\mathbf{x}'\mathbf{A}\mathbf{x}$ for $\mathbf{x}'\mathbf{x} = 1$.



\vspace{6ex}

Problem 3:

\medskip

\noindent Give your own numerically specified $4 \times 3$ matrix, say, $\mathbf{A}$, and do the MATLAB operations of \verb+rank+, \verb+corrcoef+, \verb+cov+, \verb+mean+, \verb+median+, \verb+std+, and \verb+sum+ on $\mathbf{A}$, and \verb+inv+, \verb+trace+, \verb+det+, \verb+eig+, \verb+svd+, \verb+poly+, and \verb+sqrtm+ on $\mathbf{A}'\mathbf{A}$.


\end{Large}


\end{document}
