Normalizing constant
Intermediate
What you need first. Nothing else on this path comes first. This page is part of Probability.
In probability, a normalizing constant is the factor that makes a nonnegative function integrate or sum to one. A normalizing constant is the factor that turns a nonnegative function into a probability density or a probability mass function. In a Bayesian calculation it is often the marginal probability of the observed data, the denominator of Bayes’ rule. Relative heights of an unnormalised posterior can be compared without it. A probability, a density height, or a marginal likelihood cannot.[1]
Normalizing constant
| Fact | Value |
|---|---|
| Topic | Probability |
| Listed on | Probability |
| Worked example | 1 |
Motivating example
After a binomial sample, the product of a uniform prior and the likelihood is a power of the unknown probability times a power of its complement. Bayes evaluated the marginal probability of the count under that prior and found
The product shows where the posterior is high and where it is low, and it does not integrate to one. Dividing by , or equivalently multiplying by the constant that the beta integral supplies, makes the area equal to one. The number is determined by the data and the prior. It is not a further modelling choice.[1]
Intuition
Relative heights are fixed by the unnormalised function. The constant lifts or lowers the whole graph until the total probability is one. Any question that depends only on ratios at different parameter values can ignore the constant, because it cancels. The ratio of the posterior density at two parameter values equals the ratio of the unnormalised products of prior and likelihood at those values. Any question that asks for a probability, a density height, or the marginal probability of the data has to put the constant back.[1]
Definition
Suppose is nonnegative and not identically zero, and is positive and finite. Then is a probability density, and is its normalizing constant. A discrete nonnegative function uses a sum in place of the integral. If the integral is infinite, no positive finite constant makes the function a probability density. A prior density is called proper when it does not depend on the data and integrates to one. A function that integrates to a positive finite value other than one is an unnormalised density and can be multiplied by a constant to integrate to one. A prior whose integral over the parameter space is infinite is improper.[1][2]
In the posterior formula
the marginal
does not depend on . It is the normalizing constant of the unnormalised posterior . Equivalently one writes and restores the constant when a numerical probability is required. The part that still depends on is the kernel of a density.[1]
Statistical use
Recognising a kernel as an unnormalised beta, gamma, or normal density identifies the posterior family and reads the normalizing constant off the known formula for that family. For a uniform prior on a binomial probability and successes in trials, for each , so every count is equally likely before the data are seen. The posterior density is the beta density with parameters and . The constant that turns the kernel into that density is . Dividing the joint contribution by the marginal produces the same beta density, because equals that factorial ratio.[1]
When the kernel is not a known family, is an integral in as many dimensions as has, and it is often the expensive part of the calculation. Posterior probabilities of regions and the marginal likelihood and Bayes factor require it. Draws from the posterior can be used to compute posterior means without printing the constant, provided the draws already come from the normalised distribution. A prior that integrates to infinity has no normalizing constant. The formal product of that function with a likelihood may still have a finite integral, in which case the posterior is proper even though the prior is not. That posterior has to be checked. An improper prior is not a joint probability model for the data and the parameter.[1]
Worked example
Let and , with uniform on . The kernel is . Its integral is
so the normalizing constant is and the posterior density is . The binomial coefficient equals , and the marginal probability of is , so dividing the joint factor by gives the same density.[1]
Your turn. Now and , so the kernel is . Find its integral on and the normalizing constant of the posterior density.
The integral is . The normalizing constant is , and the density is .
Common misconceptions
The kernel and the density are different functions whenever the constant is not . A likelihood is not a density in the parameter, so the binomial coefficient, or any other factor free of , is not the normalizing constant of the posterior. The marginal probability normalises the product of prior and likelihood. The constant of a kernel that has already dropped factors free of is a different number. In the worked example those two bookkeeping choices are easy to compare because the binomial coefficient equals .[1]
An improper prior is not repaired by writing a proportionality sign. The posterior integral is a separate fact about the likelihood. In the normal model with known variance, a flat prior is the limit of a normal prior whose variance grows, and the posterior after at least one observation is a proper normal. That check does not transfer to every flat prior. A factor that depends on cannot be absorbed into the constant. Dropping it changes the posterior.[1]
Connections
The unnormalised function, with the constant removed, is the kernel of a density. The identity that places in the denominator is Bayes’ rule. A prior with a finite integral is a proper prior. A prior function with an infinite integral is an improper prior. For the uniform-binomial model the normalised posterior is a beta distribution. A distribution function on the line rises from to , which is the same requirement that a density integrate to one, stated for the cumulative probability rather than for the height.[1][2]
Check yourself
Try these questions before opening an answer.
A ratio of heights
Why can the ratio of the posterior density at two parameter values be computed without the normalizing constant?
The constant does not depend on the parameter, so it is the same at both values and cancels in the ratio.
An improper prior
What additional check does an improper prior require before the formal posterior is used?
The integral of the unnormalised posterior must be finite. An infinite integral for the prior does not by itself make the posterior a probability density.
See also
Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian model · Bayesian probability
References
- ^ a b c d e f g h i j k a. (p. 7, §1.3) b. (pp. 31–32, §2.1, equation 2.5) c. (p. 7, §1.3) d. (p. 52, §2.8) e. (p. 7, §1.3, equations 1.1 and 1.2) f. (pp. 31–32, §2.1) g. (pp. 7 and 51–52, §§1.3 and 2.8) h. (pp. 31–32, §2.1) i. (p. 7, §1.3; pp. 31–32, §2.1) j. (pp. 51–52, §2.8) k. (pp. 31–32 and 51–52) Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. (2013). Bayesian Data Analysis. Chapman and Hall/CRC. https://doi.org/10.1201/b16018
- ^ a b a. (Ch. 1, §1.2, p. 11) b. (Ch. 1, §1.2, p. 11, the distribution-function fact) Durrett, R. (2019). Probability: Theory and Examples (5th ed.). Cambridge University Press. https://doi.org/10.1017/9781108591034
Cite this page
StatWiki (2026). "Normalizing constant." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/normalizing-constant.html
@misc{statwiki_normalizing_constant,
author = {{StatWiki}},
title = {{Normalizing constant}},
year = {2026},
url = {https://www.statwiki.io/articles/normalizing-constant.html},
urldate = {2026-12-02},
note = {StatWiki, last updated 2 December 2026}
}