[Tex/LaTex] Notation for multivariate normal

math-mode

I would like to find a good notation and LaTeX way to depict a multivariate normal with a specific covariance matrix (ie. not a generic sigma). Here is my attempt, which compiles but does not look very pretty (although I do not know why specifically). Is there a better or more conventional way?

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amsmath}
\usepackage{babel}
\begin{document}

\begin{eqnarray*}
\begin{pmatrix}W_{1}\\
W_{2}\\
\epsilon
\end{pmatrix} & \sim & N\left[\left(\begin{array}{c}
0\\
0\\
0
\end{array}\right),\left(\begin{array}{ccc}
3 & d & d\\
d & 1 & d\\
d & d & 1
\end{array}\right)\right]\\
Z & = & W_{1}^{3}+\epsilon
\end{eqnarray*}

\end{document}

It compiles as follows:

enter image description here

Best Answer

Don't use eqnarray.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align*}
\begin{pmatrix}W_{1}\\
W_{2}\\
\epsilon
\end{pmatrix} &\sim  N
\begin{bmatrix}
\begin{pmatrix}
0\\
0\\
0
\end{pmatrix}\!\!,&
\begin{pmatrix}
3 & d & d\\
d & 1 & d\\
d & d & 1
\end{pmatrix}
\end{bmatrix}\\[2\jot]
Z &=  W_{1}^{3}+\epsilon
\end{align*}

\end{document}

enter image description here

Related Question