I'm currently learning for an exam and have the problem with determining the a-posteriori density in the following setup:
$X \mid (\Theta = \theta)$ ~ $N(\theta,1)$ and the a-priori is given by $\pi(\Theta = 1) = \frac{1}{2}, \pi(\Theta = 2) = \frac{1}{2}$.
So the likelihood is given by
$$ l(\theta \mid \underline{x})= \Big(\frac{1}{\sqrt{2\pi}} \Big)^n \exp(-\sum_{i=1}^n \frac{(x_i-\theta)^2}{2}) $$
But what is the a-priori and how can I calculate then the a-posteriori? My guess would be a Bernoulli-distribution, but in this case, I really don't know how to move on with the calculations.
You will have $$\pi(\Theta =1 \mid \underline{X}=\underline{x}) = \dfrac{\pi(\Theta =1)\, l(\Theta =1 \mid \underline{X}=\underline{x})}{\pi(\Theta =1)\, l(\Theta =1 \mid \underline{X}=\underline{x})+\pi(\Theta =2)\, l(\Theta =2 \mid \underline{X}=\underline{x})}$$
and similarly $$\pi(\Theta =2 \mid \underline{X}=\underline{x}) = \dfrac{\pi(\Theta =2)\, l(\Theta =2 \mid \underline{X}=\underline{x})}{\pi(\Theta =1)\, l(\Theta =1 \mid \underline{X}=\underline{x})+\pi(\Theta =2)\, l(\Theta =2 \mid \underline{X}=\underline{x})}$$
If you substitute your $\frac12$s and your $l(\theta \mid \underline{x})$ you will find some cancellation of proportionality terms