Frequentist (Welch two-sided t-test and the always-valid sequential test)
and Bayesian (Gaussian posterior, chance to win, credible interval) tests,
ported line by line from PostHog products/experiments/stats (MIT,
645e1a78). jStat 1.9.6 (MIT) vendored unmodified for the distributions;
the chi-square upper tail uses the continued fraction so tiny p-values keep
their digits. Reference vectors come from running the unmodified upstream
Python (scipy 1.18.1) on its own and GrowthBook packages/stats (MIT) test
inputs (fixtures/stats/generate_vectors.py); every value matches within
1e-6, and the published 4-5 decimal expectations of both suites hold. The
sample-ratio check warns below p 0.001 (60/40 on a 50/50 plan warns).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>