BRAGA

02 Writing02-02 Notes02-02-458

Beta-Binomial Conjugacy Posterior

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
p(θ∣k,n)=Beta(α+k, β+n−k)p(\theta \mid k,n) = \mathrm{Beta}(\alpha + k,\ \beta + n - k)
(1)

We are working on the Beta-Binomial conjugate posterior for Bayesian inference on a proportion parameter θ∈(0,1)\theta \in (0,1), where the prior is θ∼Beta(α,β)\theta \sim \mathrm{Beta}(\alpha,\beta), the data follow a Binomial model k∣θ∼Binomial(n,θ)k \mid \theta \sim \mathrm{Binomial}(n,\theta), and the posterior is θ∣k,n∼Beta(α+k,β+n−k)\theta \mid k,n \sim \mathrm{Beta}(\alpha + k,\beta + n - k). This applies to Bernoulli/Binomial success-count settings such as conversions, churn responses, click-throughs, or defect rates, under the usual assumptions of identical trials and conditional independence given θ\theta.

Deep Breakdown

The Beta-Binomial conjugacy result is one of the most important closed-form updates in Bayesian statistics. It tells us how to update prior beliefs about an unknown success probability θ\theta after observing data summarized as kk successes out of nn trials.

The setup has three parts:

  1. Unknown parameter: θ\theta, the true probability of success.
  2. Prior belief: before seeing the data, we model θ\theta with a Beta distribution.
  3. Observed data: we observe kk successes in nn Bernoulli trials, summarized by a Binomial likelihood.

The reason this is called conjugacy is that the posterior stays in the same family as the prior. If the prior is Beta, then after seeing Binomial data, the posterior is still Beta, just with updated parameters. This matters in data analytics and data science because many business questions are about proportions:

  • conversion rate,
  • click-through rate,
  • open rate,
  • defect rate,
  • repayment rate,
  • retention probability in a fixed window.

Instead of estimating only one number, such as θ^=k/n\hat{\theta} = k/n, Bayesian updating gives a full posterior distribution over plausible values of θ\theta. That lets us quantify uncertainty directly and make probability statements such as:

  • probability that conversion rate exceeds 5%,
  • probability that variant B is better than variant A,
  • posterior interval for churn probability.

The Beta prior has density:

p(θ)∝θα−1(1−θ)β−1,0<θ<1p(\theta) \propto \theta^{\alpha - 1}(1-\theta)^{\beta - 1}, \quad 0 < \theta < 1
(2)

The Binomial likelihood, as a function of θ\theta, is:

p(k∣θ,n)∝θk(1−θ)n−kp(k \mid \theta,n) \propto \theta^k (1-\theta)^{n-k}
(3)

Multiplying prior and likelihood gives:

p(θ∣k,n)∝θα−1+k(1−θ)β−1+n−kp(\theta \mid k,n) \propto \theta^{\alpha - 1 + k}(1-\theta)^{\beta - 1 + n-k}
(4)

which is exactly the kernel of another Beta distribution:

θ∣k,n∼Beta(α+k,β+n−k)\theta \mid k,n \sim \mathrm{Beta}(\alpha + k,\beta + n - k)
(5)

This update can be interpreted as adding observed successes and failures to prior pseudo-counts:

  • prior success pseudo-count: α−1\alpha - 1 in one interpretation,

  • prior failure pseudo-count: β−1\beta - 1 in one interpretation, or more operationally, the posterior parameters behave like:

  • updated success strength: α+k\alpha + k,

  • updated failure strength: β+n−k\beta + n - k.

This makes the model intuitive, computationally efficient, and especially useful in A/B testing, Bayesian dashboards, and decision-making under uncertainty.

Flowchart

Start with priorbelief aboutsuccessprobability$\theta$Specify prior$\theta \sim\mathrm{Beta}(\alpha,\beta)$Observe data:$k$ successesin $n$ trialsWrite Binomiallikelihood $p(k\mid \theta,n)$Multiply priorand likelihoodCollect powersof $\theta$ and$(1-\theta)$Recognize BetakernelPosterior $\theta\mid k,n \sim\mathrm{Beta}(\alpha+k,\beta+n-k)$Summarizeposterior mean,interval, decisionprobabilitiesUse for A/Btesting,conversionrates, andBayesianbusinessdecisions

#machine-learning#machine-learning-algorithms#model-selection-and-information-criteria

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close