I want to write the p-dimensional normal density formula in latex. I am not getting it correct. Can I get the code?

+3 votes

Best answer

You can try the following latex code for the multivariate Gaussian density. It has been tested on overleaf.

\begin{equation}\label{eq:multivariate_gaussian_pdf}

\begin{split}

\mathcal{N} (x_i|\mu_k, \Sigma_k) = \frac{1}{(2\pi)^{(p/2)} |\Sigma_k|^{1/2}} \exp \left\{- \frac{1}{2} \left(x_i-\mu_k\right)^{'} \Sigma_k^{-1} \left(x_i-\mu_k \right) \right\}

\end{split}

\end{equation}

The above code produces the following formula: