Notes of Machine Learning

Stay hungry, stay foolish.


Project maintained by laming-chen Hosted on GitHub Pages — Theme by mattgraham

Conjugate Distributions

If the posterior distributions are in the same probability distribution family as the prior probability distribution, the prior and posterior are then called conjugate distributions, and the prior is called a conjugate prior for the likelihood function.

The likelihood function is usually considered fixed; the likelihood function is usually well-determined from the data-generating process. For certain choices of the prior, the posterior has the same algebraic form as the prior (generally with different parameter values). Such a choice is a conjugate prior.

A conjugate prior is an algebraic convenience, giving a closed-form expression for the posterior; otherwise numerical integration may be necessary. Further, conjugate priors may give intuition, by more transparently showing how a likelihood function updates a prior distribution.

Examples

Binomial Distribution

Binomial distribution with parameters and is the discrete probability distribution of the number of successes in independent Bernoulli trials with probability of success . If , the binomial distribution is a Bernoulli distribution.

If is the unknown parameter, the conjugate prior is the beta distribution with parameters and :

where and are chosen to reflect any existing belief or information ( and would give a uniform distribution) and is the beta function acting as a normalizing constant.

If we observe successes and failures, the posterior distribution is another beta distribution with parameters and . This posterior distribution could then be used as the prior for more samples, with the hyper-parameters simply adding each extra piece of information as it comes.

Possion Distribution

Possion distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known constant rate and independently of the time since the last event:

If is the unknown parameter, the conjugate prior is the gamma distribution with parameters and :

where is the gamma function.

Multinomial Distribution

The multinomial distribution is a generalization of the binomial distribution. For independent trials each of which leads to a success for exactly one of categories, with each category having a given fixed success probability, the multinomial distribution gives the probability of any particular combination of numbers of successes for the various categories. When and , it is the binomial distribution. When and , it is the categorical distribution.

For a multinomial distribution with parameters and , where ,

for non-negative integers .

If is the unknown parameter, the conjugate prior is the Dirichlet distribution with parameters :

where the normalizing constant is the multivariate beta function.

Multivariate Normal Distribution

The multivariate normal distribution of a -dimensional random vector with parameters and follows

If is the unknown parameter, the conjugate prior is also a multivariate normal distribution. Such distributions are called self-conjugate.

Pseudo-observations

It is often useful to think of the hyperparameters of a conjugate prior distribution as corresponding to having observed a certain number of pseudo-observations with properties specified by the parameters. In general, for nearly all conjugate prior distributions, the hyperparameters can be interpreted in terms of pseudo-observations. This can help both in providing an intuition behind the often messy update equations, as well as to help choose reasonable hyperparameters for a prior.

Go Back to Index