Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to learn up some matlab to do some basic computer exercises and I have a small doubt in a question, the problem first arises in my very little knowledge in the subject of pattern recognition owing to my school schedule. I hope I don't come out as a total noob, but just help me out with parts B and C from the below image

the question

For the 2D asked in part b i just added x1+x2 for one data set, x2+x3 for the second and x1+x3 for the third. Is that the right way of doing it ? If not please tell me how the different pairing datasets should be formed.


share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

When you say "added", do you mean you found the actual sums, as follows? $$ \begin{array}{r} 0.42 - 0.087 \\ -0.2-3.3 \\ 1.3-0.32 \\ 0.39 + 0.71 \\ \vdots\quad\qquad{} \end{array} $$ If so, that doesn't get you the estimates for the two-dimensional Gaussian distribution. What you need is the estimated mean and variance, and the variance is a $2\times 2$ matrix, sometimes called the "covariance matrix" because its entries are covariances (in particular, its diagonal entries are variances). Notice the pair $(\mu,\Sigma)$. The expected value $\mu$ is normally (no pun intended) thought of as a $2\times1$ column vector. Its entries will be just the average for the first column in your table and the average for the second column. The matrix $$ \Sigma = \begin{bmatrix} \sigma_{11} & \sigma_{12} \\ \sigma_{12} & \sigma_{22} \end{bmatrix} $$ has as entries the variance $\sigma_{11}$ of the first scalar-valued random variable, the variance $\sigma_{22}$ of the second one, and the covariance $\sigma_{12}$ between them.

The MLE for $\sigma_{11}$ is $$ \frac{1}{10}\sum_{i=1}^{10} (x_{1i} - \bar{x}_{1\bullet})^2 $$ where $$\bar{x}_{1\bullet}= \frac{1}{10}\sum_{i=1}^{10} x_{1i}$$ is the sample average for the first column. (This differs from the conventional unbiased estimate in that the denominator is $10$ rather than $10-1$) The MLE for $\sigma_{22}$ is found similarly by using the second column. The MLE for $\sigma_{12}$ is $$ \frac{1}{10}\sum_{i=1}^{10} (x_{1i}-\bar{x}_{1\bullet})(x_{2i}-\bar{x}_{2\bullet}). $$ See this section of a Wikipedia article.

The article Estimation_of_covariance_matrices.

share|improve this answer
yes i did add them up, and got a single dimensional dataset, thank you for your answer, the idea is now clear! –  Aadi Droid Nov 1 '11 at 4:31
add comment

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.