Skip to contents

Integrates the conditional TV bound over \(\alpha \sim \text{Gamma}(a, b)\) to obtain the marginal error bound.

Usage

expected_tv_bound(J, a, b, cJ = log(J), M = .QUAD_NODES_DEFAULT)

Arguments

J

Integer; sample size.

a, b

Numeric; Gamma hyperparameters.

cJ

Numeric; scaling constant (default: log(J)).

M

Integer; number of quadrature nodes.

Value

Numeric; \(E[d_{TV} \text{ bound} | a, b]\).

Details

From Corollary 1 of RN-05, the TV error between the exact prior predictive \(p(S_J | a, b)\) and the A1 shifted NegBin proxy is bounded by: $$d_{TV}(P^{\text{exact}}, Q^{A1}) \le E_{\alpha \sim \Gamma(a,b)}[B_{\text{Pois}} + B_{\text{lin}}]$$

This follows from the mixture contraction property of TV distance.

Examples

# Marginal TV bound for J=100, Gamma(1, 1)
expected_tv_bound(J = 100, a = 1, b = 1)
#> [1] 0.2465068