# Multivariate posterior probability

This is a 2-dimensional pattern recognition system that I am working on.

It is known that the distribution between the two classes are $1/2$ and $1/2$ respectively for class $\omega_1$ and class $\omega_2$. The feature vectors of the two classes are normally distributed around:

• $\mu_1 = \begin{bmatrix}3\\6\end{bmatrix}$ with covariance matrix $\Sigma_1=\begin{bmatrix}1/2 & 0\\0 & 2\end{bmatrix}$ for class $\omega_1$
• and around $\mu_2 = \begin{bmatrix}3\\-2\end{bmatrix}$ with covariance matrix $\Sigma_2=\begin{bmatrix}2 & 0\\0 & 2\end{bmatrix}$ for class $\omega_2$.

I am having some trouble with showing the ́posteriori probabilities. Does anyone know how to compute the posterior probabilities?

• No ticks (yet) for the answer ? – Gilles Mar 2 '16 at 13:42

Hint:

With Bayes' theorem you have:

$$p\left(\omega_i|\mathbf{x}\right) = \frac{p\left(\mathbf x|\omega_i\right)p(\omega_i)}{p\left(\mathbf{x}\right)}=\frac{p\left(\mathbf x|\omega_i\right)p(\omega_i)}{\sum_{i=1}^N p\left(\mathbf{x}|\omega_i\right)p(\omega_i)}$$

In your case $N = 2$, and your priors are equal: $p(\omega_1) = p(\omega_2) = \frac 12$. So, you have your posteriors as:

$$p\left(\omega_i|\mathbf{x}\right) = \frac{p\left(\mathbf x|\omega_i\right)}{\sum_{i=1}^2 p\left(\mathbf{x}|\omega_i\right)}=\frac{p\left(\mathbf x|\omega_i\right)}{p\left(\mathbf{x}|\omega_1\right)+p\left(\mathbf{x}|\omega_2\right)}$$

Your feature vector in each class $\omega_i$ are distributed according to:

$$p(\mathbf x|\omega_i)=\frac{1}{2\pi \left|\Sigma_i\right|^{1/2}}\exp\left[-\frac 12 (\mathbf x - \mu_i)^T \Sigma_i^{-1}(\mathbf x - \mu_i)\right]$$

And you plug all the information you have in your posteriors.