Statistics Quest

Beta–binomial updating

With a Beta(a, b) prior for a success probability and s successes and f failures, the posterior is Beta(a + s, b + f) — the prior acts like a + b earlier observations.

θ∼Beta(a,b),s successes,f failures  ⇒  θ∣data∼Beta(a+s, b+f)\theta \sim \text{Beta}(a, b), \quad s \text{ successes}, f \text{ failures} \;\Rightarrow\; \theta \given \text{data} \sim \text{Beta}(a + s, \, b + f)
Conjugate update
θ\theta
unknown success probability
a,ba, b
prior parameters (Beta(1, 1) is uniform); density proportional to hetaa−1(1−heta)b−1 heta^{a-1}(1- heta)^{b-1}
s,fs, f
observed successes and failures
E⁡[θ]=aa+b,mode=a−1a+b−2  (a,b>1),Var⁡(θ)=ab(a+b)2(a+b+1)\E[\theta] = \frac{a}{a+b}, \qquad \text{mode} = \frac{a-1}{a+b-2} \; (a, b > 1), \qquad \Var(\theta) = \frac{ab}{(a+b)^2(a+b+1)}
Beta(a, b) summaries
a,ba, b
parameters of the (posterior) Beta distribution

When to use

  • Estimating a rate (conversion, defect, response) with uncertainty, especially with small samples or when earlier evidence should count.
  • Sequential learning: today's posterior is tomorrow's prior.

Assumptions

  • Trials are independent with a common success probability (binomial likelihood).
  • The prior is chosen before seeing the data and stated openly; check sensitivity to it.

How to interpret

  • The posterior mean (a+s)/(a+b+s+f)(a + s)/(a + b + s + f) is a compromise between the prior mean and the observed proportion, weighted by a+ba + b versus s+fs + f. With lots of data the prior hardly matters.
  • The posterior is a full distribution: report its mean or median and a credible interval.

Common mistakes

  • Using a strong prior without justification, or hiding it.
  • Confusing the prior "pseudo-counts" with real data when reporting n.
  • Treating the posterior mean as the observed rate.

Example

12 successes in 40 trials. Uniform prior Beta(1, 1) → posterior Beta(13, 29): mean 0.310, mode 0.300, sd 0.070, 95% equal-tailed credible interval 0.181 to 0.455. A sceptical prior Beta(2, 8) (prior mean 0.2) → Beta(14, 36): mean 0.280, interval 0.166 to 0.411.