In
Bayesian probability
Bayesian probability is an interpretation of the concept of probability, in which, instead of frequency or propensity of some phenomenon, probability is interpreted as reasonable expectation representing a state of knowledge or as quantification o ...
theory, if the
posterior distribution is in the same
probability distribution family as the
prior probability distribution
In Bayesian statistical inference, a prior probability distribution, often simply called the prior, of an uncertain quantity is the probability distribution that would express one's beliefs about this quantity before some evidence is taken int ...
, the prior and posterior are then called conjugate distributions, and the prior is called a conjugate prior for the
likelihood function
The likelihood function (often simply called the likelihood) represents the probability of random variable realizations conditional on particular values of the statistical parameters. Thus, when evaluated on a given sample, the likelihood funct ...
.
A conjugate prior is an algebraic convenience, giving a
closed-form expression
In mathematics, a closed-form expression is a mathematical expression that uses a finite number of standard operations. It may contain constants, variables, certain well-known operations (e.g., + − × ÷), and functions (e.g., ''n''th ro ...
for the posterior; otherwise,
numerical integration
In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also sometimes used to describe the numerical solution of differential equations ...
may be necessary. Further, conjugate priors may give intuition by more transparently showing how a likelihood function updates a prior distribution.
The concept, as well as the term "conjugate prior", were introduced by
Howard Raiffa and
Robert Schlaifer in their work on
Bayesian decision theory.
[ Howard Raiffa and Robert Schlaifer. ''Applied Statistical Decision Theory''. Division of Research, Graduate School of Business Administration, Harvard University, 1961.] A similar concept had been discovered independently by
George Alfred Barnard
George Alfred Barnard (23 September 1915 – 9 August 2002) was a British statistician known particularly for his work on the foundations of statistics and on quality control.
Biography
George Barnard was born in Walthamstow, Lond ...
.
[Jeff Miller et al]
Earliest Known Uses of Some of the Words of Mathematics
Electronic document, revision of November 13, 2005, retrieved December 2, 2005.
Example
The form of the conjugate prior can generally be determined by inspection of the
probability density or
probability mass function of a distribution. For example, consider a
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the p ...
which consists of the number of successes
in
Bernoulli trial
In the theory of probability and statistics, a Bernoulli trial (or binomial trial) is a random experiment with exactly two possible outcomes, "success" and "failure", in which the probability of success is the same every time the experiment is ...
s with unknown probability of success
in
,1 This random variable will follow the
binomial distribution
In probability theory and statistics, the binomial distribution with parameters ''n'' and ''p'' is the discrete probability distribution of the number of successes in a sequence of ''n'' independent experiments, each asking a yes–no qu ...
, with a probability mass function of the form
:
The usual conjugate prior is the
beta distribution with parameters (
,
):
:
where
and
are chosen to reflect any existing belief or information (
and
would give a
uniform distribution
Uniform distribution may refer to:
* Continuous uniform distribution
* Discrete uniform distribution
* Uniform distribution (ecology)
* Equidistributed sequence In mathematics, a sequence (''s''1, ''s''2, ''s''3, ...) of real numbers is said to be ...
) and
is the
Beta function acting as a
normalising 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.
...
.
In this context,
and
are called ''
hyperparameters'' (parameters of the prior), to distinguish them from parameters of the underlying model (here
). A typical characteristic of conjugate priors is that the dimensionality of the hyperparameters is one greater than that of the parameters of the original distribution. If all parameters are scalar values, then there will be one more hyperparameter than parameter; but this also applies to vector-valued and matrix-valued parameters. (See the general article on the
exponential family, and also consider the
Wishart distribution, conjugate prior of the
covariance matrix of a
multivariate normal distribution
In probability theory and statistics, the multivariate normal distribution, multivariate Gaussian distribution, or joint normal distribution is a generalization of the one-dimensional ( univariate) normal distribution to higher dimensions. One ...
, for an example where a large dimensionality is involved.)
If we sample this random variable and get
successes and
failures, then we have
:
which is another Beta distribution with parameters
. This posterior distribution could then be used as the prior for more samples, with the hyperparameters simply adding each extra piece of information as it comes.
Interpretations
Pseudo-observations
It is often useful to think of the hyperparameters of a conjugate prior distribution corresponding to having observed a certain number of ''pseudo-observations'' with properties specified by the parameters. For example, the values
and
of a
beta distribution can be thought of as corresponding to
successes and
failures if the posterior mode is used to choose an optimal parameter setting, or
successes and
failures if the posterior mean is used to choose an optimal parameter setting. In general, for nearly all conjugate prior distributions, the hyperparameters can be interpreted in terms of pseudo-observations. This can help provide intuition behind the often messy update equations and help choose reasonable hyperparameters for a prior.
Analogy with eigenfunctions
Conjugate priors are analogous to
eigenfunctions in
operator theory in that they are distributions on which the "conditioning operator" acts in a well-understood way, thinking of the process of changing from the prior to the posterior as an operator.
In both eigenfunctions and conjugate priors, the operator preserves a ''finite-dimensional'' space: the output is of the same form (in the same space) as the input. This greatly simplifies the analysis, as it otherwise considers an infinite-dimensional space (space of all functions, space of all distributions).
However, the processes are only analogous, not identical:
conditioning is not linear, as the space of distributions is not closed under
linear combination, only
convex combination
In convex geometry and vector algebra, a convex combination is a linear combination of points (which can be vectors, scalars, or more generally points in an affine space) where all coefficients are non-negative and sum to 1. In other ...
, and the posterior is only of the same ''form'' as the prior, not a scalar multiple.
Just as one can easily analyze how a linear combination of eigenfunctions evolves under the application of an operator (because, for these functions, the operator is
diagonalized), one can easily analyze how a convex combination of conjugate priors evolves under conditioning; this is called using a ''
hyperprior,'' and corresponds to using a
mixture density
In probability and statistics, a mixture distribution is the probability distribution of a random variable that is derived from a collection of other random variables as follows: first, a random variable is selected by chance from the collection ...
of conjugate priors, rather than a single conjugate prior.
Dynamical system
One can think of conditioning on conjugate priors as defining a kind of (discrete time)
dynamical system
In mathematics, a dynamical system is a system in which a function describes the time dependence of a point in an ambient space. Examples include the mathematical models that describe the swinging of a clock pendulum, the flow of water i ...
: from a given set of hyperparameters, incoming data updates these hyperparameters, so one can see the change in hyperparameters as a kind of "time evolution" of the system, corresponding to "learning". Starting at different points yields different flows over time. This is again analogous with the dynamical system defined by a linear operator, but note that since different samples lead to different inferences, this is not simply dependent on time but rather on data over time. For related approaches, see
Recursive Bayesian estimation and
Data assimilation.
Practical example
Suppose a rental car service operates in your city. Drivers can drop off and pick up cars anywhere inside the city limits. You can find and rent cars using an app.
Suppose you wish to find the probability that you can find a rental car within a short distance of your home address at any time of day.
Over three days you look at the app and find the following number of cars within a short distance of your home address: