Algorithm Search⌘K

Techniqueadvanced

Approximate Bayesian computation

Also called likelihood-free inference.

Bayesian inference without a likelihood: simulate data from parameters drawn from the prior and keep those whose summary statistics are close to the observed ones.

Approximate Bayesian computation (ABC) is a family of methods for Bayesian inference when the likelihood f(x∣θ)f(x \mid \theta) cannot be computed but data can be simulated from the model. It replaces the condition "the simulated data equal the observed data" by "the summaries of the simulated data are within ε\varepsilon of the observed summaries". Every ABC method targets the ε\varepsilon-posterior

πε(θ)∝π(θ) Pθ(ρ(S(Y),S(x))≤ε),\pi_\varepsilon(\theta) \propto \pi(\theta)\, P_\theta\big(\rho(S(Y), S(x)) \le \varepsilon\big),

where SS is a summary map and ρ\rho a distance. Two approximations separate πε\pi_\varepsilon from the true posterior: the summaries, which lose information unless they are sufficient, and the tolerance ε\varepsilon. The methods differ in how they sample πε\pi_\varepsilon (rejection, Markov chains, sequential Monte Carlo) and in how they correct for ε\varepsilon afterwards.

In plain words

Some models are easy to run forward but hard to write down as a formula. A model of how genes spread through a population, or how a disease spreads through a city, can produce fake data for any setting, but no one can compute how likely the real data are. ABC learns the settings anyway. Pick a setting from what you believed beforehand, run the model, and compare a few key numbers of the fake data with those of the real data. Keep the setting when they are close. The kept settings form an approximate answer. The answer depends on which numbers you compare and on how close counts as close. Choosing those two things well is most of the work.

When it applies

  • The model can be simulated, but the likelihood cannot be evaluated. Typical cases are coalescent models in population genetics, stochastic epidemic and ecological models, and agent-based models. If the likelihood can be evaluated, even slowly, likelihood-based methods are more accurate.
  • A proper prior that can be sampled. All ABC samplers start from prior draws.
  • A small set of informative summaries. The cost grows like ε−q\varepsilon^{-q} for qq summaries, so qq must be small; and the answer is only as good as the information in SS.
  • Simulations are affordable. Even good ABC samplers need thousands to millions of simulations.

The template

The holes are the summaries S, the distance ρ, the tolerance ε, the sampler SAMPLER and the correction ADJUST.

  1. ABC(x, π, SIMULATE, S, ρ, ε, SAMPLER, ADJUST)
  2. 1s_obs ← S(x) ▷ hole S: the summaries
  3. 2accept(θ, Y) ← [ρ(S(Y), s_obs) ≤ ε] ▷ holes ρ and ε
  4. 3(θᵢ, sᵢ), i = 1..N ← SAMPLER(π, SIMULATE, accept) ▷ rejection, MCMC or SMC
  5. 4θᵢ ← ADJUST(θᵢ, sᵢ, s_obs) ▷ e.g. regression; the identity if none
  6. 5return θ₁..θ_N ▷ they target π_ε, or an adjusted version

Common choices:

  • SAMPLER = rejection: draw θ\theta from the prior and keep it when it passes L2; the ABC rejection algorithm proves that the kept values are exact draws from πε\pi_\varepsilon.
  • SAMPLER = Markov chain: a Metropolis-Hastings chain on θ\theta whose proposal is accepted only if a fresh simulation passes L2 and the usual prior and proposal ratio test passes. It leaves πε\pi_\varepsilon invariant.
  • SAMPLER = sequential Monte Carlo: ABC-SMC moves a weighted population through falling tolerances.
  • ε as a quantile: simulate a fixed number of pairs and keep the closest fraction, for example 11 percent.
  • ρ scaled: divide each summary by its spread across prior simulations before taking the Euclidean distance.

Why the template targets πε\pi_\varepsilon. The pair (θ,Y)(\theta, Y) drawn from π(θ)f(y∣θ)\pi(\theta)f(y \mid \theta) and kept when YY lies in the set {ρ(S(Y),sobs)≤ε}\{\rho(S(Y), s_{\mathrm{obs}}) \le \varepsilon\} has θ\theta-marginal π(θ)Pθ(ρ≤ε)\pi(\theta)P_\theta(\rho \le \varepsilon), up to a constant. With ε=0\varepsilon = 0, discrete data and a sufficient SS, this is the exact posterior, by the Fisher-Neyman factorization theorem. Both proofs are on the ABC rejection page.

Regression adjustment (Beaumont, Zhang and Balding 2002). Among the kept pairs, fit θi≈α+β(si−sobs)\theta_i \approx \alpha + \beta(s_i - s_{\mathrm{obs}}) by weighted linear regression, with Epanechnikov weights 1−(ρi/ε)21 - (\rho_i/\varepsilon)^2, and replace θi\theta_i by θi−β^(si−sobs)\theta_i - \hat\beta(s_i - s_{\mathrm{obs}}).

Why it works. Suppose that, under the joint law of (θ,S(Y))(\theta, S(Y)), θ=α+β(S−sobs)+e\theta = \alpha + \beta(S - s_{\mathrm{obs}}) + e with ee independent of SS. Then θ∣S=sobs\theta \mid S = s_{\mathrm{obs}} has the law of α+e\alpha + e, and every adjusted value θi−β(si−sobs)=α+ei\theta_i - \beta(s_i - s_{\mathrm{obs}}) = \alpha + e_i has that law, whatever sis_i is. So the tolerance no longer widens the answer. ■\blacksquare When the relation is not linear or the spread of ee depends on SS, the adjustment is only approximately right, which is why it is applied locally, within a moderate ε\varepsilon.

Classic examples

Binomial data with rejection. For 33 successes in 1010 trials, a uniform prior and SS = the number of successes, ABC rejection with ε=0\varepsilon = 0 keeps one proposal in 1111 and gives the exact posterior Beta(4, 8). With ε=1\varepsilon = 1 the variance of the kept values grows from 0.01710.0171 to 0.02140.0214. That page has the full tables.

Sequential ABC on the same model. With 66 successes in 2020 trials, ABC-SMC with tolerances (6,3,1,0)(6, 3, 1, 0) and 500500 particles reaches Beta(7, 15) with 92389238 simulations, against about 1050010500 for rejection. With 3030 successes in 100100 trials the saving is a factor of two.

Population genetics. Tavaré, Balding, Griffiths and Donnelly (1997) inferred the age of the most recent common ancestor of a sample of DNA sequences under the coalescent by keeping the simulated genealogies whose number of segregating sites matched the data. The summary is discrete, so the match was exact. Pritchard and coauthors (1999) used several summaries of Y chromosome data with a tolerance.

Regression adjustment for a normal mean. x1,…,x5∼N(θ,1)x_1, \ldots, x_5 \sim N(\theta, 1) with prior θ∼N(0,32)\theta \sim N(0, 3^2) and S=xˉS = \bar x; the exact posterior has mean 0.64760.6476 and standard deviation 0.44230.4423. With 2000020000 simulations from random.Random(30):

ε\varepsilon kept plain mean plain sd adjusted mean adjusted sd
0.1 501 0.6643 0.4691 0.6574 0.4687
0.5 2545 0.6256 0.5333 0.6449 0.4508
1.0 5033 0.6084 0.7190 0.6436 0.4494
2.0 9626 0.5402 1.1763 0.6468 0.4472

Without adjustment, the standard deviation grows with ε\varepsilon; with it, ε=2\varepsilon = 2 keeps half of all simulations and is still within 1.11.1 percent of the exact value. Here the relation of θ\theta to xˉ\bar x is exactly linear with normal noise, the case in which the adjustment is exact.

Model choice needs more than sufficiency within each model. Robert, Cornuet, Marin and Pillai (2011) give this example. Model P: x1,…,xnx_1, \ldots, x_n are Poisson(λ\lambda) with λ∼\lambda \sim Exp(1). Model G: they are geometric, P(x∣p)=p(1−p)xP(x \mid p) = p(1-p)^x, with p∼p \sim Uniform(0, 1). The sum S=∑ixiS = \sum_i x_i is sufficient within each model. The exact evidences are

mP(x)=S!(n+1)S+1∏ixi!,mG(x)=n! S!(n+S+1)!.m_P(x) = \frac{S!}{(n+1)^{S+1}\prod_i x_i!}, \qquad m_G(x) = \frac{n!\, S!}{(n+S+1)!}.

Within model kk, the law of xx given S=sS = s does not depend on the parameter: it is multinomial, hP(x)=s!/(ns∏ixi!)h_P(x) = s!/(n^s\prod_i x_i!), under P, and uniform over the (n+s−1s)\binom{n+s-1}{s} compositions, hG(x)=1/(n+s−1s)h_G(x) = 1/\binom{n+s-1}{s}, under G. So mk(x)=mkS(s) hk(x)m_k(x) = m_k^S(s)\, h_k(x), and the Bayes factors satisfy

BPG(x)=BPGS(s)⋅hP(x)hG(x).B_{PG}(x) = B_{PG}^S(s)\cdot\frac{h_P(x)}{h_G(x)}.

ABC with SS and ε=0\varepsilon = 0 estimates BSB^S, not BB. For n=3n = 3 and S=3S = 3, BS=189/128=1.477B^S = 189/128 = 1.477 for every data set, while x=(0,0,3)x = (0, 0, 3) has B=35/64=0.547B = 35/64 = 0.547 and x=(1,1,1)x = (1, 1, 1) has B=105/32=3.281B = 105/32 = 3.281; the factors hP/hGh_P/h_G are 10/2710/27 and 20/920/9. With equal prior model probabilities and 200000200000 simulations per run from one random.Random(4) stream, ABC with SS gives P(P∣x)≈0.597P(\text{P} \mid x) \approx 0.597 for (0,0,3)(0, 0, 3) and 0.5980.598 for (1,1,1)(1, 1, 1) (exact for SS: 0.5960.596). ABC on the sorted data, which are sufficient for both the parameter and the model index, gives 0.3480.348 for (0,0,3)(0, 0, 3) (exact: 0.3540.354) and 0.7710.771 for (1,1,1)(1, 1, 1) (exact: 0.7660.766). The Bayes factor from an insufficient summary can point to the wrong model.

Variations

  • Choice of summaries. Semi-automatic ABC fits a regression of θ\theta on many candidate statistics from pilot simulations and uses the fitted values as SS; other methods select summaries by information criteria or learn them with neural networks.
  • Kernel ABC. Replace the indicator of L2 by a smooth kernel weight Kε(ρ)K_\varepsilon(\rho), giving weighted samples.
  • Non-linear adjustment. Replace the linear regression of L4 by a heteroscedastic non-linear regression, such as a neural network.
  • Synthetic likelihood. Assume that S(Y)S(Y) is normal given θ\theta, estimate its mean and covariance from simulations at each θ\theta, and use the normal density as an approximate likelihood inside MCMC.
  • Neural posterior estimation. Train a conditional density estimator on simulated pairs (θ,Y)(\theta, Y) to approximate p(θ∣y)p(\theta \mid y) directly; this is the modern form of likelihood-free inference, and it is checked with simulation-based calibration.
  • Model checking. The same simulations give a posterior predictive check of the summaries, which shows whether the model can reproduce the data at all.

