03. Gamma and Beta Functions — A Factory for Normalization Constants
Background 3/5. A probability density is complete only after a normalization constant makes its total integral equal to 1. Both the Gaussian's and the Beta distribution's come from the two special functions on this page.
Gamma function
It is "the integral over the entire product of the polynomial tail and exponential decay ." A substantial portion of the integrals in probability theory take this form after a single substitution.
Core properties
1. Recurrence relation (proved with one integration by parts)
2. Continuous extension of the factorial
Starting from and repeatedly applying the recurrence gives
The Gamma function is the unique log-convex function extending the factorial to the real numbers (and further to the complex numbers), by the Bohr–Mollerup theorem. This means there is an answer to "why this particular extension?"
3. Half-integer value
The proof reduces via the substitution to the Gaussian integral . The normalization constant of the Gaussian distribution comes from here. The Gamma function and the Gaussian integral share the same root.
4. Stirling's approximation
This is an essential tool for handling factorials and binomial coefficients of large numbers (for example, in local versions of the CLT and entropy calculations).
Beta function
This is "the entire area of a mass shaped like on ." Because the density of the Beta distribution is precisely this integrand, the Beta function is exactly the normalization constant of the Beta distribution.
Relationship to the Gamma function (the most important identity)
Proof sketch: write as a double integral and substitute , . The integral separates into . This substitution is the same calculation as the famous property of Gamma distributions that "the sum and ratio are independent" (the Gamma–Beta relationship).
Useful special values and properties
- — why Uniform(0,1) is Beta(1,1)
- — symmetry
- For natural numbers :
Its form as the reciprocal of a binomial coefficient foreshadows the deep relationship between the Beta distribution, the binomial distribution, and order statistics (detailed on the Beta distribution page).
In practice: patterns for calculating normalization constants
Most recurring calculations in probability theory follow one of two patterns.
Pattern 1 — Gamma-type integral: an integral of the form becomes, with the substitution ,
Pattern 2 — Beta-type integral: . The integral is finished as soon as the exponents are identified.
For example, the th moment of a Beta distribution is
The result follows entirely from reading exponents and applying a recurrence, without ever evaluating an integral "directly." Developing this computational intuition is the goal of this page.
Digamma function (briefly)
This appears in logarithmic expectations of Beta and Dirichlet distributions, . It is worth at least recognizing the name because the function is unavoidable when using Beta/Dirichlet distributions in variational inference.
What to remember from this page
- , , and —these three handle most calculations.
- is one of the most frequently used identities in probability theory.
- Once Gamma-type and Beta-type integral patterns become familiar, calculating normalization constants and moments reduces to "reading exponents."
- Both the Gaussian's and the Beta distribution's are faces of the Gamma function.
Next step
- Law of Large Numbers, Central Limit Theorem, and Stability — what it means for distributions to "converge"
- Beta Distribution — where the tools built today are used directly to calculate densities, moments, and conjugacy