Bayesian estimation of binomial distribution

This page visualises the Bayesian estimation of the binomial distribution by simulating random-sampling of Bernoulli trials. It uses the beta distribution as the prior distribution, which is the conjugate prior probability distribution for the Bernoulli distributions.

Simulation Parameters

How the distributions are updated

When you choose a beta distribution like the following as the prior distribution for the parameter \(p\) , which is the success probability of Bernoulli trials.

$$ \mbox{Beta}(\alpha, \beta) $$

Let \(n\) the total trials and \(k\) the success trials. Then the poterior distribution is also a beta distribution, and the \(\alpha\) and \(\beta\) are updated like this.

$$ \mbox{Beta}(\alpha + k, \beta + n - k) $$

The Bayesian estimation of binomial distribution is that simple.

Fork me on GitHub