Machine-translated by Google. Questions are authored in English.
Top

Discussion

Suppose given \(\theta\), the random variable X follows a normal distribution with mean \(\theta\) and variance 1. Let the prior density of \(\theta\) be Bernoulli with parameter 1/2. Then the posterior distribution of \(\theta\) is :

  • A.\(2e^{-1/2\,(x - \theta)^{2}}\)
  • B.\(\frac{1}{2}e^{-1/2\,(x - \theta)^{2}}\)
  • C.\(\dfrac{e^{x\theta - \theta^{2}/2}}{1 + e^{x - 1/2}}\)
  • D.\(\dfrac{e^{x^{2} + x\theta - \theta^{2}/2}}{1 + e^{x - 1/2}}\)

Answer: C

The posterior is \(\dfrac{e^{x\theta - \theta^{2}/2}}{1 + e^{x - 1/2}}\), for \(\theta \in \{0, 1\}\).

The prior puts mass 1/2 on each of \(\theta = 0\) and \(\theta = 1\), so the posterior is proportional to the likelihood:

\[ \begin{aligned} \pi(\theta \mid x) &\propto e^{-(x - \theta)^{2}/2} \propto e^{x\theta - \theta^{2}/2} \\ \text{at } \theta = 0 &: 1,\quad \text{at } \theta = 1 : e^{x - 1/2} \end{aligned} \]

after dropping the factor \(e^{-x^{2}/2}\), which does not depend on \(\theta\). Normalising by the sum \(1 + e^{x - 1/2}\) gives the third option.

The first two options are unnormalised likelihoods that do not sum to 1 over \(\theta\). The last keeps an \(e^{x^{2}}\) factor in the numerator that should have cancelled, so its two values do not add to 1.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.