A picture of a probability you don't yet know
Imagine a new basketball player steps up for free throws. After watching just a few — some swish, some clang — you start to form a hunch about how good she really is. You can't name one exact number, but you can sense a range: probably pretty good, almost certainly not perfect. The Beta distribution draws that hunch as a curve. Along the bottom sits every possible "true skill" from $0$ to $1$ (0% to 100%), and the curve rises wherever you think the truth most likely lies.
The shape is set by two numbers, and a handy way to read them is this: $\alpha$ counts the successes you have seen (plus one) and $\beta$ counts the misses (plus one). A player who sinks 3 and misses 1 gives Beta$(4,2)$. Your single best guess for her skill is the mean, $\alpha/(\alpha+\beta)=4/6\approx0.67$. Watch more shots and both dials climb together: the curve narrows and your confidence grows.
The density is $f(x;\alpha,\beta)=\dfrac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)}$ on $[0,1]$, where $B(\alpha,\beta)=\dfrac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}$ is just a constant that rescales the area to exactly $1$. The mean is $\alpha/(\alpha+\beta)$, and the spread shrinks roughly like $1/(\alpha+\beta)$ — more total evidence makes a tighter curve. Beta is also the conjugate prior of the binomial: start with Beta$(\alpha,\beta)$, observe $k$ successes in $n$ trials, and your updated belief is exactly Beta$(\alpha+k,\;\beta+n-k)$. Bayesian updating is nothing more than adding to the dials. In the sim, Parameter 1 is $\alpha$, Parameter 2 is $\beta$, and Query x reports the area to the left of $x$ — the probability that the true rate is below that value.
Set $\alpha=\beta=1$ and watch the curve flatten into a straight line — the "I know nothing yet" uniform prior. Now drag both up to about $10$ for a tight bell over $0.5$, the look of strong evidence. Finally set $\alpha=\beta=0.5$ to get a U-shape that piles probability near $0$ and $1$ — the belief that a coin is biased one way or the other, you are just not sure which.
Beta Distribution — Distribution of probabilities [0,1]
$$f(x;\alpha,\beta)=\frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)},\quad x\in[0,1]$$
$E[X]=\alpha/(\alpha+\beta),\quad\text{Var}(X)=\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}$
This distribution has important theoretical and applied properties. See the simulation tabs to explore how shape changes with parameters.
Bayesian statistics (conjugate prior for binomial p), proportion modeling, A/B test click rates, task completion percentages. The Beta distribution is "the distribution for probabilities" — it lives on [0,1] and can take many shapes: uniform (α=β=1), bell (α=β>1), U-shaped (α=β<1), skewed, or J-shaped.
Use the interactive simulation above to explore how the PDF shape responds to parameter changes. The Live Sampling tab demonstrates convergence of empirical frequencies to theoretical probabilities.
Always verify parameter definitions before computing probabilities.
Different textbooks and software packages use different parameterizations. Always check which convention is being used (e.g., rate vs scale for exponential/gamma; shape vs rate for beta). Plug in extreme values and check that the PDF shape matches your expectation.
See the simulation to visualize how parameters affect the distribution shape.
Start with a Beta(2, 2) prior for the probability $p$ of heads (mean 0.5, variance 0.05). Toss the coin 10 times and see 7 heads and 3 tails. Because the Beta is conjugate to the binomial, the posterior is Beta($2+7,\,2+3$)=Beta(9, 5). Its mean is $9/14\approx0.643$, its mode is $8/12\approx0.667$, and a 95% credible interval is about (0.386, 0.861). The posterior probability that $p>0.5$ is about 0.867. Compare this with the raw frequency of 0.7: the prior pulls the estimate gently toward 0.5.
A button is shown 200 times and clicked 30 times. With a flat Beta(1, 1) prior the posterior is Beta(31, 171). Its mean is $31/202\approx0.153$ and a 95% credible interval is about (0.107, 0.206). Showing the whole interval, not just 15%, makes it clear how uncertain a small test still is.
Set both parameters to 1 and you get the uniform distribution. Set both to 0.5 to see a U shape (extreme values are most likely), and both to 5 to see a bell. Set $\alpha=9,\beta=5$ and read the CDF at $x=0.5$: it should be about 0.133, the complement of 0.867 above. Then try $\alpha=\beta=2$ and confirm that the mean is 0.5.
1. What is the variance of Beta(2, 2)? 2. A uniform prior is updated with 3 successes and 0 failures. What is the posterior and its mean? 3. Why is the Beta a natural choice for a proportion?
Answers. 1. $\frac{2\cdot2}{4^2\cdot5}=0.05$. 2. Beta(4, 1), mean $4/5=0.8$. 3. It lives on [0, 1], takes many shapes, and stays in the Beta family after binomial data arrive.