Pitfalls

  • Treating πε\pi_\varepsilon as the posterior. L2 with ε>0\varepsilon > 0 widens the answer: in the table, the standard deviation is 1.181.18 instead of 0.440.44 at ε=2\varepsilon = 2. Report ε\varepsilon, check stability as it falls, or adjust in L4.
  • Insufficient summaries in model choice. Using L1 with summaries sufficient within each model gives the Bayes factor of the summaries, which in the example is 1.481.48 where the truth is 0.550.55. Use summaries whose means differ between the models (Marin, Pillai, Robert and Rousseau 2014), or avoid ABC model choice.
  • Too many summaries. L2 with qq summaries keeps a fraction of order εq\varepsilon^q; with the whole data vector of five normal values, 2×1062 \times 10^6 simulations kept a single value at ε=0.25\varepsilon = 0.25. Reduce the summaries to a few informative ones, one per parameter if possible.
  • Unscaled distance. In L2, a summary measured in thousands drowns a summary measured in fractions. Scale each summary first.
  • Extrapolating the adjustment. L4 with a global linear fit over a huge tolerance relies on linearity far from sobss_{\mathrm{obs}}. Keep the Epanechnikov weights and a moderate ε\varepsilon, and compare the adjusted answer for two tolerances.
  • No check of calibration. ABC answers can be overconfident without any warning. Run the whole pipeline on simulated data sets with known parameters and test the coverage, as in simulation-based calibration.

Code

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

approximate_bayesian_computation.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/approximate-bayesian-computation/. The authors are listed in prov/5HMWEW.jsonl.
"""Approximate Bayesian computation: the template with a rejection sampler and an
optional local linear regression adjustment (Beaumont, Zhang and Balding 2002), plus
the exact Bayes factors of the Poisson versus geometric example of model choice.

abc returns the kept parameters together with their simulated summaries.
Cost: n_sims prior draws and simulations, then O(k) for the k kept pairs.
"""

import math
import random
from fractions import Fraction
from typing import Callable, Sequence


def abc(
    x,
    prior_draw: Callable,
    simulate: Callable,
    summary: Callable,
    distance: Callable,
    eps: float,
    n_sims: int,
    rng: random.Random,
    adjust: bool = False,
) -> list:
    """The template with SAMPLER = rejection and ADJUST = regression (if adjust).

    Returns a list of (theta, s, weight). Without adjustment all weights are 1.
    Precondition: scalar theta and scalar summary when adjust is True.
    """
    s_obs = summary(x)  # @line L1

    def accept(s):  # @line L2
        return distance(s, s_obs) <= eps

    kept = []
    for _ in range(n_sims):  # @line L3
        th = prior_draw(rng)
        s = summary(simulate(th, rng))
        if accept(s):
            kept.append((th, s, 1.0))
    if adjust:
        kept = regression_adjust(kept, s_obs, eps)  # @line L4
    return kept  # @line L5


def regression_adjust(kept: Sequence, s_obs: float, eps: float) -> list:
    """Local linear regression adjustment with Epanechnikov weights.

    Fit theta = a + b (s - s_obs) by weighted least squares over the kept pairs,
    with weights 1 - (|s - s_obs| / eps)^2, and return (theta - b (s - s_obs), s, weight).
    If the summaries do not vary, nothing is changed.
    """
    ws = [max(0.0, 1.0 - ((s - s_obs) / eps) ** 2) if eps > 0 else 1.0 for _, s, _ in kept]
    tot = math.fsum(ws)
    if tot == 0:
        return list(kept)
    sm = math.fsum(w * (s - s_obs) for w, (_, s, _) in zip(ws, kept)) / tot
    tm = math.fsum(w * t for w, (t, _, _) in zip(ws, kept)) / tot
    sxx = math.fsum(w * (s - s_obs - sm) ** 2 for w, (_, s, _) in zip(ws, kept))
    if sxx == 0:
        return list(kept)
    sxy = math.fsum(w * (s - s_obs - sm) * (t - tm) for w, (t, s, _) in zip(ws, kept))
    b = sxy / sxx
    return [(t - b * (s - s_obs), s, w) for w, (t, s, _) in zip(ws, kept)]


