What is a conjugate prior, and why is the Beta prior for a coin's heads probability easy to interpret as 'imaginary extra tosses'? What is the posterior for a Beta(1, 1) prior after 3 heads and 1 tail?
Probabilistic models, Conjugate priors
Level L1 Beginner. Length Short. Nature Th+Mat Both.
What's being asked
Whether you know why some prior and likelihood pairs give a posterior of the same family, so updating becomes simple counting.
Key idea
A prior is conjugate to a likelihood if the posterior is in the same family as the prior. For a coin, the prior and Bernoulli tosses are conjugate: after seeing heads and tails the posterior is . So and act like pseudo-counts, imaginary heads and tails you believed in before tossing.
Steps
- Say what we want: a belief about the unknown heads probability before data (prior), data (tosses), and an updated belief after data (posterior).
- State the update rule: add the real counts to the prior counts. Posterior . No integral needs doing; this is the whole benefit of conjugacy.
- Interpret : is flat (all values of equally likely) and behaves like having seen one imaginary head and one imaginary tail. A big prior such as is like 100 imaginary tosses and moves slowly.
- Do the example: prior , data 3 heads and 1 tail, so posterior .
- Read it: the posterior mean is . With more tosses the real counts outweigh the pseudo-counts and the prior matters less.
Common mistakes
- Thinking 'conjugate' means the prior is correct. It only means the algebra stays in one family.
- Adding the prior parameters to each other or multiplying counts. Heads are added to and tails to , nothing else.
- Forgetting that a strong prior needs a lot of data to be overcome. It acts like a large set of earlier tosses.
How long your answer should be
About 2 minutes: the update rule, the pseudo-count reading, then Beta(4, 2).
Read this
Previous in Probabilistic models: What is a latent (hidden) variable in a probabilistic model, and why might we add one? Heights of students are recorded, but not whether each student is in the junior batch or the senior batch. If half are juniors averaging 160 cm and half are seniors averaging 170 cm, what is the overall average height?
Next in Probabilistic models: What is a Bayesian network, and why does it need far fewer parameters than the full joint distribution?