Overview
Some models are easy to simulate but have a likelihood that cannot be written down, so standard Bayesian inference fails at the first step. Approximate Bayesian computation (ABC) replaces the likelihood by simulation. For the Simulation and Monte Carlo course, our team of three applied it to sums of log-normal variables. The main lesson is quantitative: the error comes mostly from the tolerance and the prior, while the choice of sampler mainly changes the cost.
Setup
Each observation is a sum of log-normal variables, whose density has no closed form:
Data are simulated with and , so the truth is known. The prior is and . ABC replaces the posterior by
For a fixed sample and this full-distribution distance, reducing the tolerance forces accepted simulations closer to the observations. The 1-Wasserstein distance compares whole sorted samples rather than a few hand-picked statistics:
Rejection ABC (my part)
The tolerance was calibrated on prior-predictive distances: the 1 % quantile () accepts about one proposal in 100.

- μ is recovered; σ² is overestimated. Both parameters raise the scale of , since , so they partly compensate.
- The prior on σ² matters most. Widening the prior on μ only lowers the acceptance rate. A narrow prior on () puts almost no mass near the truth and accepted only 11 draws.
- The error is approximation, not Monte Carlo noise. Over 20 seeds, the spread of estimates was small compared with their distance from the truth.
Rejection against MCMC-ABC
I implemented both samplers in one JAX module and ran them on the same simulated data for six tolerances, three times each.
Reject-ABC and MCMC-ABC on the same data, across tolerances ε
Mean over 3 repetitions (bands: ± 1 s.d.). n = 1,000 observations, L = 10, one simulated dataset per proposal.
- Reject-ABC
- MCMC-ABC
(a) Runtime, log scale
(b) Posterior mean of σ²
(c) Acceptance rate
Data table
| Method | ε | Runtime (s) | E[μ | y] | E[σ² | y] | Acceptance | ESS / s |
|---|---|---|---|---|---|---|
| MCMC-ABC | 0.5 | 7 | -0.029 | 0.142 | 13.1% | 33.1 |
| MCMC-ABC | 0.7 | 7.2 | -0.045 | 0.174 | 18.4% | 31.4 |
| MCMC-ABC | 1 | 7.5 | -0.075 | 0.227 | 26.4% | 40.9 |
| MCMC-ABC | 1.5 | 6.9 | -0.125 | 0.317 | 38.1% | 46.8 |
| MCMC-ABC | 2 | 6.9 | -0.185 | 0.42 | 48.4% | 62.2 |
| MCMC-ABC | 3 | 7.2 | -0.278 | 0.569 | 62.3% | 55.1 |
| Reject-ABC | 0.5 | 35.8 | -0.031 | 0.148 | 0.2% | 8.4 |
| Reject-ABC | 0.7 | 16.4 | -0.05 | 0.18 | 0.5% | 18.4 |
| Reject-ABC | 1 | 8 | -0.077 | 0.232 | 1.1% | 37.6 |
| Reject-ABC | 1.5 | 3.4 | -0.121 | 0.319 | 2.9% | 89.5 |
| Reject-ABC | 2 | 2.2 | -0.176 | 0.409 | 5.6% | 136.1 |
| Reject-ABC | 3 | 1.2 | -0.262 | 0.551 | 11.7% | 259.8 |
Both samplers give nearly the same posterior means at each , as expected since they target the same . Rejection ABC becomes expensive as shrinks; per effective sample per second, MCMC-ABC wins at small tolerances (33 against 8 at ) and rejection wins at large ones (260 against 55 at ).
Limitations
- One synthetic configuration, with a prior on centred far from the truth; the bias depends on this choice.
- Laptop runtimes with three repetitions: valid for relative comparisons within this benchmark only.
Individual contribution
Team of three. My work, from the repository history: the rejection-ABC notebook (tolerance calibration, prior sensitivity, Monte Carlo error, posterior predictive check); the JAX implementations of both samplers and the effective-sample-size estimator; and the benchmark with its figure. Théo Sannier wrote the main MCMC-ABC study with its convergence diagnostics. Gabriel Meira derived a data-augmentation sampler targeting the exact posterior and used it to measure the bias that ε introduces.
References
- Marjoram, P., Molitor, J., Plagnol, V. and Tavaré, S. (2003). Markov chain Monte Carlo without likelihoods. PNAS 100(26), 15324–15328.
- Bernton, E., Jacob, P. E., Gerber, M. and Robert, C. P. (2019). Approximate Bayesian computation with the Wasserstein distance. JRSS B 81(2), 235–269.