Prerequisites
Probability densities, Bayes' theorem, Bernoulli sampling, and integration.
Multiply the prior density by the likelihood and normalize. For a Beta(a,b) prior and s successes in n independent Bernoulli trials with one fixed probability p, the posterior is Beta(a+s,b+n-s). Inference remains conditional on these assumptions.
Worked example
With a Beta(1,1) prior and two successes in three trials, the posterior is Beta(3,2), whose mean is 3/5. This is a distribution for p, not a guarantee about the next five outcomes.
Model and Assumptions
Use an invented sample of eight successes and two failures. Prior p ~ Beta(2,2). Assume independent, identically distributed Bernoulli trials. A Beta(a,b) mean is a/(a+b).
Further inquiry
Derive the posterior kernel and predictive probability. Repeat with Beta(1,1) and Beta(20,20). Explain why the resulting spread is not a full uncertainty assessment if trials are dependent.
Review criteria
- Track success and failure exponents in the likelihood.
- Calculate predictive means for all three priors.
- Separate prior sensitivity from misspecification of the likelihood.