AI Glossary / AI and machine learning / Advanced

Normal-gamma distribution

Definition

The normal-gamma distribution is a joint probability distribution for an unknown mean and an unknown positive precision. It combines a gamma distribution for precision with a normal distribution for the mean conditional on that precision, and forms a conjugate prior for normal observations with both quantities unknown.

What it means

Precision is the reciprocal of variance. Higher precision means less observation spread, while lower precision means more spread. The normal-gamma distribution represents uncertainty about that spread together with uncertainty about the center of the observations.
The two unknowns are linked. Conditional on a particular precision, the mean has a normal distribution whose variance depends on that precision. This is not simply an independent normal prior multiplied by an unrelated gamma prior.
The family is useful because normal-data updating has a compact mathematical form. It remains an assumption about the data and parameters, rather than a guarantee that real observations are normal or free of outliers.

How it works

Write the precision as tau. In one common convention, tau follows Gamma(alpha,beta), with beta a rate. Conditional on tau, the mean mu follows Normal(m,1/(kappa tau)). The parameters m, kappa, alpha and beta control location, relative mean certainty and precision uncertainty.
After independent normal observations are collected, update these parameters using sample count, sample mean and within-sample variation. The posterior is another normal-gamma distribution. Integrating out parameter uncertainty gives a Student-t predictive distribution. Always distinguish gamma rate from scale, and the conditional normal variance from a standard deviation. Independent priors for mean and precision generally do not give this same joint conjugate construction.

Three practical examples

  • A calibration study estimates both a measurement process's average offset and its variability.
  • A teaching model updates uncertainty about the average and spread of repeated numerical observations.
  • A Bayesian simulation checks how prior information influences predictions when only a few normally modeled records are available.

Think of it this way

Think of estimating both the center and width of a cloud of points. If the cloud is believed to be very wide, a few points tell you less about its center. The normal-gamma distribution links those uncertainties mathematically. The analogy assumes the observations belong to one suitable normal model; several distinct clusters or severe outliers can require a different approach.

Worked example

Use the shape - rate convention with prior m=10, kappa=2, alpha=3 and beta=4. Observe values 12 and 14. Their sample mean is 13 and their sum of squared deviations from that mean is 2.
The updated kappa is 2+2=4. The updated mean parameter is (2×10+2×13)/4=11.5. The updated alpha is 3+2/2=4. The beta update adds half the within-sample squared deviation and a term for disagreement between prior and sample means: 4+1+[2×2/(2×4)]×(13−10)²=9.5.
Thus the posterior has parameters (11.5,4,4,9.5). This example shows that spread information includes both variation around the sample mean and disagreement with the prior center. The posterior mean precision is 4/9.5; taking its reciprocal would not generally give the posterior mean variance.

Illustrative case study

Fictional case: Birch Calibration collects a small set of repeated readings. An analyst uses a normal-gamma model to combine earlier knowledge about measurement offset with new observations. The software interface requests a gamma scale, but the written specification uses a rate.
The team catches the mismatch by comparing simulated prior measurements with expected operating ranges. It corrects the implementation, checks sensitivity to the prior and examines whether a few unusual readings violate the assumed normal model. The result is a documented statistical analysis, not proof that every measurement is accurate. This case illustrates parameter and assumption checks rather than a real organization's performance.

Common misconceptions and mistakes

Normal-gamma is not a mixture in which observations randomly come from either a normal or a gamma distribution. It is a joint distribution over different parameters. Precision is not variance, and gamma rate is not gamma scale.
Do not assume the mean and precision are independent. Do not report predictive uncertainty using only the fitted observation variance while ignoring uncertainty in the mean. Conjugate formulas can be exact under their assumptions while the assumptions themselves are unsuitable. A small posterior interval does not establish that systematic measurement bias is absent.

Business use

The distribution can support compact Bayesian estimation for repeated numerical measurements when a normal observation model is credible. It is particularly useful as an educational or analytical building block whose updates can be inspected directly.
For operational use, teams should document prior information, units, measurement conditions and whether observations are reasonably independent. Check prior and posterior predictive distributions rather than relying only on updated parameter values. Explain uncertainty about the process average separately from uncertainty about a future individual reading. If operating conditions change, a single fixed mean-and-precision model may need extension or replacement rather than continual updating without review.

People also ask

What does gamma describe here?

The unknown positive precision, under the stated construction.

Is the mean normally distributed without conditioning?

Its marginal distribution is generally Student-t after precision is integrated out.

Is normal-gamma the same as normal-inverse-gamma?

They are related representations using precision versus variance, with matching parameter transformations.

Check your understanding

A model sets tau=4 and kappa=2 in the conditional normal distribution for the mean. What is that distribution's variance?

Answer: It is 1/(kappa tau)=1/8. Its standard deviation is the square root of 1/8, not 1/8 itself.

Related terms

  • Gamma distribution
  • Normal distribution
  • Precision
  • Variance
  • Conjugate prior
  • Posterior predictive distribution
  • normal-inverse-gamma distribution
  • Student-t distribution

Learn next

Learn the distinction between variance and precision, then work through a normal-gamma update by hand. Simulate the precision first and the mean conditionally second to see their dependence. Compare uncertainty in the mean with the wider uncertainty for a new observation.

  • Variance
  • Precision

More in AI and machine learning

  • NOMINATE (scaling method) - NOMINATE is a family of statistical scaling methods that estimates low-dimensional positions from recorded choices, especially legislative roll-call votes.
  • Non-binary condition - A non-binary condition is a test with three or more possible outcomes: not yes-or-no, but a choice among several branches, such as routing by region into...
  • Non-Negative Least Squares - Non-negative least squares (NNLS) fits a linear combination to observed data while requiring every fitted coefficient to be zero or positive.
  • Normal-inverse-Wishart distribution - The normal-inverse-Wishart distribution is a joint probability distribution for a mean vector and a covariance matrix.
  • Normal-Wishart distribution - The normal-Wishart distribution is a joint probability distribution for a mean vector and a precision matrix.
  • Nouvelle AI - Nouvelle AI is a historically influential approach to artificial intelligence that emphasizes situated, embodied interaction and the development of useful...

Sources

Kevin P. Murphy, Conjugate Bayesian analysis of the Gaussian distribution, Sections 3.2–3.5 consulted in the author-hosted full note: https://www.cs.ubc.ca/~murphyk/Papers/bayesGauss.pdf. These passages specify the gamma rate convention, conditional normal variance, posterior updates and Student-t predictive distribution. The MIT-hosted copy was unavailable during review. The original update and quiz were independently recalculated using exact rational arithmetic.

Previous: Normal form Next: Normal-inverse-Wishart distribution

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer