9.4 Antithetic and quasi-random draws
Posterior latent draws support three methods: independent pseudo-random normals, antithetic pairs and a randomized Halton sequence exposed through compatible sobol_normal/halton_normal naming.
Independent normals
Draw index i uses a stream labelled ...|drawi, consumed subject by subject and dimension by dimension. Because the stream belongs to the draw rather than a worker, scheduling does not change it.
Antithetic pairs
Even draw 2k and odd draw 2k+1 use the same even-labelled stream. The odd vector is the exact negative of the even vector. Unit tests verify pair sums below (10^{-15}). Antithetic sampling can reduce variance for suitably monotone statistics but is not guaranteed to improve every estimator.
Randomized quasi-random normals
Dimension k uses the Van der Corput radical inverse in one of 16 small-prime bases. A per-subject/per-dimension labelled uniform shift applies a Cranley–Patterson rotation; the fractional result is mapped through the inverse normal CDF. Probabilities are clipped to [1e-12,1-1e-12] before inversion.
Dimensions beyond 16 reuse prime bases, so high-dimensional behavior requires targeted testing. The public alias sobol_normal currently selects this Halton-based implementation; documentation must name the actual algorithm.
Inverse normal
The inverse CDF uses Acklam's rational approximation followed by one Halley refinement against an erfc normal CDF. The core test maps probabilities from (10^{-6}) through (1-10^{-6}) forward again within (10^{-12}).
Common mistakes
- Assuming an option name proves the underlying low-discrepancy sequence.
- Treating antithetic draws as twice as many independent samples.
- Ignoring dimension reuse in high-dimensional quasi-random tests.
Checklist
- Record the selected draw method and implementation version.
- Test pair symmetry and inverse-CDF round trips.
- Benchmark estimator variance, not only draw appearance.
Further reading
See stream derivation, distribution functions and the future posterior-engine chapter.