Algorithm Search⌘K

Definitioncore

Bayesian information criterion

Also called BIC, Schwarz criterion.

BIC = -2 log L + k log n. It approximates -2 times the log marginal likelihood up to a bounded error, and it picks the true model among a fixed finite list as n grows.

The Bayesian information criterion of a model fitted by maximum likelihood is BIC=−2log⁡L(θ^)+klog⁡n\mathrm{BIC} = -2\log L(\hat\theta) + k\log n, with kk estimated parameters and nn observations. Schwarz (1978) found it as the part of the log marginal likelihood of a model that grows with nn: for regular models, −12BIC-\frac12\mathrm{BIC} differs from the log marginal likelihood by a term that stays bounded, whatever the prior. So the difference of two BIC values approximates −2-2 times the log Bayes factor, and the model with the smallest BIC has approximately the largest posterior probability under equal prior weights. Its penalty per parameter, log⁡n\log n, is larger than the 2 of the Akaike information criterion once n≥8n \ge 8. As a result, BIC picks the true model with probability tending to 1 when the true model is in a fixed finite list, but it predicts less well than AIC when no candidate is true.

Definition

Let y=(y1,…,yn)y = (y_1, \dots, y_n), let a model have densities f(y;θ)f(y; \theta) with θ\theta in an open subset of Rk\mathbb R^k, let θ^\hat\theta be the maximum likelihood estimate and l(θ^)=log⁡f(y;θ^)l(\hat\theta) = \log f(y; \hat\theta). Then

BIC=−2 l(θ^)+klog⁡n.\mathrm{BIC} = -2\,l(\hat\theta) + k\log n.

For a normal linear regression with an n×pn \times p design matrix whose columns include the intercept, coefficient vector bb and residual sum of squares RSS, k=p+1k = p + 1 and BIC=nlog⁡(2π RSS/n)+n+(p+1)log⁡n\mathrm{BIC} = n\log(2\pi\,\mathrm{RSS}/n) + n + (p + 1)\log n. Given a prior density π\pi on θ\theta, the marginal likelihood of the model is m(y)=∫f(y;θ)π(θ) dθm(y) = \int f(y; \theta)\pi(\theta)\,d\theta.

Facts.

  1. The Laplace approximation (sketch with conditions). Assume: the yiy_i are independent and identically distributed; the log-likelihood is three times continuously differentiable, with third derivatives bounded by nCnC on a fixed neighborhood of the true θ0\theta_0; J^=−∇2l(θ^)/n\hat J = -\nabla^2 l(\hat\theta)/n tends in probability to a positive definite matrix JJ; θ^→θ0\hat\theta \to \theta_0 in probability; π\pi is continuous and positive at θ0\theta_0; and for each δ>0\delta > 0 there is ε>0\varepsilon > 0 with sup⁡∣θ−θ^∣>δ[l(θ)−l(θ^)]<−nε\sup_{|\theta - \hat\theta| > \delta}[l(\theta) - l(\hat\theta)] < -n\varepsilon with probability tending to 1. Split m(y)m(y) into the integral over the ball ∣θ−θ^∣≤δ|\theta - \hat\theta| \le \delta and over the rest. Outside the ball the integrand is at most el(θ^)−nεe^{l(\hat\theta) - n\varepsilon} times π\pi, exponentially smaller than the main term. Inside, l(θ)=l(θ^)−n2(θ−θ^)⊤J^(θ−θ^)+Rl(\theta) = l(\hat\theta) - \frac n2(\theta - \hat\theta)^\top\hat J(\theta - \hat\theta) + R with ∣R∣≤nC∣θ−θ^∣3|R| \le nC|\theta - \hat\theta|^3, since the score is 0 at θ^\hat\theta. Put u=n(θ−θ^)u = \sqrt n(\theta - \hat\theta), so dθ=n−k/2dud\theta = n^{-k/2}du and R=O(∣u∣3/n)R = O(|u|^3/\sqrt n). The integral is el(θ^)n−k/2∫e−u⊤J^u/2π(θ^+u/n) du (1+op(1))e^{l(\hat\theta)}n^{-k/2}\int e^{-u^\top\hat Ju/2}\pi(\hat\theta + u/\sqrt n)\,du\,(1 + o_p(1)), and the Gaussian integral is (2π)k/2det⁡(J^)−1/2π(θ0)(1+op(1))(2\pi)^{k/2}\det(\hat J)^{-1/2}\pi(\theta_0)(1 + o_p(1)). Taking logarithms,
