Inverse Gamma Posterior Calculator

Update variance beliefs with Bayesian evidence and clarity. Compare posterior shape, scale, and intervals instantly. Turn sample dispersion into clear variance decisions for analysts.

Calculator Inputs

Example Data Table

ItemExample Value
Prior shape α₀ 4.0000
Prior scale β₀ 12.0000
Sample size n 18
Sum of squared deviations 45.6000
Posterior shape αₙ 13.0000
Posterior scale βₙ 34.8000
Posterior mean of variance 2.9000
Posterior mode of variance 2.4857

Formula Used

If the prior for variance is inverse gamma, written as σ² ~ IG(α₀, β₀), and the data contribute sample size n with sum of squared deviations S, then the posterior remains inverse gamma.

Posterior shape: αₙ = α₀ + n / 2

Posterior scale: βₙ = β₀ + S / 2

Posterior mean: E[σ² | data] = βₙ / (αₙ − 1), when αₙ > 1

Posterior mode: Mode(σ² | data) = βₙ / (αₙ + 1)

Posterior variance: Var(σ² | data) = βₙ² / ((αₙ − 1)²(αₙ − 2)), when αₙ > 2

Expected precision: E[1 / σ² | data] = αₙ / βₙ

The credible interval is computed by transforming gamma quantiles because 1 / σ² follows a gamma distribution with shape αₙ and rate βₙ.

How to Use This Calculator

  1. Enter your prior inverse gamma shape and scale values.
  2. Add the sample size linked to the variance evidence.
  3. Enter the sum of squared deviations from the assumed mean or fitted model.
  4. Choose a credible level, such as 90, 95, or 99.
  5. Optionally set a variance threshold for decision analysis.
  6. Press Submit to display posterior summaries above the form.
  7. Use the CSV button for spreadsheets and the PDF button for a print-ready export.

Why This Posterior Matters

This calculator helps quantify uncertainty around an unknown variance after combining prior knowledge with observed evidence. It is useful in Bayesian quality control, process variation analysis, experimental design, hierarchical modeling, and any workflow where variance stability matters.

FAQs

1. What does the inverse gamma posterior describe?

It describes the updated probability distribution for an unknown variance after combining prior beliefs with observed data evidence.

2. When should I use this calculator?

Use it when modeling variance in Bayesian normal models, quality studies, simulation workflows, or any variance-focused inference problem.

3. What is the sum of squared deviations input?

It is the total squared distance of observations from an assumed mean or fitted center used to update the variance posterior.

4. Why can the posterior mean be undefined?

The mean exists only when the posterior shape exceeds one. Small evidence or weak priors may leave that condition unmet.

5. Why can the posterior variance be undefined?

The variance exists only when the posterior shape exceeds two. Otherwise the posterior remains too heavy-tailed for a finite variance.

6. What does the threshold probability mean?

It gives the posterior probability that the true variance is at or below your chosen threshold value.

7. Is this calculator limited to normal models?

It is most common for normal-model variance updating, but the same conjugate logic applies wherever the same likelihood structure appears.

Related Calculators

bayesian logistic regressionprior probability calculatorconjugate prior calculatorbayesian cross validationposterior odds ratiobayesian model evidence

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.