def weighted_mean_var(kept: Sequence) -> tuple[float, float]:
    tot = math.fsum(w for _, _, w in kept)
    m = math.fsum(w * t for t, _, w in kept) / tot
    v = math.fsum(w * (t - m) ** 2 for t, _, w in kept) / tot
    return m, v


# Model choice: Poisson(lambda), lambda ~ Exp(1), against Geometric(p) on {0, 1, ...},
# P(x | p) = p (1 - p)^x, p ~ Uniform(0, 1). All values are exact Fractions.

def evidence_poisson(xs: Sequence[int]) -> Fraction:
    """m_P(x) = Gamma(S + 1) / ((n + 1)^(S + 1) prod x_i!)."""
    n, s = len(xs), sum(xs)
    return Fraction(math.factorial(s), (n + 1) ** (s + 1) * math.prod(math.factorial(v) for v in xs))


def evidence_geometric(xs: Sequence[int]) -> Fraction:
    """m_G(x) = B(n + 1, S + 1) = n! S! / (n + S + 1)!."""
    n, s = len(xs), sum(xs)
    return Fraction(math.factorial(n) * math.factorial(s), math.factorial(n + s + 1))


def evidence_poisson_sum(n: int, s: int) -> Fraction:
    """Marginal probability of S = s under the Poisson model: n^s / (n + 1)^(s + 1)."""
    return Fraction(n**s, (n + 1) ** (s + 1))


def evidence_geometric_sum(n: int, s: int) -> Fraction:
    """Marginal probability of S = s under the geometric model: C(n + s - 1, s) B(n + 1, s + 1)."""
    return math.comb(n + s - 1, s) * Fraction(math.factorial(n) * math.factorial(s), math.factorial(n + s + 1))


def abc_model_choice(xs: Sequence[int], summary: Callable, n_sims: int, rng: random.Random) -> tuple[int, int]:
    """ABC rejection over (model, parameter) with equal prior model probabilities and eps = 0.

    Returns (kept under Poisson, kept under geometric). Their ratio estimates the Bayes
    factor of the summary, which equals the true one only if the summary is sufficient
    for the model index as well.
    """
    n = len(xs)
    s_obs = summary(xs)
    counts = [0, 0]
    for _ in range(n_sims):
        m = rng.randrange(2)
        if m == 0:
            lam = rng.expovariate(1.0)
            y = [_poisson(lam, rng) for _ in range(n)]
        else:
            p = rng.random()
            y = [_geometric(p, rng) for _ in range(n)]
        if summary(y) == s_obs:
            counts[m] += 1
    return counts[0], counts[1]


def _poisson(lam: float, rng: random.Random) -> int:
    k, prod, lim = 0, rng.random(), math.exp(-lam)
    while prod > lim:
        k += 1
        prod *= rng.random()
    return k


def _geometric(p: float, rng: random.Random) -> int:
    """Number of failures before the first success."""
    if p >= 1.0:
        return 0
    u = 1.0 - rng.random()
    return int(math.log(u) / math.log1p(-p)) if p > 0 else 10**9
test_approximate_bayesian_computation.py 108 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/approximate-bayesian-computation/. The authors are listed in prov/5HMWEW.jsonl.
"""Tests for the ABC template: exact Bayes factors of the Poisson and geometric models,
ABC model choice with a summary that is or is not sufficient for the model index, and
the regression adjustment."""

import itertools
import math
import random
import unittest
from fractions import Fraction as F

from approximate_bayesian_computation import (
    abc,
    abc_model_choice,
    evidence_geometric,
    evidence_geometric_sum,
    evidence_poisson,
    evidence_poisson_sum,
    regression_adjust,
    weighted_mean_var,
)