log⁡m(y)=l(θ^)−k2log⁡n+log⁡π(θ^)+k2log⁡2π−12log⁡det⁡J^⏟tends to a constant+op(1).\log m(y) = l(\hat\theta) - \frac k2\log n + \underbrace{\log\pi(\hat\theta) + \frac k2\log 2\pi - \frac12\log\det\hat J}_{\text{tends to a constant}} + o_p(1).

So −2log⁡m(y)=BIC+Op(1)-2\log m(y) = \mathrm{BIC} + O_p(1). The Op(1)O_p(1) term depends on the prior and on JJ and does not tend to 0. It is small compared with log⁡n\log n, but it is not small in absolute terms. Kass and Raftery (1995, Section 4) give the full statement.

  1. The unit-information prior. If π\pi is normal with mean at the null value and covariance J−1J^{-1} (the information of one observation), the bounded term of Fact 1 nearly cancels in a nested comparison when the estimate is within O(n−1/2)O(n^{-1/2}) of the null value. Kass and Wasserman (1995) showed that the BIC difference then approximates −2-2 times the log Bayes factor with error O(n−1/2)O(n^{-1/2}). This is the prior under which the BIC difference is more than an Op(1)O_p(1) approximation.
  2. BIC does not overfit in the limit. Take nested models that differ by qq parameters. BIC prefers the larger model exactly when the likelihood ratio statistic 2(l1−l0)2(l_1 - l_0) exceeds qlog⁡nq\log n. If the smaller model is true and the conditions of Wilks' theorem hold, the statistic tends in law to χq2\chi^2_q, a fixed law, while qlog⁡n→∞q\log n \to \infty. So the probability of choosing the larger model tends to 0. Proof: for any fixed cc and all nn with qlog⁡n>cq\log n > c, P(2(l1−l0)>qlog⁡n)≤P(2(l1−l0)>c)→P(χq2>c)P(2(l_1 - l_0) > q\log n) \le P(2(l_1 - l_0) > c) \to P(\chi^2_q > c), and cc can be as large as needed.
  3. BIC is consistent. If the larger model is true with a fixed parameter outside the smaller model, 2(l1−l0)2(l_1 - l_0) grows like nn times a positive Kullback-Leibler gap, which beats qlog⁡nq\log n. With Fact 3, BIC chooses the true model among a fixed finite list with probability tending to 1. The general result needs conditions on the models; Nishii (1984) proved it for normal regression and Haughton (1988) for exponential families. It is cited here, not proved.
  4. The price of consistency. When the true regression is not in any candidate, the log⁡n\log n penalty leaves out terms whose effects are small but not zero, and the prediction error of the chosen model is larger than the best possible rate. Yang (2005) showed that no criterion is both consistent, like BIC, and minimax-rate optimal for prediction, like AIC.
  5. What nn is. The derivation needs the information to grow like nn times a fixed matrix. For dependent data the right nn is not always the number of observations. In a linear mixed model the information about a variance of group effects grows with the number of groups, not with the number of observations. For censored survival data it grows with the number of events. Different programs make different choices.
  6. Singular models. In mixtures, factor models and neural networks, JJ is singular at the true parameter and the Laplace step of Fact 1 fails. The correct penalty there is smaller than k2log⁡n\frac k2\log n; the widely applicable information criterion is designed for that case.

Examples and non-examples

An exact case. Let yiy_i be normal with mean θ\theta and variance 1, and give θ\theta the normal prior with mean 0 and variance τ2=1\tau^2 = 1. Then l(θ)=l(θ^)−n2(θ−yˉ)2l(\theta) = l(\hat\theta) - \frac n2(\theta - \bar y)^2, and the marginal likelihood is exact:

log⁡m(y)−l(θ^)=−12log⁡n−12log⁡(τ2+1n)−yˉ22(τ2+1/n).\log m(y) - l(\hat\theta) = -\frac12\log n - \frac12\log\Bigl(\tau^2 + \frac1n\Bigr) - \frac{\bar y^2}{2(\tau^2 + 1/n)}.

BIC keeps only −12log⁡n-\frac12\log n. With yˉ=0.5\bar y = 0.5 held fixed:

nn log⁡m−l(θ^)\log m - l(\hat\theta) BIC term −12log⁡n-\frac12\log n error
10 -1.3126 -1.1513 -0.161
100 -2.4313 -2.3026 -0.129
1000 -3.5793 -3.4539 -0.125
10610^6 -7.0328 -6.9078 -0.125

