Back

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.

Figure 1. Beta-Binomial conjugate update for an unfair coin. Method: closed-form posterior plus numerical Beta-CDF for the 95 percent credible interval.
prior preset
alpha_02.0
beta_02.0
k (heads)7
n (flips)10

WHAT TO TRY

  • Vary each control and watch the rail readouts respond.
  • Compare the diagnostic plot against the live scene.