class TestExactBayesFactors(unittest.TestCase):
    def test_page_values(self):
        self.assertEqual(evidence_poisson((0, 0, 3)) / evidence_geometric((0, 0, 3)), F(35, 64))
        self.assertEqual(evidence_poisson((1, 1, 1)) / evidence_geometric((1, 1, 1)), F(105, 32))
        self.assertEqual(evidence_poisson_sum(3, 3) / evidence_geometric_sum(3, 3), F(189, 128))

    def test_sum_evidences_add_up_over_data_sets(self):
        # m(S = s) is the sum of m(x) over all x with sum s.
        for n in range(1, 4):
            for s in range(0, 6):
                xs_all = [x for x in itertools.product(range(s + 1), repeat=n) if sum(x) == s]
                self.assertEqual(sum(evidence_poisson(x) for x in xs_all), evidence_poisson_sum(n, s))
                self.assertEqual(sum(evidence_geometric(x) for x in xs_all), evidence_geometric_sum(n, s))

    def test_true_bayes_factor_is_the_summary_one_times_a_data_factor(self):
        # B(x) = B_S(s) * h_P(x) / h_G(x), with h_P(x) = s! / (n^s prod x_i!) the multinomial
        # probability of x given s, and h_G(x) = 1 / C(n + s - 1, s), uniform on compositions.
        rng = random.Random(1)
        for _ in range(500):
            n = rng.randint(1, 6)
            xs = [rng.randint(0, 5) for _ in range(n)]
            s = sum(xs)
            b = evidence_poisson(xs) / evidence_geometric(xs)
            bs = evidence_poisson_sum(n, s) / evidence_geometric_sum(n, s)
            hp = F(math.factorial(s), n**s * math.prod(math.factorial(v) for v in xs))
            hg = F(1, math.comb(n + s - 1, s))
            self.assertEqual(b, bs * hp / hg)


class TestModelChoice(unittest.TestCase):
    def test_sum_is_not_sufficient_for_the_model_but_the_sorted_data_are(self):
        rng = random.Random(4)
        xs = (0, 0, 3)
        target_s = F(189, 128) / (1 + F(189, 128))  # 0.5962 for any data with S = 3
        target = F(35, 64) / (1 + F(35, 64))  # 0.3535, the true posterior probability
        a, b = abc_model_choice(xs, sum, 100000, rng)
        p = a / (a + b)
        self.assertLess(abs(p - float(target_s)), 4 * math.sqrt(p * (1 - p) / (a + b)))
        c, d = abc_model_choice(xs, lambda y: tuple(sorted(y)), 100000, rng)
        q = c / (c + d)
        self.assertLess(abs(q - float(target)), 4 * math.sqrt(q * (1 - q) / (c + d)))
        self.assertGreater(p - q, 0.15)


class TestRegressionAdjustment(unittest.TestCase):
    def test_exact_linear_relation_is_removed(self):
        rng = random.Random(2)
        for _ in range(500):
            a, b = rng.uniform(-5, 5), rng.uniform(-5, 5)
            s_obs = rng.uniform(-1, 1)
            ss = [s_obs + rng.uniform(-1, 1) for _ in range(rng.randint(2, 20))]
            kept = [(a + b * (s - s_obs), s, 1.0) for s in ss]
            out = regression_adjust(kept, s_obs, 1.0)
            for t, _, _ in out:
                self.assertAlmostEqual(t, a, places=8)

    def test_normal_mean_with_a_large_tolerance(self):
        # x_i ~ N(theta, 1), n = 5, theta ~ N(0, 3^2); exact posterior sd 0.4423.
        rng = random.Random(11)
        xs = [round(rng.gauss(1.0, 1.0), 2) for _ in range(5)]
        n, tau = 5, 3.0
        v = 1 / (n + 1 / tau**2)
        m = v * sum(xs)

        def prior_draw(r):
            return r.gauss(0, tau)

        def simulate(t, r):
            return [r.gauss(t, 1) for _ in range(n)]

        def summary(y):
            return sum(y) / len(y)

        plain = abc(xs, prior_draw, simulate, summary, lambda u, w: abs(u - w), 2.0, 20000, random.Random(30))
        adj = abc(xs, prior_draw, simulate, summary, lambda u, w: abs(u - w), 2.0, 20000, random.Random(30), adjust=True)
        _, vp = weighted_mean_var(plain)
        ma, va = weighted_mean_var(adj)
        self.assertGreater(math.sqrt(vp), 1.0)
        self.assertLess(abs(math.sqrt(va) - math.sqrt(v)), 0.03)
        self.assertLess(abs(ma - m), 0.05)


