The website uses cookies. By using this site, you agree to our use of cookies as described in the Privacy Policy.
I Agree
blank_error__heading
blank_error__body
Text direction?

Conjugate prior

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In Bayesian probability theory, if the posterior distributions p(θ | x) are in the same probability distribution family as the prior probability distribution p(θ), the prior and posterior are then called conjugate distributions, and the prior is called a conjugate prior for the likelihood function p(x | θ). For example, the Gaussian family is conjugate to itself (or self-conjugate) with respect to a Gaussian likelihood function: if the likelihood function is Gaussian, choosing a Gaussian prior over the mean will ensure that the posterior distribution is also Gaussian. This means that the Gaussian distribution is a conjugate prior for the likelihood that is also Gaussian. The concept, as well as the term "conjugate prior", were introduced by Howard Raiffa and Robert Schlaifer in their work on Bayesian decision theory.[1] A similar concept had been discovered independently by George Alfred Barnard.[2]

Consider the general problem of inferring a (continuous) distribution for a parameter θ given some datum or data x. From Bayes' theorem, the posterior distribution is equal to the product of the likelihood function θ p ( x θ ) {\displaystyle \theta \mapsto p(x\mid \theta )\!} \theta \mapsto p(x\mid \theta )\! and prior p ( θ ) {\displaystyle p(\theta )\!} p(\theta )\!, normalized (divided) by the probability of the data p ( x ) {\displaystyle p(x)\!} p(x)\!:

p ( θ x ) = p ( x θ ) p ( θ ) p ( x ) = p ( x θ ) p ( θ ) θ p ( x , θ ) d θ = p ( x θ ) p ( θ ) θ p ( x θ ) p ( θ ) d θ {\displaystyle {\begin{aligned}p(\theta \mid x)&={\frac {p(x\mid \theta )\,p(\theta )}{p(x)}}\\&={\frac {p(x\mid \theta )\,p(\theta )}{\int _{\theta }p(x,\theta )\,d\theta }}\\&={\frac {p(x\mid \theta )\,p(\theta )}{\int _{\theta }p(x\mid \theta )\,p(\theta )\,d\theta }}\end{aligned}}} {\displaystyle {\begin{aligned}p(\theta \mid x)&={\frac {p(x\mid \theta )\,p(\theta )}{p(x)}}\\&={\frac {p(x\mid \theta )\,p(\theta )}{\int _{\theta }p(x,\theta )\,d\theta }}\\&={\frac {p(x\mid \theta )\,p(\theta )}{\int _{\theta }p(x\mid \theta )\,p(\theta )\,d\theta }}\end{aligned}}}

Let the likelihood function be considered fixed; the likelihood function is usually well-determined from a statement of the data-generating process[example needed]. It is clear that different choices of the prior distribution p(θ) may make the integral more or less difficult to calculate, and the product p(x|θ) × p(θ) may take one algebraic form or another. 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.

All members of the exponential family have conjugate priors.[3]

Example[edit]

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 which consists of the number of successes s {\displaystyle s} s in n {\displaystyle n} n Bernoulli trials with unknown probability of success q {\displaystyle q} q in [0,1]. This random variable will follow the binomial distribution, with a probability mass function of the form

p ( s ) = ( n s ) q s ( 1 q ) n s {\displaystyle p(s)={n \choose s}q^{s}(1-q)^{n-s}} {\displaystyle p(s)={n \choose s}q^{s}(1-q)^{n-s}}

The usual conjugate prior is the beta distribution with parameters ( α {\displaystyle \alpha } \alpha , β {\displaystyle \beta } \beta ):

p ( q ) = q α 1 ( 1 q ) β 1 B ( α , β ) {\displaystyle p(q)={q^{\alpha -1}(1-q)^{\beta -1} \over \mathrm {B} (\alpha ,\beta )}} p(q)={q^{\alpha -1}(1-q)^{\beta -1} \over \mathrm {B} (\alpha ,\beta )}

where α {\displaystyle \alpha } \alpha and β {\displaystyle \beta } \beta are chosen to reflect any existing belief or information ( α {\displaystyle \alpha } \alpha = 1 and β {\displaystyle \beta } \beta = 1 would give a uniform distribution) and Β( α {\displaystyle \alpha } \alpha β {\displaystyle \beta } \beta ) is the Beta function acting as a normalising constant.

In this context, α {\displaystyle \alpha } \alpha and β {\displaystyle \beta } \beta are called hyperparameters (parameters of the prior), to distinguish them from parameters of the underlying model (here q). It is a typical characteristic of conjugate priors 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 this means that 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 consider also the Wishart distribution, conjugate prior of the covariance matrix of a multivariate normal distribution, for an example where a large dimensionality is involved.)

If we then sample this random variable and get s successes and f failures, we have

P ( s , f q = x ) = ( s + f s ) x s ( 1 x ) f , P ( q = x ) = x α 1 ( 1 x ) β 1 B ( α , β ) , P ( q = x s , f ) = P ( s , f x ) P ( x ) P ( s , f y ) P ( y ) d y = ( s + f s ) x s + α 1 ( 1 x ) f + β 1 / B ( α , β ) y = 0 1 ( ( s + f s ) y s + α 1 ( 1 y ) f + β 1 / B ( α , β ) ) d y = x s + α 1 ( 1 x ) f + β 1 B ( s + α , f + β ) , {\displaystyle {\begin{aligned}P(s,f\mid q=x)&={s+f \choose s}x^{s}(1-x)^{f},\\P(q=x)&={x^{\alpha -1}(1-x)^{\beta -1} \over \mathrm {B} (\alpha ,\beta )},\\P(q=x\mid s,f)&={\frac {P(s,f\mid x)P(x)}{\int P(s,f\mid y)P(y)dy}}\\&={{{s+f \choose s}x^{s+\alpha -1}(1-x)^{f+\beta -1}/\mathrm {B} (\alpha ,\beta )} \over \int _{y=0}^{1}\left({s+f \choose s}y^{s+\alpha -1}(1-y)^{f+\beta -1}/\mathrm {B} (\alpha ,\beta )\right)dy}\\&={x^{s+\alpha -1}(1-x)^{f+\beta -1} \over \mathrm {B} (s+\alpha ,f+\beta )},\end{aligned}}}
{\displaystyle {\begin{aligned}P(s,f\mid q=x)&={s+f \choose s}x^{s}(1-x)^{f},\\P(q=x)&={x^{\alpha -1}(1-x)^{\beta -1} \over \mathrm {B} (\alpha ,\beta )},\\P(q=x\mid s,f)&={\frac {P(s,f\mid x)P(x)}{\int P(s,f\mid y)P(y)dy}}\\&={{{s+f \choose s}x^{s+\alpha -1}(1-x)^{f+\beta -1}/\mathrm {B} (\alpha ,\beta )} \over \int _{y=0}^{1}\left({s+f \choose s}y^{s+\alpha -1}(1-y)^{f+\beta -1}/\mathrm {B} (\alpha ,\beta )\right)dy}\\&={x^{s+\alpha -1}(1-x)^{f+\beta -1} \over \mathrm {B} (s+\alpha ,f+\beta )},\end{aligned}}}

which is another Beta distribution with parameters ( α {\displaystyle \alpha } \alpha + s, β {\displaystyle \beta } \beta + f). 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.

