# Normalizing constant

The concept of a normalizing constant arises in probability theory and a variety of other areas of mathematics. The normalizing constant is used to reduce any probability function to a probability density function with total probability of one.

## Definition

In probability theory, a normalizing constant is a constant by which an everywhere non-negative function must be multiplied so the area under its graph is 1, e.g., to make it a probability density function or a probability mass function.[1][2]

## Examples

If we start from the simple Gaussian function

${\displaystyle p(x)=e^{-x^{2}/2},\quad x\in (-\infty ,\infty )}$
we have the corresponding Gaussian integral
${\displaystyle \int _{-\infty }^{\infty }p(x)\,dx=\int _{-\infty }^{\infty }e^{-x^{2}/2}\,dx={\sqrt {2\pi \,}},}$

Now if we use the latter's reciprocal value as a normalizing constant for the former, defining a function ${\displaystyle \varphi (x)}$ as

${\displaystyle \varphi (x)={\frac {1}{\sqrt {2\pi \,}}}p(x)={\frac {1}{\sqrt {2\pi \,}}}e^{-x^{2}/2}}$
so that its integral is unit
${\displaystyle \int _{-\infty }^{\infty }\varphi (x)\,dx=\int _{-\infty }^{\infty }{\frac {1}{\sqrt {2\pi \,}}}e^{-x^{2}/2}\,dx=1}$
then the function ${\displaystyle \varphi (x)}$ is a probability density function.[3] This is the density of the standard normal distribution. (Standard, in this case, means the expected value is 0 and the variance is 1.)

And constant ${\textstyle {\frac {1}{\sqrt {2\pi }}}}$ is the normalizing constant of function ${\displaystyle p(x)}$.

Similarly,

${\displaystyle \sum _{n=0}^{\infty }{\frac {\lambda ^{n}}{n!}}=e^{\lambda },}$
and consequently
${\displaystyle f(n)={\frac {\lambda ^{n}e^{-\lambda }}{n!}}}$
is a probability mass function on the set of all nonnegative integers.[4] This is the probability mass function of the Poisson distribution with expected value λ.

Note that if the probability density function is a function of various parameters, so too will be its normalizing constant. The parametrised normalizing constant for the Boltzmann distribution plays a central role in statistical mechanics. In that context, the normalizing constant is called the partition function.

## Bayes' theorem

Bayes' theorem says that the posterior probability measure is proportional to the product of the prior probability measure and the likelihood function. Proportional to implies that one must multiply or divide by a normalizing constant to assign measure 1 to the whole space, i.e., to get a probability measure. In a simple discrete case we have

${\displaystyle P(H_{0}|D)={\frac {P(D|H_{0})P(H_{0})}{P(D)}}}$

where P(H0) is the prior probability that the hypothesis is true; P(D|H0) is the conditional probability of the data given that the hypothesis is true, but given that the data are known it is the likelihood of the hypothesis (or its parameters) given the data; P(H0|D) is the posterior probability that the hypothesis is true given the data. P(D) should be the probability of producing the data, but on its own is difficult to calculate, so an alternative way to describe this relationship is as one of proportionality:

${\displaystyle P(H_{0}|D)\propto P(D|H_{0})P(H_{0}).}$

Since P(H|D) is a probability, the sum over all possible (mutually exclusive) hypotheses should be 1, leading to the conclusion that

${\displaystyle P(H_{0}|D)={\frac {P(D|H_{0})P(H_{0})}{\displaystyle \sum _{i}P(D|H_{i})P(H_{i})}}.}$

In this case, the reciprocal of the value

${\displaystyle P(D)=\sum _{i}P(D|H_{i})P(H_{i})\;}$

is the normalizing constant.[5] It can be extended from countably many hypotheses to uncountably many by replacing the sum by an integral.

For concreteness, there are many methods of estimating the normalizing constant for practical purposes. Methods include the bridge sampling technique, the naive Monte Carlo estimator, the generalized harmonic mean estimator, and importance sampling.[6]

## Non-probabilistic uses

The Legendre polynomials are characterized by orthogonality with respect to the uniform measure on the interval [−1, 1] and the fact that they are normalized so that their value at 1 is 1. The constant by which one multiplies a polynomial so its value at 1 is a normalizing constant.

Orthonormal functions are normalized such that

${\displaystyle \langle f_{i},\,f_{j}\rangle =\,\delta _{i,j}}$
with respect to some inner product f, g.

The constant 1/2 is used to establish the hyperbolic functions cosh and sinh from the lengths of the adjacent and opposite sides of a hyperbolic triangle.

6. ^ Gronau, Quentin (2020). "bridgesampling: An R Package for Estimating Normalizing Constants" (PDF). The Comprehensive R Archive Network. Retrieved September 11, 2021.{{cite web}}: CS1 maint: url-status (link)