The error tends to −12log⁡τ2−yˉ2/(2τ2)=−0.125-\frac12\log\tau^2 - \bar y^2/(2\tau^2) = -0.125, the bounded term of Fact 1. It does not tend to 0. With τ2=100\tau^2 = 100 the limit would be −2.30-2.30, so the prior matters at every nn.

Bayes factor and p-value. Test θ=0\theta = 0 against θ\theta free in the same model, with z=n yˉz = \sqrt n\,\bar y fixed, so yˉ\bar y is within O(n−1/2)O(n^{-1/2}) of 0 and the prior is the unit-information prior of Fact 2. The exact Bayes factor BF10\mathrm{BF}_{10} under the prior above and its BIC approximation exp⁡(z2/2−12log⁡n)\exp(z^2/2 - \frac12\log n) are:

nn zz two-sided p-value exact BF10\mathrm{BF}_{10} BIC BF10\mathrm{BF}_{10}
100 2 0.0455 0.721 0.739
100 3 0.0027 8.57 9.00
10410^4 2 0.0455 0.074 0.074
10410^4 3 0.0027 0.900 0.900

At n=104n = 10^4 a result with p=0.0455p = 0.0455 gives a Bayes factor of about 13 in favor of θ=0\theta = 0. This is the Lindley paradox: with nn large, a fixed p-value is evidence for the null.

The equivalent test level. For one added parameter, BIC adds it when ∣z∣>log⁡n|z| > \sqrt{\log n}:

nn 10 100 1000 10410^4 10610^6
log⁡n\sqrt{\log n} 1.517 2.146 2.628 3.035 3.717
P(χ12>log⁡n)P(\chi^2_1 > \log n) 0.129 0.032 0.0086 0.0024 0.0002

AIC uses the fixed threshold 2=1.414\sqrt 2 = 1.414 with level 0.157 at every nn. At n=100n = 100 BIC adds q=2,3,5q = 2, 3, 5 noise parameters with probabilities 0.0100, 0.0032 and 0.0003.

Non-example: BIC as the log marginal likelihood. −12BIC-\frac12\mathrm{BIC} is not an estimate of log⁡m(y)\log m(y) in absolute terms; the exact case above is off by 0.125 at every nn for one prior and by 2.30 for another. Use BIC to compare models, or use a proper computation of m(y)m(y).

Non-example: comparing a model for yy with a model for log⁡y\log y, or models fitted to different rows. As for AIC, the likelihoods must be of the same data.

References

  1. Gideon Schwarz, Estimating the dimension of a model, Annals of Statistics 6(2), 1978, pp. 461 to 464, The whole paper (the criterion log L - (k/2) log n as the leading terms of the log posterior probability of a model, for exponential families)
  2. Robert E. Kass and Adrian E. Raftery, Bayes factors, Journal of the American Statistical Association 90(430), 1995, pp. 773 to 795, Section 4 (the Laplace approximation of the marginal likelihood and the Schwarz criterion, with its O(1) error)
  3. Robert E. Kass and Larry Wasserman, A reference Bayesian test for nested hypotheses and its relationship to the Schwarz criterion, Journal of the American Statistical Association 90(431), 1995, pp. 928 to 934, The whole paper (with the unit-information prior, the Schwarz criterion approximates the log Bayes factor with error O(n^(-1/2)))
  4. Dominique M. A. Haughton, On the choice of a model to fit data from an exponential family, Annals of Statistics 16(1), 1988, pp. 342 to 355, The whole paper (the expansion of the log posterior probability of a model for exponential families and the consistency of BIC)
  5. Ryuei Nishii, Asymptotic properties of criteria for selection of variables in multiple regression, Annals of Statistics 12(2), 1984, pp. 758 to 765, The whole paper (consistency of criteria whose penalty grows to infinity more slowly than n, such as k log n, in normal regression)
  6. Yuhong Yang, Can the strengths of AIC and BIC be shared? A conflict between model identification and regression estimation, Biometrika 92(4), 2005, pp. 937 to 950, The whole paper (a consistent criterion such as BIC is not minimax-rate optimal for estimating the regression function)
  7. Gerda Claeskens and Nils Lid Hjort, Model Selection and Model Averaging, Cambridge University Press, 2008, Chapter 3 (the derivation of BIC by the Laplace approximation) and Chapter 4 (consistency of BIC and comparison with AIC)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/NMWAP1/text.yaml