# Find covariance if given mean and variance

I have a signal x that I want to classify in one of the classes A and B in which the means are

Ma=[0.5,0.6] and Mb=[2,2]


and with variances

Va=1 and Vb=2.


And to classify the signal I have to use the Mahalanobis distance which requires the covariance S that those classes share and have in common. Can I find it if there is only given the mean and variance between those classes?

P.S I know this looks like a homework exercise but I have been looking everywhere and I could not find anything

• The two subclauses of your 'P.S.' are not logically connected. Is this a homework exercise? If so, please add the [self-study] tag & read its wiki. Jan 13, 2016 at 16:30
• Thanks you for adding the tag. What would you do if you had the full covariance matrices? Jan 13, 2016 at 16:46
• The mahalanobis distance formula requires the covariance matrice to be able to calculate the distances between the signal x to the classes A and B Jan 13, 2016 at 16:49
• The problem states that the two classes have a common covariance matrix that was produced by independent characteristics with variances Va=1 and Vb=2. Jan 16, 2016 at 16:03
• If we got the cov(A,B) right then I think I can solve it .Anyway thank you so much for your time that you spent helping me . Jan 16, 2016 at 16:22

You have two classes of objects that exist within a two dimensional space defined by two characteristics $(x_1, x_2)$. The issue here is how the data covary within that space. That is, there is some value for the correlation between $x_1$ and $x_2$. If you know that $x_1$ and $x_2$ are independent, then you know the correlation that corresponds to independence. From there, you can calculate the covariance using the definition of correlation: $${\rm Cor}(x_1, x_2) = \frac{{\rm Cov(x_1, x_2)}}{{\rm Var(x_1)}{\rm Var(x_2)}}$$ Remember that a correlation matrix is symmetrical. That is, $s_{12}=s_{21}$. With that last piece, you should be able to construct the correlation matrix and solve the problem.