Mathematische Statistik - Übung Ergänzungsaufgabe 2 Beispiel 2

From StatWiki
Jump to: navigation, search

Let  \theta \sim N(\mu, \tau^2) \, and  X|\theta \sim N(\theta, \sigma^2) \, with  \sigma^2 \, known. What is the posterior distribution of  \theta  \, given  X \,

 
\begin{align}
\pi(\theta|x) 
& \propto \exp\left( - \frac 1 2 \frac{ (\theta - \mu )^2 }{ \tau^2 } \right) \exp\left( - \frac 1 2 \frac{ (x - \theta )^2 }{ \sigma^2 } \right) \\
& = \exp\left( - \frac 1 2 \left( \frac{ (\theta - \mu )^2 }{ \tau^2 } \frac{ (x - \theta )^2 }{ \sigma^2 } \right) \right) \\
& = \exp\left( - \frac 1 2 \left( \frac{ \sigma^2 (\theta^2 - 2 \mu \theta + \mu^2 ) + \tau^2 (x^2 - 2 x \theta + \theta^2) }{ \tau^2 \sigma^2 } \right) \right) \\
& \propto \exp\left( - \frac 1 2 \left( \frac{ \theta^2 (\sigma^2 + \tau^2)  - 2 \theta (\mu \sigma^2 + x \tau^2)}{ \tau^2 \sigma^2 } \right) \right) \\
& \propto \exp\left( - \frac 1 2 \left( \frac{ \theta^2  - 2 \theta \frac{\mu \sigma^2 + x \tau^2}{\sigma^2 + \tau^2}}{ \frac{\tau^2 \sigma^2}{\sigma^2 + \tau^2} } \right) \right) \\
& \propto \exp\left( - \frac 1 2 \left(\frac{1}{\sigma^2} + \frac{1}{\tau^2} \right)^{-1} \left(\theta - \frac{ \frac{\mu}{\tau^2} + \frac{x}{\sigma^2} }{ \frac{1}{\sigma^2} + \frac{1}{\tau^2} } \right)^2 \right) \\
\end{align}\,

 \Rightarrow \pi(\theta|x) \sim N\left(\frac{ \frac{\mu}{\tau^2} + \frac{x}{\sigma^2} }{ \frac{1}{\sigma^2} + \frac{1}{\tau^2} },  \left(\frac{1}{\sigma^2} + \frac{1}{\tau^2} \right)^{-1} \right)\,