Pseudo-observations[edit]

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. For example, the values α {\displaystyle \alpha } \alpha and β {\displaystyle \beta } \beta of a beta distribution can be thought of as corresponding to α 1 {\displaystyle \alpha -1} \alpha -1 successes and β 1 {\displaystyle \beta -1} \beta -1 failures if the posterior mode is used to choose an optimal parameter setting, or α {\displaystyle \alpha } \alpha successes and β {\displaystyle \beta } \beta 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 both in providing an intuition behind the often messy update equations, as well as to help choose reasonable hyperparameters for a prior.

Interpretations[edit]

Analogy with eigenfunctions[citation needed][edit]

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, there is a finite-dimensional space which is preserved by the operator: 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, 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 application of an operator (because, with respect to 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 of conjugate priors, rather than a single conjugate prior.

Dynamical system[edit]

One can think of conditioning on conjugate priors as defining a kind of (discrete time) dynamical system: 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 inference, 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[edit]

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 given time of day.

Over three days you look at the app at random times of the day and find the following number of cars within a short distance of your home address: x = [ 3 , 4 , 1 ] {\displaystyle \mathbf {x} =[3,4,1]} {\displaystyle \mathbf {x} =[3,4,1]}

If we assume the data comes from a Poisson distribution, we can compute the maximum likelihood estimate of the parameters of the model which is λ = 3 + 4 + 1 3 2.67. {\textstyle \lambda ={\frac {3+4+1}{3}}\approx 2.67.} {\textstyle \lambda ={\frac {3+4+1}{3}}\approx 2.67.} Using this maximum likelihood estimate we can compute the probability that there will be at least one car available: p ( x > 0 ) = 1 p ( x = 0 ) = 1 2.67 0 e 2.67 0 ! 0.93 {\textstyle p(x>0)=1-p(x=0)=1-{\frac {2.67^{0}e^{-2.67}}{0!}}\approx 0.93} {\textstyle p(x>0)=1-p(x=0)=1-{\frac {2.67^{0}e^{-2.67}}{0!}}\approx 0.93}

This is the Poisson distribution that is the most likely to have generated the observed data x {\displaystyle \mathbf {x} } \mathbf {x} . But the data could also have come from another Poisson distribution, e.g. one with λ = 3 {\displaystyle \lambda =3} {\displaystyle \lambda =3}, or λ = 2 {\displaystyle \lambda =2} \lambda =2, etc. In fact there is an infinite number of poisson distributions that could have generated the observed data and with relatively few data points we should be quite uncertain about which exact poisson distribution generated this data. Intuitively we should instead take a weighted average of the probability of p ( x > 0 ) {\displaystyle p(x>0)} {\displaystyle p(x>0)} for each of those Poisson distributions, weighted by how likely they each are, given the data we've observed x {\displaystyle \mathbf {x} } \mathbf {x} .

Generally, this quantity is known as the posterior predictive distribution p ( x | x ) = θ p ( x | θ ) p ( θ | x ) d θ , {\displaystyle p(x|\mathbf {x} )=\int _{\theta }p(x|\theta )p(\theta |\mathbf {x} )d\theta \,,} {\displaystyle p(x|\mathbf {x} )=\int _{\theta }p(x|\theta )p(\theta |\mathbf {x} )d\theta \,,} where x {\displaystyle x} x is a new data point, x {\displaystyle \mathbf {x} } \mathbf {x} is the observed data and θ {\displaystyle \theta } \theta are the parameters of the model. Using Bayes' theorem we can expand p ( θ | x ) = p ( x | θ ) p ( θ ) p ( x ) , {\displaystyle p(\theta |\mathbf {x} )={\frac {p(\mathbf {x} |\theta )p(\theta )}{p(\mathbf {x} )}}\,,} {\displaystyle p(\theta |\mathbf {x} )={\frac {p(\mathbf {x} |\theta )p(\theta )}{p(\mathbf {x} )}}\,,} such that p ( x | x ) = θ p ( x | θ ) p ( x | θ ) p ( θ ) p ( x ) d θ . {\displaystyle p(x|\mathbf {x} )=\int _{\theta }p(x|\theta ){\frac {p(\mathbf {x} |\theta )p(\theta )}{p(\mathbf {x} )}}d\theta \,.} {\displaystyle p(x|\mathbf {x} )=\int _{\theta }p(x|\theta ){\frac {p(\mathbf {x} |\theta )p(\theta )}{p(\mathbf {x} )}}d\theta \,.} Generally, this integral is hard to compute. However, if you choose a conjugate prior distribution p ( θ ) {\displaystyle p(\theta )} p(\theta ), a closed form expression can be derived. This is the posterior predictive column in the tables below.

Returning to our example, if we pick the Gamma distribution as our prior distribution over the rate of the poisson distributions, then the posterior predictive is the negative binomial distribution as can be seen from the last column in the table below. The Gamma distribution is parameterized by two hyperparameters α , β {\displaystyle \alpha ,\beta } \alpha ,\beta which we have to choose. By looking at plots of the gamma distribution we pick α = β = 2 {\displaystyle \alpha =\beta =2} {\displaystyle \alpha =\beta =2}, which seems to be a reasonable prior for the average number of cars. The choice of prior hyperparameters is inherently subjective and based on prior knowledge.

Given the prior hyperparameters α {\displaystyle \alpha } \alpha and β {\displaystyle \beta } \beta we can compute the posterior hyperparameters α = α + i x i = 2 + 3 + 4 + 1 = 10 {\textstyle \alpha '=\alpha +\sum _{i}x_{i}=2+3+4+1=10} {\textstyle \alpha '=\alpha +\sum _{i}x_{i}=2+3+4+1=10} and β = β + n = 2 + 3 = 5 {\textstyle \beta '=\beta +n=2+3=5} {\textstyle \beta '=\beta +n=2+3=5}

Given the posterior hyperparameters we can finally compute the posterior predictive of p ( x > 0 | x ) = 1 p ( x = 0 | x ) = 1 N B ( 0 | 10 , 1 1 + 5 ) 0.84 {\textstyle p(x>0|\mathbf {x} )=1-p(x=0|\mathbf {x} )=1-NB\left(0\,|\,10,{\frac {1}{1+5}}\right)\approx 0.84} {\textstyle p(x>0|\mathbf {x} )=1-p(x=0|\mathbf {x} )=1-NB\left(0\,|\,10,{\frac {1}{1+5}}\right)\approx 0.84}

This much more conservative estimate reflect the uncertainty in the model parameters, which the posterior predictive takes into account.

Table of conjugate distributions[edit]

Let n denote the number of observations. In all cases below, the data is assumed to consist of n points x 1 , , x n {\displaystyle x_{1},\ldots ,x_{n}} x_{1},\ldots ,x_{n} (which will be random vectors in the multivariate cases).

If the likelihood function belongs to the exponential family, then a conjugate prior exists, often also in the exponential family; see Exponential family: Conjugate distributions.

When likelihood function is a discrete distribution[edit]

This section needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (August 2020) (Learn how and when to remove this template message)
Likelihood Model parameters Conjugate prior distribution Prior hyperparameters Posterior hyperparameters[note 1] Interpretation of hyperparameters Posterior predictive[note 2]
Bernoulli p (probability) Beta α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! α + i = 1 n x i , β + n i = 1 n x i {\displaystyle \alpha +\sum _{i=1}^{n}x_{i},\,\beta +n-\sum _{i=1}^{n}x_{i}\!} \alpha +\sum _{i=1}^{n}x_{i},\,\beta +n-\sum _{i=1}^{n}x_{i}\! α {\displaystyle \alpha } \alpha successes, β {\displaystyle \beta } \beta failures[note 3] p ( x ~ = 1 ) = α α + β {\displaystyle p({\tilde {x}}=1)={\frac {\alpha '}{\alpha '+\beta '}}} p({\tilde {x}}=1)={\frac {\alpha '}{\alpha '+\beta '}}
Binomial p (probability) Beta α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! α + i = 1 n x i , β + i = 1 n N i i = 1 n x i {\displaystyle \alpha +\sum _{i=1}^{n}x_{i},\,\beta +\sum _{i=1}^{n}N_{i}-\sum _{i=1}^{n}x_{i}\!} \alpha +\sum _{i=1}^{n}x_{i},\,\beta +\sum _{i=1}^{n}N_{i}-\sum _{i=1}^{n}x_{i}\! α {\displaystyle \alpha } \alpha successes, β {\displaystyle \beta } \beta failures[note 3] BetaBin ( x ~ | α , β ) {\displaystyle \operatorname {BetaBin} ({\tilde {x}}|\alpha ',\beta ')} \operatorname {BetaBin} ({\tilde {x}}|\alpha ',\beta ')
(beta-binomial)
Negative binomial
with known failure number, r
p (probability) Beta α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! α + i = 1 n x i , β + r n {\displaystyle \alpha +\sum _{i=1}^{n}x_{i},\,\beta +rn\!} \alpha +\sum _{i=1}^{n}x_{i},\,\beta +rn\! α {\displaystyle \alpha } \alpha total successes, β {\displaystyle \beta } \beta failures[note 3] (i.e., β r {\displaystyle {\frac {\beta }{r}}} {\displaystyle {\frac {\beta }{r}}} experiments, assuming r {\displaystyle r} r stays fixed) BetaNegBin ( x ~ | α , β ) {\displaystyle \operatorname {BetaNegBin} ({\tilde {x}}|\alpha ',\beta ')} {\displaystyle \operatorname {BetaNegBin} ({\tilde {x}}|\alpha ',\beta ')}

(beta-negative binomial)

Poisson λ (rate) Gamma k , θ {\displaystyle k,\,\theta \!} k,\,\theta \! k + i = 1 n x i , θ n θ + 1 {\displaystyle k+\sum _{i=1}^{n}x_{i},\ {\frac {\theta }{n\theta +1}}\!} {\displaystyle k+\sum _{i=1}^{n}x_{i},\ {\frac {\theta }{n\theta +1}}\!} k {\displaystyle k} k total occurrences in 1 θ {\displaystyle {\frac {1}{\theta }}} {\displaystyle {\frac {1}{\theta }}} intervals NB ( x ~ k , θ ) {\displaystyle \operatorname {NB} \left({\tilde {x}}\mid k',{\theta '}\right)} {\displaystyle \operatorname {NB} \left({\tilde {x}}\mid k',{\theta '}\right)}
(negative binomial)
α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! [note 4] α + i = 1 n x i , β + n {\displaystyle \alpha +\sum _{i=1}^{n}x_{i},\ \beta +n\!} \alpha +\sum _{i=1}^{n}x_{i},\ \beta +n\! α {\displaystyle \alpha } \alpha total occurrences in β {\displaystyle \beta } \beta intervals NB ( x ~ α , 1 1 + β ) {\displaystyle \operatorname {NB} \left({\tilde {x}}\mid \alpha ',{\frac {1}{1+\beta '}}\right)} {\displaystyle \operatorname {NB} \left({\tilde {x}}\mid \alpha ',{\frac {1}{1+\beta '}}\right)}
(negative binomial)
Categorical p (probability vector), k (number of categories; i.e., size of p) Dirichlet α {\displaystyle {\boldsymbol {\alpha }}\!} {\boldsymbol {\alpha }}\! α + ( c 1 , , c k ) , {\displaystyle {\boldsymbol {\alpha }}+(c_{1},\ldots ,c_{k}),} {\displaystyle {\boldsymbol {\alpha }}+(c_{1},\ldots ,c_{k}),} where c i {\displaystyle c_{i}} c_{i} is the number of observations in category i α i {\displaystyle \alpha _{i}} \alpha _{i} occurrences of category i {\displaystyle i} i[note 3] p ( x ~ = i ) = α i i α i = α i + c i i α i + n {\displaystyle {\begin{aligned}p({\tilde {x}}=i)&={\frac {{\alpha _{i}}'}{\sum _{i}{\alpha _{i}}'}}\\&={\frac {\alpha _{i}+c_{i}}{\sum _{i}\alpha _{i}+n}}\end{aligned}}} {\displaystyle {\begin{aligned}p({\tilde {x}}=i)&={\frac {{\alpha _{i}}'}{\sum _{i}{\alpha _{i}}'}}\\&={\frac {\alpha _{i}+c_{i}}{\sum _{i}\alpha _{i}+n}}\end{aligned}}}
Multinomial p (probability vector), k (number of categories; i.e., size of p) Dirichlet α {\displaystyle {\boldsymbol {\alpha }}\!} {\boldsymbol {\alpha }}\! α + i = 1 n x i {\displaystyle {\boldsymbol {\alpha }}+\sum _{i=1}^{n}\mathbf {x} _{i}\!} {\displaystyle {\boldsymbol {\alpha }}+\sum _{i=1}^{n}\mathbf {x} _{i}\!} α i {\displaystyle \alpha _{i}} \alpha _{i} occurrences of category i {\displaystyle i} i[note 3] DirMult ( x ~ α ) {\displaystyle \operatorname {DirMult} ({\tilde {\mathbf {x} }}\mid {\boldsymbol {\alpha }}')} {\displaystyle \operatorname {DirMult} ({\tilde {\mathbf {x} }}\mid {\boldsymbol {\alpha }}')}
(Dirichlet-multinomial)
Hypergeometric
with known total population size, N
M (number of target members) Beta-binomial[4] n = N , α , β {\displaystyle n=N,\alpha ,\,\beta \!} n=N,\alpha ,\,\beta \! α + i = 1 n x i , β + i = 1 n N i i = 1 n x i {\displaystyle \alpha +\sum _{i=1}^{n}x_{i},\,\beta +\sum _{i=1}^{n}N_{i}-\sum _{i=1}^{n}x_{i}\!} \alpha +\sum _{i=1}^{n}x_{i},\,\beta +\sum _{i=1}^{n}N_{i}-\sum _{i=1}^{n}x_{i}\! α {\displaystyle \alpha } \alpha successes, β {\displaystyle \beta } \beta failures[note 3]
Geometric p0 (probability) Beta α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! α + n , β + i = 1 n x i {\displaystyle \alpha +n,\,\beta +\sum _{i=1}^{n}x_{i}\!} \alpha +n,\,\beta +\sum _{i=1}^{n}x_{i}\! α {\displaystyle \alpha } \alpha experiments, β {\displaystyle \beta } \beta total failures[note 3]

