Contents
Normal-gamma distribution
In probability theory and statistics, the normal-gamma distribution (or Gaussian-gamma distribution) is a bivariate four-parameter family of continuous probability distributions. It is the conjugate prior of a normal distribution with unknown mean and precision.
Definition
For a pair of random variables, (X,T), suppose that the conditional distribution of X given T is given by meaning that the conditional distribution is a normal distribution with mean \mu and precision \lambda T — equivalently, with variance Suppose also that the marginal distribution of T is given by where this means that T has a gamma distribution. Here λ, α and β are parameters of the joint distribution. Then (X,T) has a normal-gamma distribution, and this is denoted by
Properties
Probability density function
The joint probability density function of (X,T) is where the conditional probability for was used.
Marginal distributions
By construction, the marginal distribution of \tau is a gamma distribution, and the conditional distribution of x given \tau is a Gaussian distribution. The marginal distribution of x is a three-parameter non-standardized Student's t-distribution with parameters.
Exponential family
The normal-gamma distribution is a four-parameter exponential family with natural parameters and natural statistics.
Moments of the natural statistics
The following moments can be easily computed using the moment generating function of the sufficient statistic: where is the digamma function,
Scaling
If then for any is distributed as
Posterior distribution of the parameters
Assume that x is distributed according to a normal distribution with unknown mean \mu and precision \tau. and that the prior distribution on \mu and \tau, (\mu,\tau), has a normal-gamma distribution for which the density π satisfies Suppose i.e. the components of are conditionally independent given \mu,\tau and the conditional distribution of each of them given \mu,\tau is normal with expected value \mu and variance 1 / \tau. The posterior distribution of \mu and \tau given this dataset \mathbb X can be analytically determined by Bayes' theorem explicitly, where \mathbf{L} is the likelihood of the parameters given the data. Since the data are i.i.d, the likelihood of the entire dataset is equal to the product of the likelihoods of the individual data samples: This expression can be simplified as follows: where, the mean of the data samples, and , the sample variance. The posterior distribution of the parameters is proportional to the prior times the likelihood. The final exponential term is simplified by completing the square. On inserting this back into the expression above, This final expression is in exactly the same form as a Normal-Gamma distribution, i.e.,
Interpretation of parameters
The interpretation of parameters in terms of pseudo-observations is as follows: As a consequence, if one has a prior mean of \mu_0 from n_\mu samples and a prior precision of \tau_0 from n_\tau samples, the prior distribution over \mu and \tau is and after observing n samples with mean \mu and variance s, the posterior probability is Note that in some programming languages, such as Matlab, the gamma distribution is implemented with the inverse definition of \beta, so the fourth argument of the Normal-Gamma distribution is.
Generating normal-gamma random variates
Generation of random variates is straightforward:
Related distributions
This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.
Wikipedia® is a registered trademark of the
Wikimedia Foundation, Inc.
Bliptext is not
affiliated with or endorsed by Wikipedia or the
Wikimedia Foundation.