Use this page when a finite-dimensional integral may benefit from structured space filling and you need to distinguish a deterministic approximation from a randomized uncertainty statement.
The big picture¶
Ordinary Monte Carlo uses independent points. Quasi-Monte Carlo (QMC) instead chooses points that cover systematically. Randomized QMC (RQMC) randomizes that structured design without discarding it.
These are different inferential objects. A deterministic prefix gives a reproducible approximation but no sampling uncertainty. Replicated scrambles give randomized evidence. Repeatedly inspecting that evidence requires a sequentially valid policy.
The estimator¶
Let and
For a power-of-two prefix , one Sobol estimate is
The first Sobol point is retained; Jaxstro does not silently skip the origin.
A finite hyperrectangle is handled by the shared affine map, signed
orientation, measure density, and Jacobian owners in jaxstro.quad.
Three randomizations, three honest names¶
DigitalShift applies one coordinatewise bitwise shift. It is inexpensive and
reproducible, but it is not Owen scrambling.
LinearMatrixScramble applies a random unit lower-triangular matrix over
and then an independently keyed digital shift. This is
the default for randomized integration.
OwenScramble applies a nested bit permutation. For coordinate , bit ,
and already-scrambled prefix , its permutation depends on the complete
triple . That prefix dependence is the defining distinction from an
LMS construction.
Fixed-look uncertainty¶
For independent scrambles, let be the estimate from replicate . Jaxstro computes
One predeclared inspection uses the half-width
ScrambledSobol requires and returns
ErrorKind.CONFIDENCE_INTERVAL_HALF_WIDTH. The Student- quantile is stopped
with respect to automatic differentiation and is evaluated with
cancellation-resistant center and survival-probability formulas.
import jax
import jax.numpy as jnp
from jaxstro import quad
result = quad.integrate(
lambda x: jnp.exp(-jnp.sum(x, axis=-1)),
quad.Hyperrectangle(jnp.zeros(8), jnp.ones(8)),
method=quad.ScrambledSobol(level=8, replicates=16),
key=jax.random.key(19),
epsabs=1.0e-3,
epsrel=0.0,
max_evaluations=16 * 2**8,
gradient="stop",
)The key is explicit, and replicate uses jax.random.fold_in(key, r).
Increasing replicate capacity therefore does not rewrite existing replicate
identities.
Sequential uncertainty¶
A fixed-look interval must not be reinterpreted after repeated convergence
checks. AdaptiveScrambledSobol instead requires a complete static schedule
with monotone strict progress and final growth in both and . Existing replicates reuse their Sobol prefix, and new replicates receive stable folded keys.
At inspection , the overall error probability is allocated as
Given certified replicate-estimate bounds , the empirical-Bernstein half-width is
The union bound preserves the overall confidence claim even though the reused prefixes make inspections dependent.
method = quad.AdaptiveScrambledSobol(
schedule=((6, 8), (7, 16), (8, 32)),
estimate_bounds=(0.0, 1.0),
)Direct estimate_bounds apply to replicate estimates and may certify a signed
finite measure. integrand_bounds are derived automatically only for
LebesgueMeasure, including reversed orientation. Weighted-measure derivation
is rejected in Phase B3 because a pointwise integrand bound does not determine
a weighted integral bound without certified measure information.
Astrophysical uses¶
Structured randomness is useful when a calculation contains a modest number of continuously varying nuisance coordinates:
marginalizing calibration, extinction, or distance uncertainties in a forward model;
integrating a smooth selection function over latent population variables;
propagating a bounded set of halo, orbital, or stellar-population uncertainties into one scalar observable;
evaluating expected survey yield over a finite design hyperrectangle; and
computing evidence-like normalization integrals when the transform and integrand are sufficiently smooth.
The effective dimension matters more than the nominal column count. A 16-dimensional integrand dominated by two coordinates can be a better QMC target than a discontinuous two-dimensional mask.
What JAX differentiates¶
Methods and schedules are static PyTree metadata. Domains and keys may be
dynamic under jax.jit; randomized methods support jax.vmap over keys and
domains. Float32 coordinates retain at most 24 digital bits, and float64
coordinates retain at most 53. Float64 and integer operations above 32
bits fail eagerly unless jax_enable_x64=True.
All B3 methods require gradient="stop". Replay derivatives, multidimensional
quantity certification, and final backend/memory optimization remain Phase B4
work.
Where the claim stops¶
The frozen campaign contains exactly four predeclared records and primary point-integrand evaluations. The two fixed-look cases covered and truths, both inside the exact 99% binomial acceptance band for nominal 95% coverage. Sequential coverage is required not to fall below the same lower validity bound; excess coverage is reported as conservatism rather than misclassified as invalidity.
Connected foundations and methods¶
Review Probability and distributions for probability measures and Sensitivity, conditioning, and identifiability for conditioning. Connect explicit keys in Random computation, fixed quadrature in Fixed and weighted quadrature, sparse grids in Sparse-grid quadrature, and the complete public surface in Jaxstro quadrature.