Credible intervals vs confidence intervals

The question
Sort the claims before opening the calculations.
- 1 SeeSort claims into two reports.
- 2 TryCompare intervals across repeated samples.
- 3 ProveBuild the equal-tail probability argument.
- 4 ApplyCalculate endpoints and interpret probabilities.
Before you start · 3 quick checks on conditioning, density and standard error
Two ideas before you start
2 ideasProbability is area, not height
A normal density with a selectable band around its center.
Change the band and watch the shaded area. A curve’s height at a point is different from the probability between two endpoints.
Exact definition
A continuous random variable with density f has probability \(\int_a^b f(t)\,dt\) in the interval [a, b]. Its cumulative distribution function, or CDF, is \(F(b)=P(X\le b)\). Subtracting CDF values gives the interval probability. A single point has zero probability under a continuous density.
A measurement can vary around one value
Sampling densities centered at the selected fixed parameter.
The curve describes possible new measurements. Choosing a different center changes the population being sampled.
Exact definition
Write θ for an unknown real parameter and Y for a measurement or sample mean. Our sampling model is \(Y\mid\theta\sim N(\theta,s^2)\), where the known standard error s is positive. The second argument of N is a variance. Lowercase y denotes the value actually observed. The density is considered as a function of Y for sampling, and as a function of θ for likelihood.
Refresher: the model and the notation
For a fixed number n of independent normal observations with common known standard deviation σ, their mean follows the model above with \(s=\sigma/\sqrt n\). A single calibrated measurement also fits it. Here s is supplied, never estimated from these data. Repetitions use fresh independent measurements of the same parameter, with the sampling rule fixed in advance.
A Bayesian analysis additionally chooses a proper prior \(\theta\sim N(m_0,\tau^2)\) before using the observation, with τ positive. This distribution represents uncertainty about the parameter. It does not say the physical parameter changes when you take another measurement. The posterior update lesson explains multiplying a prior by a likelihood. The base rates lesson explains why the quantity after the conditioning bar matters.
All examples below are hypothetical. The normal model permits every real parameter value. A constrained proportion, an unknown measurement variance, or a changing process would require a different model. Nothing here uses a normal approximation justified only by a large sample.
Which report can make this claim?
- Drag each statement to a report, or use the two buttons on its card. Your assignments stay editable until you check.
- Assign every card, then press Check sorting. The page grades each assignment and opens both calculations.
- Start over clears every assignment and hides the calculations.
The drop targets accept dragged cards. To sort with a keyboard or touch, use the labeled buttons on each card.
One observed data set
A credible interval contains the specified posterior probability under the stated prior and likelihood, conditional on the observation. Its endpoints are fixed after observing y, but the posterior still describes uncertainty over θ. An equal-tail interval leaves the same posterior probability on each side.
A confidence interval comes from a rule whose coverage is evaluated by repeating the sampling process at a fixed θ. After you observe y, this interval either contains that fixed θ or misses it. The confidence level alone does not supply a conditional probability for θ inside those observed bounds. See the confidence intervals lesson for the sampling construction.
Calculate the two intervals
Multiplying the normal prior and likelihood and completing the square gives posterior variance v and mean m:
\[\begin{aligned}v&=(\tau^{-2}+s^{-2})^{-1},\\m&=v(m_0/\tau^2+y/s^2).\end{aligned}\]The posterior is \(N(m,v)\). In this normal family, v depends on the two input variances, not the observed value. The posterior mean is a weighted average of the prior mean and y.
For tail probability α/2, put \(q=\Phi^{-1}(1-\alpha/2)\), where Φ is the standard normal CDF. The equal-tail credible interval is \(m\pm q\sqrt v\). The confidence rule is \(y\pm qs\). Their centers and widths may differ even at the same nominal level.
Repeat the measurement
- Predict the credible interval’s coverage at the stated fixed teaching value.
- Then vary the teaching value and prior spread. Check each goal using the analytical coverage, not the finite batch count.
Each row below uses a fresh independent Y from the same normal sampling model. Both intervals use that same Y. Every Bayesian analysis starts again from the stated prior: these are separate experiments, not sequential updates. Moving the teaching value changes the population; moving the prior spread changes the analysis. The prior mean and measurement error stay fixed.
Why the coverage can differ
With prior mean zero, write \(w=\tau^2/(\tau^2+s^2)\). Then \(m(Y)=wY\), \(v=ws^2\), and the credible interval’s half-width is \(h=q s\sqrt w\). At a fixed θ, its center has mean wθ and standard deviation ws. It is pulled toward the prior mean.
\[\begin{aligned}a&=\frac{(1-w)\theta-h}{ws},\\b&=\frac{(1-w)\theta+h}{ws},\\\text{coverage}&=\Phi(b)-\Phi(a).\end{aligned}\]This is an exact probability under the sampling model. Far from the prior center, shrinkage can move many intervals away from the fixed truth. Near the prior center, the same rule can cover more often than its nominal level. A posterior probability remains valid within the assumed Bayesian model; it does not promise the nominal sampling coverage at every fixed parameter.
A different experiment draws a new θ from the prior before each new Y. Averaging over that joint model, a rule with the same posterior mass for every y has that mass as its overall coverage, by iterated expectation. That average over parameter values is different from holding one θ fixed. This explorer holds θ fixed within each batch.
When the numbers agree
As the prior SD τ grows with the prior mean held fixed, the weight \(w=\tau^2/(\tau^2+s^2)\) on the observation tends to one, so the credible interval tends to the confidence interval \(y\pm qs\) and its fixed-θ coverage tends to \(1-\alpha\). With a flat prior, a constant density on the whole real line that is not a probability distribution and is used nowhere else on this page, the posterior is exactly \(N(y,s^2)\) and the two intervals have identical endpoints. That agreement is specific to this model: a normal measurement of a location parameter with known SE, analyzed with that flat prior. It does not make the two statements the same. The credible statement is a posterior probability given y under the prior; the confidence statement describes how often the procedure covers a fixed θ. In other models, for example a proportion estimated from a few successes or a parameter that must be positive, the usual confidence interval and a credible interval under a standard prior generally have different endpoints, so a numerical match cannot be assumed.
Where does the interval probability come from?
Assume \(Y\mid\theta\sim N(\theta,s^2)\), known \(s\gt0\), a proper \(N(m_0,\tau^2)\) prior with \(\tau\gt0\), and \(0\lt\alpha\lt1/2\). For an observed y, let F be the posterior CDF. Its normal density is positive everywhere, so F is continuous and strictly increasing.
Define \(L=F^{-1}(\alpha/2)\) and \(U=F^{-1}(1-\alpha/2)\). The interval [L, U] has posterior mass \(1-\alpha\). Separately, define \(q=\Phi^{-1}(1-\alpha/2)\) and the confidence rule \(C(Y)=[Y-qs,Y+qs]\). For every fixed real θ, this rule covers θ with sampling probability \(1-\alpha\). These probabilities condition on different things.
Choose the equations that justify these two claims. The endpoints in the first steps are posterior quantiles; the final step uses a sampling pivot. Neither calculation can replace the other merely because the percentage is the same.
Equal-tail is a rule for choosing an interval, not part of the definition of credibility. Other intervals can contain the same posterior mass. For a normal posterior, symmetry and a single peak make the equal-tail interval also the shortest interval of that mass. For a skewed posterior the equal-tail interval need not be shortest; for multiple peaks a highest-density set can even have separate pieces.
The theorem uses a continuous, strictly increasing CDF. With discrete parameters, exact equal-tail probabilities may be unavailable. One often reports a set with at least the target mass and states the convention. Do not silently transfer the exact quantile equations to such a model.
Compute, then name the probability
Each task states its sampling and prior assumptions. Enter one decimal without units or a percent sign. Keep unrounded values until the last step; each answer accepts the stated absolute error.
Further reading
- A. Gelman et al., Bayesian Data Analysis, chapter 2, “Single-parameter models.”
- G. Casella and R. L. Berger, Statistical Inference, chapter 9, “Interval Estimation.”