A coin has unknown heads probability with prior . After 10 tosses you see 7 heads and 3 tails. Find the posterior, the MLE, the MAP estimate and the posterior mean. What is the probability that the next toss is heads, and the probability that the next two tosses are both heads?
Probabilistic models, Conjugate priors
Level L2 Elementary. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can use Beta–Binomial conjugacy and tell the MLE, MAP and posterior mean apart.
Key idea
A Beta prior is conjugate to the Binomial likelihood. Multiply by to get . The predictive probability of heads is the posterior mean.
Steps
- Combine prior and likelihood: the prior density is proportional to and the likelihood for 7 heads and 3 tails is proportional to , giving posterior . This is .
- MLE ignores the prior: .
- MAP is the mode of : .
- Posterior mean is . The prior pulls both estimates from 0.7 towards 0.5.
- Next toss: .
- Next two tosses: . This is more than , because the tosses are not independent once is unknown.
Common mistakes
- Mixing up the mode and the mean of the Beta. They differ by the and terms.
- Computing as . This treats as known at its mean.
- Forgetting to add the prior's pseudo-counts and to the data counts, or adding and by mistake.
- Saying that MAP equals the MLE here. They are equal only for a flat Beta(1,1) prior.
How long your answer should be
Half a page; 4 minutes.
Read this
Previous in Probabilistic models: In the model with prior and noise , you observe and . Find the posterior mean and variance of . How is the posterior mean related to ridge regression?
Next in Probabilistic models: You want samples from on (the Beta(2,2) density) using a Uniform(0,1) proposal. Find the smallest valid envelope constant , the acceptance rule and the acceptance probability. What changes if you only know the unnormalised density ?