Beta Distribution#
A continuous distribution on [0, 1]; the conjugate prior for a binomial probability.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
The Beta distribution is a continuous distribution on the interval \([0, 1]\), which makes it the natural way to model a probability or proportion. It has two shape parameters, \(\alpha\) and \(\beta\), and density
where \(B(\alpha, \beta)\) is the Beta function, the normalising constant.
Summary statistics#
and, when \(\alpha, \beta > 1\), the mode is \((\alpha - 1)/(\alpha + \beta - 2)\). A larger \(\alpha + \beta\) means a more concentrated (lower-variance) belief.
The shape gallery#
The two parameters give the family enormous flexibility:
\(\alpha = \beta = 1\) — uniform on \([0, 1]\).
\(\alpha > \beta\) — skewed toward 1; \(\alpha < \beta\) — skewed toward 0.
\(\alpha, \beta > 1\) — unimodal (a single bump).
\(\alpha, \beta < 1\) — U-shaped (mass piling up near 0 and 1).
Why it’s central: conjugacy#
The Beta is the conjugate prior for the Binomial likelihood. With a \(\text{Beta}(\alpha, \beta)\) prior and \(k\) successes in \(n\) trials, the posterior is again Beta:
So Bayesian updating is just adding successes to \(\alpha\) and failures to \(\beta\) — no integration required.
Examples#
\(\text{Beta}(1,1)\) — a flat prior, no preference before data.
\(\text{Beta}(20, 20)\) — sharply peaked at 0.5, a strong “fair coin” belief.
Start from \(\text{Beta}(1,1)\), observe 7 heads and 3 tails → \(\text{Beta}(8, 4)\), mean \(8/12 \approx 0.67\).
Where it shows up#
Bayesian inference over probabilities, A/B testing (belief about conversion rates),
reliability (success/failure rates), and any proportion modelling. Its multivariate
generalisation, the Dirichlet distribution, plays the same conjugate role for the
categorical/multinomial likelihood. In code, scipy.stats.beta provides the density,
sampling and quantiles.
Theme: Probability & Statistics Foundations · All terminology
Hint
Mind map — connected ideas
Binomial Likelihood · Posterior belief · Prior Belief (or Prior Probability) · Thompson Sampling (TS) in Bandits (Multi-Armed Bandit Problem (MAB)) · Bayes’ Theorem
Hint
More in Probability & Statistics Foundations
Confidence Level · Correlation · Critical Value · Cumulative Distribution Function (CDF) · Frequentist · IID (Independent and Identically Distributed) · Likelihood · Margin of Error (MoE) · Mean · Median · Normal Distribution · Outlier · Population Proportion · Probability
See also
Source article Adapted (context, re-expressed) in our own words from: Beta Distribution (insightful-data-lab.com).