When likelihood function is a continuous distribution[edit]

Likelihood Model parameters Conjugate prior distribution Prior hyperparameters Posterior hyperparameters[note 1] Interpretation of hyperparameters Posterior predictive[note 5]
Normal
with known variance σ2
μ (mean) Normal μ 0 , σ 0 2 {\displaystyle \mu _{0},\,\sigma _{0}^{2}\!} \mu _{0},\,\sigma _{0}^{2}\! 1 1 σ 0 2 + n σ 2 ( μ 0 σ 0 2 + i = 1 n x i σ 2 ) , ( 1 σ 0 2 + n σ 2 ) 1 {\displaystyle {\frac {1}{{\frac {1}{\sigma _{0}^{2}}}+{\frac {n}{\sigma ^{2}}}}}\left({\frac {\mu _{0}}{\sigma _{0}^{2}}}+{\frac {\sum _{i=1}^{n}x_{i}}{\sigma ^{2}}}\right),\left({\frac {1}{\sigma _{0}^{2}}}+{\frac {n}{\sigma ^{2}}}\right)^{-1}} {\displaystyle {\frac {1}{{\frac {1}{\sigma _{0}^{2}}}+{\frac {n}{\sigma ^{2}}}}}\left({\frac {\mu _{0}}{\sigma _{0}^{2}}}+{\frac {\sum _{i=1}^{n}x_{i}}{\sigma ^{2}}}\right),\left({\frac {1}{\sigma _{0}^{2}}}+{\frac {n}{\sigma ^{2}}}\right)^{-1}} mean was estimated from observations with total precision (sum of all individual precisions) 1 / σ 0 2 {\displaystyle 1/\sigma _{0}^{2}} 1/\sigma _{0}^{2} and with sample mean μ 0 {\displaystyle \mu _{0}} \mu _{0} N ( x ~ | μ 0 , σ 0 2 + σ 2 ) {\displaystyle {\mathcal {N}}({\tilde {x}}|\mu _{0}',{\sigma _{0}^{2}}'+\sigma ^{2})} {\mathcal {N}}({\tilde {x}}|\mu _{0}',{\sigma _{0}^{2}}'+\sigma ^{2})[5]
Normal
with known precision τ
μ (mean) Normal μ 0 , τ 0 {\displaystyle \mu _{0},\,\tau _{0}\!} \mu _{0},\,\tau _{0}\! τ 0 μ 0 + τ i = 1 n x i τ 0 + n τ , τ 0 + n τ {\displaystyle {\frac {\tau _{0}\mu _{0}+\tau \sum _{i=1}^{n}x_{i}}{\tau _{0}+n\tau }},\,\tau _{0}+n\tau } {\displaystyle {\frac {\tau _{0}\mu _{0}+\tau \sum _{i=1}^{n}x_{i}}{\tau _{0}+n\tau }},\,\tau _{0}+n\tau } mean was estimated from observations with total precision (sum of all individual precisions) τ 0 {\displaystyle \tau _{0}} \tau _{0} and with sample mean μ 0 {\displaystyle \mu _{0}} \mu _{0} N ( x ~ μ 0 , 1 τ 0 + 1 τ ) {\displaystyle {\mathcal {N}}\left({\tilde {x}}\mid \mu _{0}',{\frac {1}{\tau _{0}'}}+{\frac {1}{\tau }}\right)} {\displaystyle {\mathcal {N}}\left({\tilde {x}}\mid \mu _{0}',{\frac {1}{\tau _{0}'}}+{\frac {1}{\tau }}\right)}[5]
Normal
with known mean μ
σ2 (variance) Inverse gamma α , β {\displaystyle \mathbf {\alpha ,\,\beta } } \mathbf {\alpha ,\,\beta } [note 6] α + n 2 , β + i = 1 n ( x i μ ) 2 2 {\displaystyle \mathbf {\alpha } +{\frac {n}{2}},\,\mathbf {\beta } +{\frac {\sum _{i=1}^{n}{(x_{i}-\mu )^{2}}}{2}}} \mathbf {\alpha } +{\frac {n}{2}},\,\mathbf {\beta } +{\frac {\sum _{i=1}^{n}{(x_{i}-\mu )^{2}}}{2}} variance was estimated from 2 α {\displaystyle 2\alpha } 2\alpha observations with sample variance β / α {\displaystyle \beta /\alpha } \beta /\alpha (i.e. with sum of squared deviations 2 β {\displaystyle 2\beta } 2\beta , where deviations are from known mean μ {\displaystyle \mu } \mu ) t 2 α ( x ~ | μ , σ 2 = β / α ) {\displaystyle t_{2\alpha '}({\tilde {x}}|\mu ,\sigma ^{2}=\beta '/\alpha ')} t_{2\alpha '}({\tilde {x}}|\mu ,\sigma ^{2}=\beta '/\alpha ')[5]
Normal
with known mean μ
σ2 (variance) Scaled inverse chi-squared ν , σ 0 2 {\displaystyle \nu ,\,\sigma _{0}^{2}\!} \nu ,\,\sigma _{0}^{2}\! ν + n , ν σ 0 2 + i = 1 n ( x i μ ) 2 ν + n {\displaystyle \nu +n,\,{\frac {\nu \sigma _{0}^{2}+\sum _{i=1}^{n}(x_{i}-\mu )^{2}}{\nu +n}}\!} \nu +n,\,{\frac {\nu \sigma _{0}^{2}+\sum _{i=1}^{n}(x_{i}-\mu )^{2}}{\nu +n}}\! variance was estimated from ν {\displaystyle \nu } \nu observations with sample variance σ 0 2 {\displaystyle \sigma _{0}^{2}} \sigma _{0}^{2} t ν ( x ~ | μ , σ 0 2 ) {\displaystyle t_{\nu '}({\tilde {x}}|\mu ,{\sigma _{0}^{2}}')} t_{\nu '}({\tilde {x}}|\mu ,{\sigma _{0}^{2}}')[5]
Normal
with known mean μ
τ (precision) Gamma α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \![note 4] α + n 2 , β + i = 1 n ( x i μ ) 2 2 {\displaystyle \alpha +{\frac {n}{2}},\,\beta +{\frac {\sum _{i=1}^{n}(x_{i}-\mu )^{2}}{2}}\!} \alpha +{\frac {n}{2}},\,\beta +{\frac {\sum _{i=1}^{n}(x_{i}-\mu )^{2}}{2}}\! precision was estimated from 2 α {\displaystyle 2\alpha } 2\alpha observations with sample variance β / α {\displaystyle \beta /\alpha } \beta /\alpha (i.e. with sum of squared deviations 2 β {\displaystyle 2\beta } 2\beta , where deviations are from known mean μ {\displaystyle \mu } \mu ) t 2 α ( x ~ μ , σ 2 = β / α ) {\displaystyle t_{2\alpha '}({\tilde {x}}\mid \mu ,\sigma ^{2}=\beta '/\alpha ')} {\displaystyle t_{2\alpha '}({\tilde {x}}\mid \mu ,\sigma ^{2}=\beta '/\alpha ')}[5]
Normal[note 7] μ and σ2
Assuming exchangeability
Normal-inverse gamma μ 0 , ν , α , β {\displaystyle \mu _{0},\,\nu ,\,\alpha ,\,\beta } \mu _{0},\,\nu ,\,\alpha ,\,\beta ν μ 0 + n x ¯ ν + n , ν + n , α + n 2 , {\displaystyle {\frac {\nu \mu _{0}+n{\bar {x}}}{\nu +n}},\,\nu +n,\,\alpha +{\frac {n}{2}},\,} {\frac {\nu \mu _{0}+n{\bar {x}}}{\nu +n}},\,\nu +n,\,\alpha +{\frac {n}{2}},\,
β + 1 2 i = 1 n ( x i x ¯ ) 2 + n ν ν + n ( x ¯ μ 0 ) 2 2 {\displaystyle \beta +{\tfrac {1}{2}}\sum _{i=1}^{n}(x_{i}-{\bar {x}})^{2}+{\frac {n\nu }{\nu +n}}{\frac {({\bar {x}}-\mu _{0})^{2}}{2}}} \beta +{\tfrac {1}{2}}\sum _{i=1}^{n}(x_{i}-{\bar {x}})^{2}+{\frac {n\nu }{\nu +n}}{\frac {({\bar {x}}-\mu _{0})^{2}}{2}}
mean was estimated from ν {\displaystyle \nu } \nu observations with sample mean μ 0 {\displaystyle \mu _{0}} \mu _{0}; variance was estimated from 2 α {\displaystyle 2\alpha } 2\alpha observations with sample mean μ 0 {\displaystyle \mu _{0}} \mu _{0} and sum of squared deviations 2 β {\displaystyle 2\beta } 2\beta t 2 α ( x ~ μ , β ( ν + 1 ) ν α ) {\displaystyle t_{2\alpha '}\left({\tilde {x}}\mid \mu ',{\frac {\beta '(\nu '+1)}{\nu '\alpha '}}\right)} {\displaystyle t_{2\alpha '}\left({\tilde {x}}\mid \mu ',{\frac {\beta '(\nu '+1)}{\nu '\alpha '}}\right)}[5]
Normal μ and τ
Assuming exchangeability
Normal-gamma μ 0 , ν , α , β {\displaystyle \mu _{0},\,\nu ,\,\alpha ,\,\beta } \mu _{0},\,\nu ,\,\alpha ,\,\beta ν μ 0 + n x ¯ ν + n , ν + n , α + n 2 , {\displaystyle {\frac {\nu \mu _{0}+n{\bar {x}}}{\nu +n}},\,\nu +n,\,\alpha +{\frac {n}{2}},\,} {\frac {\nu \mu _{0}+n{\bar {x}}}{\nu +n}},\,\nu +n,\,\alpha +{\frac {n}{2}},\,
β + 1 2 i = 1 n ( x i x ¯ ) 2 + n ν ν + n ( x ¯ μ 0 ) 2 2 {\displaystyle \beta +{\tfrac {1}{2}}\sum _{i=1}^{n}(x_{i}-{\bar {x}})^{2}+{\frac {n\nu }{\nu +n}}{\frac {({\bar {x}}-\mu _{0})^{2}}{2}}} \beta +{\tfrac {1}{2}}\sum _{i=1}^{n}(x_{i}-{\bar {x}})^{2}+{\frac {n\nu }{\nu +n}}{\frac {({\bar {x}}-\mu _{0})^{2}}{2}}
mean was estimated from ν {\displaystyle \nu } \nu observations with sample mean μ 0 {\displaystyle \mu _{0}} \mu _{0}, and precision was estimated from 2 α {\displaystyle 2\alpha } 2\alpha observations with sample mean μ 0 {\displaystyle \mu _{0}} \mu _{0} and sum of squared deviations 2 β {\displaystyle 2\beta } 2\beta t 2 α ( x ~ μ , β ( ν + 1 ) α ν ) {\displaystyle t_{2\alpha '}\left({\tilde {x}}\mid \mu ',{\frac {\beta '(\nu '+1)}{\alpha '\nu '}}\right)} {\displaystyle t_{2\alpha '}\left({\tilde {x}}\mid \mu ',{\frac {\beta '(\nu '+1)}{\alpha '\nu '}}\right)}[5]
Multivariate normal with known covariance matrix Σ μ (mean vector) Multivariate normal μ 0 , Σ 0 {\displaystyle {\boldsymbol {\boldsymbol {\mu }}}_{0},\,{\boldsymbol {\Sigma }}_{0}} {\boldsymbol {\boldsymbol {\mu }}}_{0},\,{\boldsymbol {\Sigma }}_{0} ( Σ 0 1 + n Σ 1 ) 1 ( Σ 0 1 μ 0 + n Σ 1 x ¯ ) , {\displaystyle \left({\boldsymbol {\Sigma }}_{0}^{-1}+n{\boldsymbol {\Sigma }}^{-1}\right)^{-1}\left({\boldsymbol {\Sigma }}_{0}^{-1}{\boldsymbol {\mu }}_{0}+n{\boldsymbol {\Sigma }}^{-1}\mathbf {\bar {x}} \right),} \left({\boldsymbol {\Sigma }}_{0}^{-1}+n{\boldsymbol {\Sigma }}^{-1}\right)^{-1}\left({\boldsymbol {\Sigma }}_{0}^{-1}{\boldsymbol {\mu }}_{0}+n{\boldsymbol {\Sigma }}^{-1}\mathbf {\bar {x}} \right),
( Σ 0 1 + n Σ 1 ) 1 {\displaystyle \left({\boldsymbol {\Sigma }}_{0}^{-1}+n{\boldsymbol {\Sigma }}^{-1}\right)^{-1}} \left({\boldsymbol {\Sigma }}_{0}^{-1}+n{\boldsymbol {\Sigma }}^{-1}\right)^{-1}
mean was estimated from observations with total precision (sum of all individual precisions) Σ 0 1 {\displaystyle {\boldsymbol {\Sigma }}_{0}^{-1}} {\boldsymbol {\Sigma }}_{0}^{-1} and with sample mean μ 0 {\displaystyle {\boldsymbol {\mu }}_{0}} {\boldsymbol {\mu }}_{0} N ( x ~ μ 0 , Σ 0 + Σ ) {\displaystyle {\mathcal {N}}({\tilde {\mathbf {x} }}\mid {{\boldsymbol {\mu }}_{0}}',{{\boldsymbol {\Sigma }}_{0}}'+{\boldsymbol {\Sigma }})} {\displaystyle {\mathcal {N}}({\tilde {\mathbf {x} }}\mid {{\boldsymbol {\mu }}_{0}}',{{\boldsymbol {\Sigma }}_{0}}'+{\boldsymbol {\Sigma }})}[5]
Multivariate normal with known precision matrix Λ μ (mean vector) Multivariate normal μ 0 , Λ 0 {\displaystyle \mathbf {\boldsymbol {\mu }} _{0},\,{\boldsymbol {\Lambda }}_{0}} \mathbf {\boldsymbol {\mu }} _{0},\,{\boldsymbol {\Lambda }}_{0} ( Λ 0 + n Λ ) 1 ( Λ 0 μ 0 + n Λ x ¯ ) , ( Λ 0 + n Λ ) {\displaystyle \left({\boldsymbol {\Lambda }}_{0}+n{\boldsymbol {\Lambda }}\right)^{-1}\left({\boldsymbol {\Lambda }}_{0}{\boldsymbol {\mu }}_{0}+n{\boldsymbol {\Lambda }}\mathbf {\bar {x}} \right),\,\left({\boldsymbol {\Lambda }}_{0}+n{\boldsymbol {\Lambda }}\right)} \left({\boldsymbol {\Lambda }}_{0}+n{\boldsymbol {\Lambda }}\right)^{-1}\left({\boldsymbol {\Lambda }}_{0}{\boldsymbol {\mu }}_{0}+n{\boldsymbol {\Lambda }}\mathbf {\bar {x}} \right),\,\left({\boldsymbol {\Lambda }}_{0}+n{\boldsymbol {\Lambda }}\right) mean was estimated from observations with total precision (sum of all individual precisions) Λ 0 {\displaystyle {\boldsymbol {\Lambda }}_{0}} \boldsymbol\Lambda_0 and with sample mean μ 0 {\displaystyle {\boldsymbol {\mu }}_{0}} {\boldsymbol {\mu }}_{0} N ( x ~ μ 0 , ( Λ 0 1 + Λ 1 ) 1 ) {\displaystyle {\mathcal {N}}\left({\tilde {\mathbf {x} }}\mid {{\boldsymbol {\mu }}_{0}}',({{{\boldsymbol {\Lambda }}_{0}}'}^{-1}+{\boldsymbol {\Lambda }}^{-1})^{-1}\right)} {\displaystyle {\mathcal {N}}\left({\tilde {\mathbf {x} }}\mid {{\boldsymbol {\mu }}_{0}}',({{{\boldsymbol {\Lambda }}_{0}}'}^{-1}+{\boldsymbol {\Lambda }}^{-1})^{-1}\right)}[5]
Multivariate normal with known mean μ Σ (covariance matrix) Inverse-Wishart ν , Ψ {\displaystyle \nu ,\,{\boldsymbol {\Psi }}} \nu ,\,{\boldsymbol {\Psi }} n + ν , Ψ + i = 1 n ( x i μ ) ( x i μ ) T {\displaystyle n+\nu ,\,{\boldsymbol {\Psi }}+\sum _{i=1}^{n}(\mathbf {x_{i}} -{\boldsymbol {\mu }})(\mathbf {x_{i}} -{\boldsymbol {\mu }})^{T}} n+\nu ,\,{\boldsymbol {\Psi }}+\sum _{i=1}^{n}(\mathbf {x_{i}} -{\boldsymbol {\mu }})(\mathbf {x_{i}} -{\boldsymbol {\mu }})^{T} covariance matrix was estimated from ν {\displaystyle \nu } \nu observations with sum of pairwise deviation products Ψ {\displaystyle {\boldsymbol {\Psi }}} {\boldsymbol {\Psi }} t ν p + 1 ( x ~ | μ , 1 ν p + 1 Ψ ) {\displaystyle t_{\nu '-p+1}\left({\tilde {\mathbf {x} }}|{\boldsymbol {\mu }},{\frac {1}{\nu '-p+1}}{\boldsymbol {\Psi }}'\right)} t_{\nu '-p+1}\left({\tilde {\mathbf {x} }}|{\boldsymbol {\mu }},{\frac {1}{\nu '-p+1}}{\boldsymbol {\Psi }}'\right)[5]
Multivariate normal with known mean μ Λ (precision matrix) Wishart ν , V {\displaystyle \nu ,\,\mathbf {V} } \nu ,\,\mathbf {V} n + ν , ( V 1 + i = 1 n ( x i μ ) ( x i μ ) T ) 1 {\displaystyle n+\nu ,\,\left(\mathbf {V} ^{-1}+\sum _{i=1}^{n}(\mathbf {x_{i}} -{\boldsymbol {\mu }})(\mathbf {x_{i}} -{\boldsymbol {\mu }})^{T}\right)^{-1}} n+\nu ,\,\left(\mathbf {V} ^{-1}+\sum _{i=1}^{n}(\mathbf {x_{i}} -{\boldsymbol {\mu }})(\mathbf {x_{i}} -{\boldsymbol {\mu }})^{T}\right)^{-1} covariance matrix was estimated from ν {\displaystyle \nu } \nu observations with sum of pairwise deviation products V 1 {\displaystyle \mathbf {V} ^{-1}} \mathbf {V} ^{-1} t ν p + 1 ( x ~ μ , 1 ν p + 1 V 1 ) {\displaystyle t_{\nu '-p+1}\left({\tilde {\mathbf {x} }}\mid {\boldsymbol {\mu }},{\frac {1}{\nu '-p+1}}{\mathbf {V} '}^{-1}\right)} {\displaystyle t_{\nu '-p+1}\left({\tilde {\mathbf {x} }}\mid {\boldsymbol {\mu }},{\frac {1}{\nu '-p+1}}{\mathbf {V} '}^{-1}\right)}[5]
Multivariate normal μ (mean vector) and Σ (covariance matrix) normal-inverse-Wishart μ 0 , κ 0 , ν 0 , Ψ {\displaystyle {\boldsymbol {\mu }}_{0},\,\kappa _{0},\,\nu _{0},\,{\boldsymbol {\Psi }}} {\boldsymbol {\mu }}_{0},\,\kappa _{0},\,\nu _{0},\,{\boldsymbol {\Psi }} κ 0 μ 0 + n x ¯ κ 0 + n , κ 0 + n , ν 0 + n , {\displaystyle {\frac {\kappa _{0}{\boldsymbol {\mu }}_{0}+n\mathbf {\bar {x}} }{\kappa _{0}+n}},\,\kappa _{0}+n,\,\nu _{0}+n,\,} {\frac {\kappa _{0}{\boldsymbol {\mu }}_{0}+n\mathbf {\bar {x}} }{\kappa _{0}+n}},\,\kappa _{0}+n,\,\nu _{0}+n,\,
Ψ + C + κ 0 n κ 0 + n ( x ¯ μ 0 ) ( x ¯ μ 0 ) T {\displaystyle {\boldsymbol {\Psi }}+\mathbf {C} +{\frac {\kappa _{0}n}{\kappa _{0}+n}}(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})^{T}} {\boldsymbol {\Psi }}+\mathbf {C} +{\frac {\kappa _{0}n}{\kappa _{0}+n}}(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})^{T}
  • C = i = 1 n ( x i x ¯ ) ( x i x ¯ ) T {\displaystyle \mathbf {C} =\sum _{i=1}^{n}(\mathbf {x_{i}} -\mathbf {\bar {x}} )(\mathbf {x_{i}} -\mathbf {\bar {x}} )^{T}} \mathbf {C} =\sum _{i=1}^{n}(\mathbf {x_{i}} -\mathbf {\bar {x}} )(\mathbf {x_{i}} -\mathbf {\bar {x}} )^{T}
