Calibration of credible sets
Data drawn from a model come with the truth that generated them, and that truth is a draw from the posterior; so a set holding posterior probability α contains the truth with probability α over such data, and an approximate posterior is checked by how often its sets do, against a tolerance that keeps sampling error apart from the approximation's own.
An estimator reports an estimate and how sure it is. The estimate can be compared with the truth when the truth is known. Whether it is as sure as it should be is harder to check, since a single estimate with a single truth says almost nothing about a covariance. A model built forward makes the check possible, because it can be run forward: draw everything, hide part of the draw, estimate the hidden part from the rest, and ask how often the estimator’s own statement of its uncertainty turns out true. This note says why that works, and how to build the check so that it tests what it is meant to.
The truth is a draw from the posterior#
Draw the quantities and the measurements together from the model’s joint law, and give an estimator the measurements alone. The estimator’s target is the posterior, the conditional law of given . The hidden is, by the definition of that conditional law, a draw from it. So a credible set, a set that holds a stated posterior probability , contains the truth with probability , over data sets drawn from the model.
Let be drawn from a joint law whose conditional law of given is the kernel , and for each let be a set with , chosen so that is measurable. Then . If , , are independent draws from the joint law, the indicators are independent Bernoulli variables of mean .
Conditioning on , almost surely, by the definition of the kernel as a regular conditional law and the measurability of the set, and taking the expectation gives . Independent pairs give independent indicators, each of mean by the first part.
∎Nothing in the statement is about any method. It holds of the exact posterior, and of nothing else in general: an approximate posterior whose credible sets contain the truth too seldom is over-confident, and too often, under-confident. The frequency is a property that a posterior has and an approximation is measured by.
The credible sets of a Gaussian approximation#
A Laplace approximation at a mode gives each quantity , of dimension , a marginal that is a normal in the chart at , with a whitening that elimination computes without forming a covariance. Its credible set of level is an ellipsoid in that chart, and the truth lies in it when its normalized error
is at most , the -quantile of the chi-squared law with as many degrees of freedom as has dimensions. Under the approximation, has exactly that law, so the ellipsoid holds probability .
The ellipsoid holds the exact posterior’s probability and not , with the approximation’s error on that set. Over data sets it therefore contains the truth with probability , by Proposition 1 applied to the exact posterior. A check estimates that probability and compares it with .
The error to expect#
Where the approximation is not exact, is not zero, and a check against alone would pass or fail according to how many data sets it is given: with enough of them, any error at all is resolved. So the check needs to know how large an error is no fault. Its order is known. On a curved quantity the approximation’s precision omits curvature of a relative size of the order of the noise’s variance in the curved coordinates. Write for that order, with the largest standard deviation of a curved coordinate among the posterior’s marginals. If the exact posterior’s covariance is the approximation’s times , then is times a chi-squared variable, and the ellipsoid holds
with the chi-squared density. At the slope is for and for , so the expected error is within for a quantity of six dimensions and for one of three. An error that is not a multiple of the covariance lies between the extremes of its eigenvalues, and is bounded the same way.
The same formula says what a mistake looks like. A covariance off by a tenth moves the coverage of a six-dimensional ellipsoid by about , which is far more than a correct approximation’s error at small .
The check#
Take , and independent data sets, each with quantities of dimension to estimate. In data set , let be the fraction of its quantities whose normalized error is at most . By Proposition 1 and linearity of expectation, , with the mean error over the quantities, whether or not the quantities’ errors are dependent within a data set, which they are. The data sets are independent, so the mean of the has a standard error estimated by , with and the sample standard deviation of the . The floor is the resolution of one , and keeps the tolerance from collapsing when every data set happens to give the same fraction. The check passes when
The two parts of the tolerance answer different things. The first is sampling: with , enough for the normal approximation to the mean of independent data sets, an approximation that erred by exactly would fail with probability about . The second is the approximation’s own expected error, which is known only to its order. So that the verdict does not hinge on that order’s constant, the scales of the scenario are chosen to make the second part small against the first: rad gives and , a tenth or less of the sampling part when the fractions spread by a few hundredths, as fractions over a hundred correlated quantities do.
The check then tests the method and not the approximation. It cannot resolve a calibration error below its tolerance, and says nothing about one. It does resolve the errors a mistake would make. The tolerance is fixed by these figures before the data are drawn, and never tuned to the result.