Quant Memo
Core

The Beta Distribution

The distribution built for quantities that are stuck between 0 and 1 — win rates, market shares, probabilities themselves — and the natural way to express and update a belief about one from data.

Prerequisites: Bayes' Theorem, Expectation, Variance & Moments

A market maker's fill-rate on a new quoting strategy is somewhere between 0 and 1 — but after only 20 quotes, what exactly is your best estimate, and how confident should you be in it? A normal distribution is the wrong tool: it can spit out numbers below 0 or above 1, which is nonsense for a probability. You need a distribution whose entire support is squeezed into [0,1][0,1] and that gets naturally more concentrated as evidence accumulates. That's the beta distribution.

The analogy: a bag of red and blue marbles, described by a curve

Before drawing any marbles, you might believe the bag is "probably close to half red, but I'm not sure" — a fuzzy belief about a probability. The beta distribution is a curve over [0,1][0,1] that encodes exactly that kind of fuzzy belief: not a single number for "the fraction red," but a whole distribution over what that fraction could be. Draw some marbles and count reds and blues, and the beta distribution updates itself — using nothing more than simple addition — into a new, typically narrower curve reflecting the new evidence.

Writing it down

The beta distribution has two shape parameters α,β>0\alpha, \beta > 0 and density on [0,1][0,1]:

f(x;α,β)=xα1(1x)β1B(α,β),0x1,f(x; \alpha, \beta) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)}, \qquad 0 \le x \le 1,

where B(α,β)B(\alpha,\beta) is the beta function, a normalizing constant. In words: the shape is governed by how xα1x^{\alpha-1} pulls mass toward 1 and (1x)β1(1-x)^{\beta-1} pulls mass toward 0 — bigger α\alpha relative to β\beta skews the distribution toward 1, and vice versa. Mean is α/(α+β)\alpha/(\alpha+\beta), and it becomes tighter (lower variance) as α+β\alpha+\beta grows. Its most important property in practice: it's the conjugate prior for a binomial probability. Start with a Beta(α,β)\text{Beta}(\alpha, \beta) belief about a probability pp, observe ss successes and ff failures, and the updated (posterior) belief is exactly

Beta(α+s,  β+f).\text{Beta}(\alpha + s, \; \beta + f).

In words: updating a beta belief with binomial data is just adding the observed success and failure counts onto the existing parameters — no integration, no numerical solver, just arithmetic.

Distribution · binomial
mean 10.002468101214161820outcomes (k) →
mean 10.00std dev 2.24peak at k = 10

This shows the discrete outcome counts from 20 binomial trials at p=0.5p=0.5 — the beta distribution is the natural continuous partner to this picture: instead of asking "how many successes out of 20 given a fixed pp," it asks "given the successes I observed, what values of pp are plausible," turning the axes of this exact picture inside out.

Worked example 1: updating a win-rate belief

Start with a neutral prior Beta(1,1)\text{Beta}(1,1) (uniform over [0,1][0,1] — "could be anything"). A signal fires 20 times and wins 13. Posterior: Beta(1+13,1+7)=Beta(14,8)\text{Beta}(1+13, 1+7) = \text{Beta}(14, 8). Posterior mean: 14/220.63614/22 \approx 0.636. Compare the raw sample estimate 13/20=0.6513/20 = 0.65 — close, but the beta posterior is pulled slightly toward 0.5 by the prior, which is exactly the right instinct with only 20 observations. Posterior standard deviation is 14×8222×230.102\sqrt{\frac{14\times8}{22^2\times23}} \approx 0.102 — meaningful uncertainty still remains; a 95% credible interval runs roughly from 0.42 to 0.83.

Worked example 2: more data narrows the belief

Same signal, now observed for 500 trials, winning 325 (still 65%). Posterior: Beta(1+325,1+175)=Beta(326,176)\text{Beta}(1+325, 1+175) = \text{Beta}(326,176). Posterior mean: 326/5020.649326/502 \approx 0.649 — now barely nudged from the raw rate, because 500 observations dominate a weak prior. Posterior standard deviation shrinks to 326×1765022×5030.0213\sqrt{\frac{326\times176}{502^2\times503}}\approx 0.0213 — roughly a 95% credible interval of about (0.61, 0.69), five times narrower than the 20-trial case. The beta distribution is making the "more data, less uncertainty" intuition mathematically explicit and exact.

Distribution · binomial
mean 26.00510152025303540outcomes (k) →
mean 26.00std dev 3.02peak at k = 26

This is the 500-trial data-generating process behind Worked Example 2: a fixed true win rate producing a spread of possible success counts. The beta posterior is the mirror image of this picture — instead of fixing pp and asking about the count, it fixes the observed count and asks what values of pp remain plausible.

What this means in practice

  • Win rate and hit rate estimation. Any binary outcome (signal hits, quote fills, model classification accuracy) is a natural fit for beta-binomial updating, especially with limited data where point estimates alone are misleading.
  • Kelly sizing under uncertainty. Since Kelly sizing depends directly on a win probability, feeding in a beta posterior (rather than a naive point estimate) naturally produces more conservative sizing early in a strategy's life, exactly when it should be more conservative. See The Kelly Criterion.
  • A/B testing. Comparing two beta posteriors (e.g. two execution algorithms' fill rates) directly answers "what's the probability A is actually better than B," without needing a frequentist significance test.

The beta distribution lives entirely on [0,1][0,1] and is the natural way to represent uncertainty about a probability itself — its conjugacy with the binomial means updating a belief with new success/failure data is just adding counts to the existing parameters.

A common error is treating the posterior mean as the whole story and ignoring the posterior's spread — two beta posteriors can have the identical mean (say, both averaging 0.65) while one comes from 20 trials and is wide, and the other comes from 5,000 trials and is razor-narrow. Sizing a position off the mean alone, without accounting for how much of that spread remains, overstates confidence exactly when the sample is smallest.

Related concepts

Practice in interviews

Further reading

  • Gelman et al., Bayesian Data Analysis (ch. 2)
  • Casella, Berger, Statistical Inference (ch. 3)
ShareTwitterLinkedIn