mean was estimated from κ 0 {\displaystyle \kappa _{0}} \kappa _{0} observations with sample mean μ 0 {\displaystyle {\boldsymbol {\mu }}_{0}} {\boldsymbol {\mu }}_{0}; covariance matrix was estimated from ν 0 {\displaystyle \nu _{0}} \nu _{0} observations with sample mean μ 0 {\displaystyle {\boldsymbol {\mu }}_{0}} {\boldsymbol {\mu }}_{0} and with sum of pairwise deviation products Ψ = ν 0 Σ 0 {\displaystyle {\boldsymbol {\Psi }}=\nu _{0}{\boldsymbol {\Sigma }}_{0}} {\boldsymbol {\Psi }}=\nu _{0}{\boldsymbol {\Sigma }}_{0} t ν 0 p + 1 ( x ~ | μ 0 , κ 0 + 1 κ 0 ( ν 0 p + 1 ) Ψ ) {\displaystyle t_{{\nu _{0}}'-p+1}\left({\tilde {\mathbf {x} }}|{{\boldsymbol {\mu }}_{0}}',{\frac {{\kappa _{0}}'+1}{{\kappa _{0}}'({\nu _{0}}'-p+1)}}{\boldsymbol {\Psi }}'\right)} t_{{\nu _{0}}'-p+1}\left({\tilde {\mathbf {x} }}|{{\boldsymbol {\mu }}_{0}}',{\frac {{\kappa _{0}}'+1}{{\kappa _{0}}'({\nu _{0}}'-p+1)}}{\boldsymbol {\Psi }}'\right)[5]
Multivariate normal μ (mean vector) and Λ (precision matrix) normal-Wishart μ 0 , κ 0 , ν 0 , V {\displaystyle {\boldsymbol {\mu }}_{0},\,\kappa _{0},\,\nu _{0},\,\mathbf {V} } {\boldsymbol {\mu }}_{0},\,\kappa _{0},\,\nu _{0},\,\mathbf {V} κ 0 μ 0 + n x ¯ κ 0 + n , κ 0 + n , ν 0 + n , {\displaystyle {\frac {\kappa _{0}{\boldsymbol {\mu }}_{0}+n\mathbf {\bar {x}} }{\kappa _{0}+n}},\,\kappa _{0}+n,\,\nu _{0}+n,\,} {\frac {\kappa _{0}{\boldsymbol {\mu }}_{0}+n\mathbf {\bar {x}} }{\kappa _{0}+n}},\,\kappa _{0}+n,\,\nu _{0}+n,\,
( V 1 + C + κ 0 n κ 0 + n ( x ¯ μ 0 ) ( x ¯ μ 0 ) T ) 1 {\displaystyle \left(\mathbf {V} ^{-1}+\mathbf {C} +{\frac {\kappa _{0}n}{\kappa _{0}+n}}(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})^{T}\right)^{-1}} \left(\mathbf {V} ^{-1}+\mathbf {C} +{\frac {\kappa _{0}n}{\kappa _{0}+n}}(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})(\mathbf {\bar {x}} -{\boldsymbol {\mu }}_{0})^{T}\right)^{-1}
  • C = i = 1 n ( x i x ¯ ) ( x i x ¯ ) T {\displaystyle \mathbf {C} =\sum _{i=1}^{n}(\mathbf {x_{i}} -\mathbf {\bar {x}} )(\mathbf {x_{i}} -\mathbf {\bar {x}} )^{T}} \mathbf {C} =\sum _{i=1}^{n}(\mathbf {x_{i}} -\mathbf {\bar {x}} )(\mathbf {x_{i}} -\mathbf {\bar {x}} )^{T}
mean was estimated from κ 0 {\displaystyle \kappa _{0}} \kappa _{0} observations with sample mean μ 0 {\displaystyle {\boldsymbol {\mu }}_{0}} {\boldsymbol {\mu }}_{0}; covariance matrix was estimated from ν 0 {\displaystyle \nu _{0}} \nu _{0} observations with sample mean μ 0 {\displaystyle {\boldsymbol {\mu }}_{0}} {\boldsymbol {\mu }}_{0} and with sum of pairwise deviation products V 1 {\displaystyle \mathbf {V} ^{-1}} \mathbf {V} ^{-1} t ν 0 p + 1 ( x ~ μ 0 , κ 0 + 1 κ 0 ( ν 0 p + 1 ) V 1 ) {\displaystyle t_{{\nu _{0}}'-p+1}\left({\tilde {\mathbf {x} }}\mid {{\boldsymbol {\mu }}_{0}}',{\frac {{\kappa _{0}}'+1}{{\kappa _{0}}'({\nu _{0}}'-p+1)}}{\mathbf {V} '}^{-1}\right)} {\displaystyle t_{{\nu _{0}}'-p+1}\left({\tilde {\mathbf {x} }}\mid {{\boldsymbol {\mu }}_{0}}',{\frac {{\kappa _{0}}'+1}{{\kappa _{0}}'({\nu _{0}}'-p+1)}}{\mathbf {V} '}^{-1}\right)}[5]
Uniform U ( 0 , θ ) {\displaystyle U(0,\theta )\!} U(0,\theta )\! Pareto x m , k {\displaystyle x_{m},\,k\!} x_{m},\,k\! max { x 1 , , x n , x m } , k + n {\displaystyle \max\{\,x_{1},\ldots ,x_{n},x_{\mathrm {m} }\},\,k+n\!} \max\{\,x_{1},\ldots ,x_{n},x_{\mathrm {m} }\},\,k+n\! k {\displaystyle k} k observations with maximum value x m {\displaystyle x_{m}} x_{m}
Pareto
with known minimum xm
k (shape) Gamma α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! α + n , β + i = 1 n ln x i x m {\displaystyle \alpha +n,\,\beta +\sum _{i=1}^{n}\ln {\frac {x_{i}}{x_{\mathrm {m} }}}\!} \alpha +n,\,\beta +\sum _{i=1}^{n}\ln {\frac {x_{i}}{x_{\mathrm {m} }}}\! α {\displaystyle \alpha } \alpha observations with sum β {\displaystyle \beta } \beta of the order of magnitude of each observation (i.e. the logarithm of the ratio of each observation to the minimum x m {\displaystyle x_{m}} x_{m})
Weibull
with known shape β
θ (scale) Inverse gamma[4] a , b {\displaystyle a,b\!} a,b\! a + n , b + i = 1 n x i β {\displaystyle a+n,\,b+\sum _{i=1}^{n}x_{i}^{\beta }\!} a+n,\,b+\sum _{i=1}^{n}x_{i}^{\beta }\! a {\displaystyle a} a observations with sum b {\displaystyle b} b of the β'th power of each observation
Log-normal Same as for the normal distribution after exponentiating the data
Exponential λ (rate) Gamma α , β {\displaystyle \alpha ,\,\beta \!} \alpha ,\,\beta \! [note 4] α + n , β + i = 1 n x i {\displaystyle \alpha +n,\,\beta +\sum _{i=1}^{n}x_{i}\!} \alpha +n,\,\beta +\sum _{i=1}^{n}x_{i}\! α 1 {\displaystyle \alpha -1} \alpha -1 observations that sum to β {\displaystyle \beta } \beta [6] Lomax ( x ~ β , α ) {\displaystyle \operatorname {Lomax} ({\tilde {x}}\mid \beta ',\alpha ')} {\displaystyle \operatorname {Lomax} ({\tilde {x}}\mid \beta ',\alpha ')}
(Lomax distribution)
Gamma
with known shape α
β (rate) Gamma α 0 , β 0 {\displaystyle \alpha _{0},\,\beta _{0}\!} \alpha _{0},\,\beta _{0}\! α 0 + n α , β 0 + i = 1 n x i {\displaystyle \alpha _{0}+n\alpha ,\,\beta _{0}+\sum _{i=1}^{n}x_{i}\!} \alpha _{0}+n\alpha ,\,\beta _{0}+\sum _{i=1}^{n}x_{i}\! α 0 / α {\displaystyle \alpha _{0}/\alpha } {\displaystyle \alpha _{0}/\alpha } observations with sum β 0 {\displaystyle \beta _{0}} \beta _{0} CG ( x ~ α , α 0 , β 0 ) = β ( x ~ | α , α 0 , 1 , β 0 ) {\displaystyle \operatorname {CG} ({\tilde {\mathbf {x} }}\mid \alpha ,{\alpha _{0}}',{\beta _{0}}')=\operatorname {\beta '} ({\tilde {\mathbf {x} }}|\alpha ,{\alpha _{0}}',1,{\beta _{0}}')} {\displaystyle \operatorname {CG} ({\tilde {\mathbf {x} }}\mid \alpha ,{\alpha _{0}}',{\beta _{0}}')=\operatorname {\beta '} ({\tilde {\mathbf {x} }}|\alpha ,{\alpha _{0}}',1,{\beta _{0}}')} [note 8]
Inverse Gamma
with known shape α
β (inverse scale) Gamma α 0 , β 0 {\displaystyle \alpha _{0},\,\beta _{0}\!} \alpha _{0},\,\beta _{0}\! α 0 + n α , β 0 + i = 1 n 1 x i {\displaystyle \alpha _{0}+n\alpha ,\,\beta _{0}+\sum _{i=1}^{n}{\frac {1}{x_{i}}}\!} \alpha _{0}+n\alpha ,\,\beta _{0}+\sum _{i=1}^{n}{\frac {1}{x_{i}}}\! α 0 / α {\displaystyle \alpha _{0}/\alpha } {\displaystyle \alpha _{0}/\alpha } observations with sum β 0 {\displaystyle \beta _{0}} \beta _{0}
Gamma
with known rate β
α (shape) a α 1 β α c Γ ( α ) b {\displaystyle \propto {\frac {a^{\alpha -1}\beta ^{\alpha c}}{\Gamma (\alpha )^{b}}}} \propto {\frac {a^{\alpha -1}\beta ^{\alpha c}}{\Gamma (\alpha )^{b}}} a , b , c {\displaystyle a,\,b,\,c\!} a,\,b,\,c\! a i = 1 n x i , b + n , c + n {\displaystyle a\prod _{i=1}^{n}x_{i},\,b+n,\,c+n\!} a\prod _{i=1}^{n}x_{i},\,b+n,\,c+n\! b {\displaystyle b} b or c {\displaystyle c} c observations ( b {\displaystyle b} b for estimating α {\displaystyle \alpha } \alpha , c {\displaystyle c} c for estimating β {\displaystyle \beta } \beta ) with product a {\displaystyle a} a
Gamma [4] α (shape), β (inverse scale) p α 1 e β q Γ ( α ) r β α s {\displaystyle \propto {\frac {p^{\alpha -1}e^{-\beta q}}{\Gamma (\alpha )^{r}\beta ^{-\alpha s}}}} \propto {\frac {p^{\alpha -1}e^{-\beta q}}{\Gamma (\alpha )^{r}\beta ^{-\alpha s}}} p , q , r , s {\displaystyle p,\,q,\,r,\,s\!} p,\,q,\,r,\,s\! p i = 1 n x i , q + i = 1 n x i , r + n , s + n {\displaystyle p\prod _{i=1}^{n}x_{i},\,q+\sum _{i=1}^{n}x_{i},\,r+n,\,s+n\!} p\prod _{i=1}^{n}x_{i},\,q+\sum _{i=1}^{n}x_{i},\,r+n,\,s+n\! α {\displaystyle \alpha } \alpha was estimated from r {\displaystyle r} r observations with product p {\displaystyle p} p; β {\displaystyle \beta } \beta was estimated from s {\displaystyle s} s observations with sum q {\displaystyle q} q

See also[edit]

Notes[edit]

  1. ^ a b Denoted by the same symbols as the prior hyperparameters with primes added ('). For instance α {\displaystyle \alpha } \alpha is denoted α {\displaystyle \alpha '} \alpha '
  2. ^ This is the posterior predictive distribution of a new data point x ~ {\displaystyle {\tilde {x}}} {\tilde {x}} given the observed data points, with the parameters marginalized out. Variables with primes indicate the posterior values of the parameters.
  3. ^ a b c d e f g The exact interpretation of the parameters of a beta distribution in terms of number of successes and failures depends on what function is used to extract a point estimate from the distribution. The mean of a beta distribution is α α + β , {\displaystyle {\frac {\alpha }{\alpha +\beta }},} {\frac {\alpha }{\alpha +\beta }}, which corresponds to α {\displaystyle \alpha } \alpha successes and β {\displaystyle \beta } \beta failures, while the mode is α 1 α + β 2 , {\displaystyle {\frac {\alpha -1}{\alpha +\beta -2}},} {\frac {\alpha -1}{\alpha +\beta -2}}, which corresponds to α 1 {\displaystyle \alpha -1} \alpha -1 successes and β 1 {\displaystyle \beta -1} \beta -1 failures. Bayesians generally prefer to use the posterior mean rather than the posterior mode as a point estimate, justified by a quadratic loss function, and the use of α {\displaystyle \alpha } \alpha and β {\displaystyle \beta } \beta is more convenient mathematically, while the use of α 1 {\displaystyle \alpha -1} \alpha -1 and β 1 {\displaystyle \beta -1} \beta -1 has the advantage that a uniform B e t a ( 1 , 1 ) {\displaystyle {\rm {Beta}}(1,1)} {\rm {Beta}}(1,1) prior corresponds to 0 successes and 0 failures. The same issues apply to the Dirichlet distribution.
  4. ^ a b c β is rate or inverse scale. In parameterization of gamma distribution,θ = 1/β and k = α.
  5. ^ This is the posterior predictive distribution of a new data point x ~ {\displaystyle {\tilde {x}}} {\tilde {x}} given the observed data points, with the parameters marginalized out. Variables with primes indicate the posterior values of the parameters. N {\displaystyle {\mathcal {N}}} {\mathcal {N}} and t n {\displaystyle t_{n}} t_{n} refer to the normal distribution and Student's t-distribution, respectively, or to the multivariate normal distribution and multivariate t-distribution in the multivariate cases.
  6. ^ A different conjugate prior for unknown mean and variance, but with a fixed, linear relationship between them, is found in the normal variance-mean mixture, with the generalized inverse Gaussian as conjugate mixing distribution.
  7. ^ CG ( ) {\displaystyle \operatorname {CG} ()} \operatorname {CG} () is a compound gamma distribution; β ( ) {\displaystyle \operatorname {\beta '} ()} \operatorname {\beta '} () here is a generalized beta prime distribution.

References[edit]

  1. ^ Howard Raiffa and Robert Schlaifer. Applied Statistical Decision Theory. Division of Research, Graduate School of Business Administration, Harvard University, 1961.
  2. ^ Jeff Miller et al. Earliest Known Uses of Some of the Words of Mathematics, "conjugate prior distributions". Electronic document, revision of November 13, 2005, retrieved December 2, 2005.
  3. ^ For a catalog, see Gelman, Andrew; Carlin, John B.; Stern, Hal S.; Rubin, Donald B. (2003). Bayesian Data Analysis (2nd ed.). CRC Press. ISBN 1-58488-388-X.
  4. ^ a b c Fink, Daniel (May 1997). "A Compendium of Conjugate Priors" (PDF). CiteSeerX 10.1.1.157.5540. Archived from the original (PDF) on May 29, 2009.
  5. ^ a b c d e f g h i j k l m Murphy, Kevin P. (2007), Conjugate Bayesian analysis of the Gaussian distribution (PDF)
  6. ^ Statistical Machine Learning, by Han Liu and Larry Wasserman, 2014, pg. 314: http://www.stat.cmu.edu/~larry/=sml/Bayes.pdf
Measure
Measure
Related Notes
Get a free MyMarkup account to save this article and view it later on any device.
Create account

End User License Agreement

Summary | 2 Annotations
if the posterior distributions p(θ | x) are in the same probability distribution family as the prior probability distribution p(θ), the prior and posterior are then called conjugate distributions, and the prior is called a conjugate prior for the likelihood function p(x | θ)
2020/08/01 08:44
All members of the exponential family have conjugate priors
2020/08/01 08:46