A coin's probability of heads θ has prior Beta(2,2), and you observe 7 heads in 10 tosses. What is the posterior, and how do the MLE, the MAP estimate and the posterior mean compare?

Probability and statistics, Bayesian inference
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can use a conjugate prior and know the difference between the mode and the mean of a posterior.

Key idea

The Beta(a,b) density is proportional to θa−1(1−θ)b−1. It is conjugate to coin tosses: the posterior is again a Beta. A Beta(a,b) prior with h heads and t tails gives a Beta(a+h, b+t) posterior, here Beta(9,5).

Steps

  1. Write the two pieces. Likelihood: θ7(1−θ)3, ignoring the binomial coefficient, which does not depend on θ. Prior: Beta(2,2)∝θ1(1−θ)1.
  2. Multiply them (Bayes' rule, up to a constant): posterior ∝θ8(1−θ)4. This is the shape of Beta(9,5).
  3. Compute the three estimates. MLE =7/10=0.7. MAP is the mode of the posterior, α−1α+β−2=812≈0.667. Posterior mean =αα+β=914≈0.643.
  4. Give the uncertainty. Posterior variance =αβ(α+β)2(α+β+1)=45196×15≈0.0153, a standard deviation of about 0.12.
  5. Interpret. The prior acts like extra imaginary tosses (pseudo-counts) that pull the estimate towards 0.5, and the pull fades as you collect more data. The posterior mean is also the probability that the next toss is heads. Laplace smoothing, (h+1)/(n+2), is the Beta(1,1) case.

Common mistakes

How long your answer should be

Half a page; about 3 minutes.

Read this

Previous in Probability and statistics: A bootstrap sample of size n is drawn with replacement from n data points. What is the probability that a given point is left out, what does it tend to as n→∞, and how is this used?
Next in Probability and statistics: A bag holds 4 red and 6 blue balls. You draw 3 balls at random without replacement. What is the probability that exactly 2 are red?