Credible Interval — Definition, Formula & Example
A credible interval is a range of values that, given your data and your prior beliefs, has a stated probability (such as 95%) of containing the unknown quantity you are estimating. It is the Bayesian counterpart of a confidence interval.
Let be the posterior distribution of a parameter . A credible interval is any interval whose posterior probability is . Two standard choices exist. The equal-tailed interval puts probability in each tail. The highest posterior density (HPD) interval is the shortest such interval. Because is treated as a random variable, the statement is a direct probability claim about . A confidence interval treats as fixed. Its probability describes how often the interval-building method captures over repeated samples.
Key Formula
Where:
- = The unknown parameter, treated as a random variable
- = Lower and upper endpoints of the credible interval
- = Posterior density of the parameter after seeing the data
- = Credibility level, such as 0.95 for a 95% interval
Worked Example
Problem: A farmer wants the mean weight of this year's pumpkins. Past seasons give a prior belief pounds. She weighs 12 pumpkins and gets a sample mean of 24 pounds. Individual weights have known standard deviation pounds. Find the 95% equal-tailed credible interval for .
Step 1: Combine precisions (precision = 1/variance). The prior precision is . The data precision is . For a normal prior with normal data, the posterior precision is their sum.
Step 2: The posterior mean is a precision-weighted average of the prior mean and the sample mean. The data carry three times the weight of the prior.
Step 3: The posterior is . Cut off 2.5% in each tail using the normal quantile 1.96.
Answer: The 95% credible interval is (21.04, 24.96) pounds. Given the prior and the data, there is a 95% probability that the true mean pumpkin weight lies between 21.04 and 24.96 pounds.
Why It Matters
Credible intervals are the standard output of Bayesian statistics courses and software such as Stan. They let A/B testers and clinical trial teams state directly, "there is a 95% chance the effect lies in this range," which a confidence interval does not justify.
Common Mistakes
Mistake: Treating a credible interval and a confidence interval as interchangeable because their numbers sometimes match.
Correction: With a flat prior and normal data, the endpoints can agree, but the meanings differ. A credible interval is a probability statement about the parameter, given this data and prior. A confidence interval describes the long-run success rate of the method. Change the prior and the credible interval changes. The confidence interval does not.
