Software Demos · Interactive demo

On the large-sample limits of Bayesian model-evaluation statistics

Simulate n ~ N(theta0, 1), plot WBIC / DIC / BPIC against sample size on a log scale, and watch them lock onto the almost-sure limit log(2pi)+1 exactly when the tempering schedule satisfies n*beta_n to infinity. Use the buttons beside each control (or the Run the experiments launchers) to auto-play; everything runs client-side.

On the large-sample limits of Bayesian model-evaluation statistics

Bayesian information criteria (DIC, BPIC, WBIC) replace a maximised log-likelihood with a posterior expectation of the log-likelihood. This demo reproduces the paper's two worked examples from the author's own R code. The normal panel is Figure 2: simulate n points from N(θ₀, 1) with variance fixed at 1, and plot WBIC against sample size n on a log scale for the six tempering schedules βn. The geometric panel is the DICn figure: DICn for Geometric(θ₀) data across nine true θ₀ and nine Beta priors. Both approach (or fail to approach) the almost-sure limit −2 E[log p(X | θ₀)]: for the normal model that limit is log(2π) + 1, and WBIC locks onto it exactly when n βn → ∞.

Bayesian model evaluationWBIC / DIC / BPICNormal & geometricPower posteriorsAlmost-sure limits
DIC / BPIC / WBIC convergence to the a.s. limit
dashed / solid lines = a.s. limits · dots = replicate criterion values · guide = the n slider · normal: admissible schedules lock on, 1/n & 1/(n log n) stall · geometric: DICn coloured by true θ₀
WBIC DIC BPIC normal limit log(2π)+1 geometric: colour = true θ₀

Normal panel (paper Figure 2). Fixed-variance model p(x | θ) = (2π)−1/2 exp{−(x−θ)²/2}, prior N(0, 1). The power posterior Πnβn is N(mn, vn) with mn = nβnn/(nβn+1), vn = 1/(nβn+1). The demo plots the paper's exact closed forms: WBICn = log(2π) + (1/n)∑Xi² − 2X̄nmn + mn² + vn (eq. 18); and, from the ordinary posterior N(m₁, v₁) with m₁ = nX̄n/(n+1), DICn = d(m₁) + 2v₁ and BPICn = d(m₁) + v₁ + 2/n (penalty 2p/n, p=1), where d(m₁) = log(2π) + (1/n)∑Xi² − 2X̄nm₁ + m₁². Watanabe's βn=1/log n, along with 1/log log n, 1 and 1/√n, satisfy n→∞, so WBIC converges a.s. to log(2π)+1; βn=1/n (nβn=1) and 1/(n log n) (nβn→0) fail the condition and WBIC stalls above the limit. DIC and BPIC use the ordinary posterior, so they do not depend on βn. Geometric panel (author's simDIC-Geom.r). p(x | θ) = (1−θ)xθ, Beta(α,β) prior, posterior Beta(n+α, nX̄n+β). Using the digamma approximation ψ(a)≈log a−1/(2a), the author's DICn = −2 log(atot/all) + 2 btot/(atot all) − 2X̄n log(btot/all) + 2 atotn/(btot all), with atot=n+α, btot=nX̄n+β, all=atot+btot. Points sweep the nine priors α,β∈{1,10,100} and ten replicates for each of θ₀∈{0.1,…,0.9}; the coloured lines are the per-θ₀ limits −2[((1−θ₀)/θ₀) log(1−θ₀) + log θ₀]. At small n the prior inflates the spread; by 106–107 every replicate collapses onto its limit. (Honest-draft caveats: the normal model is the p=1, known-unit-variance submodel, so its a.s. limit log(2π)+1 is θ₀-independent and the dashed line is fixed. Normal replicates are drawn client-side via sufficient statistics X̄n and a χ²n−1 draw for ∑Xi². In the geometric panel the per-replicate ∑Xi (a negative-binomial sufficient statistic) is generated by a normal approximation rather than by summing n draws, which is why the smallest-n scatter is slightly smoother than the R figure; the DICn formula, priors, θ₀ grid and limits are exact. The paper's general theory covers the full multivariate normal and higher-dimensional models beyond these two univariate examples.)

Run the experiments

Every animation runs live in your browser. Click a button to run that experiment on the demo (it scrolls up and starts); drag any control to take over. Nothing is downloaded, it is generated on the fly.

Switch normal and geometric

Toggle between the two worked examples: the normal-model WBIC (Figure 2) and the geometric-model DIC_n figure, each with its own a.s. limit and its own sample-size range.

Sweep the sample size

Slide n (the guide) across the log-scale x-axis and read the criterion and its gap to the limit at each sample size; admissible schedules and large n shrink the gap to zero.

Shift theta0

In the normal model this moves the data-generating theta0 while the limit log(2pi)+1 stays fixed. In the geometric model it highlights each true theta0 in turn and its own coloured limit line.

Tour the tempering schedules

Normal model: cycle through beta_n = 1/log n, 1/log log n, 1, 1/sqrt(n), 1/n and 1/(n log n). The first four (n*beta_n to infinity) lock WBIC onto log(2pi)+1, while 1/n and 1/(n log n) stall above it.

Overlay DIC and BPIC

Normal model: add the DIC (amber) and BPIC (blue) clouds beside WBIC (teal) to see all three Bayesian criteria collapse onto the same almost-sure limit.

Redraw the replicates

Draw fresh replicate samples at every sample size to see the Monte-Carlo scatter of the criterion around its limiting trend.

The idea in three steps

Frequentist information criteria penalise a maximised log-likelihood; their Bayesian cousins penalise a posterior expectation of the log-likelihood instead. The paper asks what these Bayesian criteria actually converge to as data accumulate.

1 · Simulate

Data and a criterion

Draw n points (normal N(θ₀, 1), or Geometric(θ₀)) and evaluate the criterion in closed form. Repeat over many replicates and sample sizes to trace it as a cloud against n on a log axis.

2 · The limit

An almost-sure target

The paper proves DIC, BPIC and WBIC all converge almost surely to −2 E[log p(X | θ₀)]: log(2π)+1 for the normal model, and −2[((1−θ₀)/θ₀)log(1−θ₀)+log θ₀] for the geometric model.

3 · The condition

Why the schedule matters

WBIC tempers the posterior by βn. Convergence holds precisely when nβn→∞. Pick 1/n or 1/(n log n) and the cloud stalls above the line, showing the condition cannot be dropped.

For the general almost-sure limits of DIC, BPIC and WBIC, the accompanying posterior and generalised-posterior consistency results, and the technical and numerical examples, see On the large-sample limits of some Bayesian model evaluation statistics (Hien Duy Nguyen, Mayetri Gupta, Jacob Westerhout & TrungTin Nguyen, Econometrics and Statistics 2026). The R code is available at github.com/hiendn/BayesianIC.