Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently playing around with Gaussian Mixture Models in order to model stock returns. Part of all this is using the EM algorithm to obtain MLE of parameters. I have found a package in R (mixtools) that provides the functions normalmixEM and mvnormalmixEM. I have tried it but I don't understand the output for mvnormalmix (my input consisted of a 200x2 matrix): Why do I get for two components two 2x1 mu-vectors and why do I get two 2x2 covariance matrices? Isn't that one too many?

If you could clear that up or give me a link where the output of the multivariate case is explained (because I find it in general a bit confusing) I would very much appreciate it.

share|improve this question
up vote 1 down vote accepted

I guess the output is expected. If you model the returns of $n$ stock using a simple gaussian mixture process with $s$ states, the outputs will consist of $s$ vectors $\mu_i$ of size $n \times 1$, $s$ matrix $\Sigma_i$ of size $n \times n$ and $1$ transition matrix $P$ of size $s \times s$.

Indeed, knowing the state $i$, you have a multivariate gaussian model for the $n$ returns, hence parameters $\mu_i$ and $\Sigma_i$.

To describes how the model goes from one state to the other, the transition matrix $P$ contains $$p_{ij} = P[s_{t+1}=j|s_t = i]$$

share|improve this answer
Thanks for the answer! For the case with 2 stocks and 2 components, is it correct when I say that the first $\mu$-vector contains the mean of the two components for the first stock? Even if this is correct, I cannot interpret $\Sigma$. Usually $\Sigma$ denotes the covariance matrix - but that would mean I have 4 variances and 2 covariances. Could someone explain what each value in both $\Sigma$ signifies? – rexcel Jan 18 '13 at 20:06
Could really use some help here...I'm still not sure what the output tells me. – rexcel Jan 20 '13 at 12:28
If you have two stocks and two regimes, for each regime there is 2 expected returns, 1 correlation and 2 standard deviations. Correlation and standard deviations are stored in the $\Sigma$ matrix. – ThePawn Jan 21 '13 at 10:13
So, the correlation in the $\Sigma_1$ matrix denotes the correlation between stock 1 and stock 2 for observations that belong to component 1? – rexcel Jan 21 '13 at 21:17
Yes, $\Sigma_1$ is the variance-covariance matrix for regime $1$. – ThePawn Jan 22 '13 at 0:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.