Bayesian Coin Update
Conjugate Bayesian inference for the bias $\theta$ of an unfair coin. Prior: $\mathrm{Beta}(\alpha_0, \beta_0)$. Data: $k$ heads observed in $n$ flips. Posterior: $\mathrm{Beta}(\alpha_0 + k, \beta_0 + n - k)$. The plot overlays the prior (cat-1), the likelihood ($\theta^k (1 - \theta)^{n - k}$, renormalized for display), and the posterior (cat-3). Drag $k$ and $n$ to see the posterior sharpen.
prior preset
alpha_02.0
beta_02.0
k (heads)7
n (flips)10
WHAT TO TRY
- Start from a flat prior and add data with k and n: the posterior Beta(alpha+k, beta+n-k) sharpens around the empirical head rate. More flips means a narrower posterior.
- Switch to a strong heads or tails prior: now the same data barely moves the posterior. You see how much data it takes to overrule a confident prior.
- Overlay prior, likelihood and posterior: with large n the posterior sits on the likelihood, with a dominant prior it sits on the prior, always somewhere between the two.