if __name__ == "__main__":
    unittest.main()

Exercises

  1. Show that for nn Bernoulli trials with a uniform prior and SS = the number of successes, ABC rejection with ε=0\varepsilon = 0 keeps a proposal with probability 1/(n+1)1/(n+1), whatever the observed count is. What is the probability for the window ∣S(Y)−s∣≤k|S(Y) - s| \le k when it stays inside {0,…,n}\{0, \ldots, n\}?
  2. Let x1,…,xn∼N(θ,σ2)x_1, \ldots, x_n \sim N(\theta, \sigma^2) with σ\sigma known, a flat prior on θ\theta, S=xˉS = \bar x and ρ(u,v)=∣u−v∣\rho(u, v) = |u - v|. Show that πε\pi_\varepsilon is the law of xˉ+Z+U\bar x + Z + U with Z∼N(0,σ2/n)Z \sim N(0, \sigma^2/n) and U∼U \sim Uniform(−ε,ε)(-\varepsilon, \varepsilon) independent, so its variance is σ2/n+ε2/3\sigma^2/n + \varepsilon^2/3.
  3. In the Poisson against geometric example, derive mP(x)m_P(x), mG(x)m_G(x) and the factors hPh_P and hGh_G. Find a data set with n=3n = 3 and S=3S = 3 for which the true Bayes factor is largest.
  4. Show that for independent and identically distributed data, the sorted data set is sufficient for the model index of any two models, so ABC with ε=0\varepsilon = 0 on sorted discrete data gives the true posterior model probabilities.
  5. Show that the ABC Metropolis-Hastings chain, which accepts a move θ→θ′\theta \to \theta' only if a fresh simulation at θ′\theta' passes L2 and a uniform draw is below π(θ′)q(θ∣θ′)/(π(θ)q(θ′∣θ))\pi(\theta')q(\theta \mid \theta')/(\pi(\theta)q(\theta' \mid \theta)), satisfies detailed balance with respect to the joint law πε(θ,y)∝π(θ)f(y∣θ)1{ρ(S(y),sobs)≤ε}\pi_\varepsilon(\theta, y) \propto \pi(\theta)f(y \mid \theta)\mathbf{1}\{\rho(S(y), s_{\mathrm{obs}}) \le \varepsilon\}.

References

  1. Donald B. Rubin, Bayesianly justifiable and relevant frequency calculations for the applied statistician, Annals of Statistics 12(4), 1984, pages 1151 to 1172: drawing from the prior, simulating, and keeping matches as a description of Bayes' rule (general locator)
  2. Beaumont, Zhang and Balding 2002, pages 2025 to 2035: the name, the tolerance, and local linear regression adjustment with Epanechnikov weights (general locator)
  3. Christian P. Robert, Jean-Marie Cornuet, Jean-Michel Marin and Natesh S. Pillai, Lack of confidence in approximate Bayesian computation model choice, Proceedings of the National Academy of Sciences 108(37), 2011, pages 15112 to 15117: summaries sufficient within each model need not be sufficient for model choice; the Poisson against geometric example (general locator)
  4. Marin, Pillai, Robert and Rousseau 2014, pages 833 to 859: conditions on the summaries under which ABC model choice is consistent (general locator)
  5. Simon Tavaré, David J. Balding, Robert C. Griffiths and Peter Donnelly, Inferring coalescence times from DNA sequence data, Genetics 145(2), 1997, pages 505 to 518 (general locator)

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)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples