sequential_two_proportion_test
Determine if two proportions differ in a live experiment, supporting repeated checks after each new observation while preserving statistical validity.
Instructions
Always-valid test of whether two proportions (e.g. two conversion rates in a live A/B test) differ, safe to call again after every new observation in either group -- the sequential-monitoring counterpart to two_proportion_z_test. Use this instead whenever the result will be checked more than once before the experiment ends, which is the normal case for a live dashboard rather than a one-shot analysis. p1 and p2 are interchangeable (only their difference matters). tau does not need to be exact -- reuse the minimum-detectable-effect you'd otherwise plug into sample_size_for_two_proportion_test.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n1 | Yes | observations so far in group 1 | |
| n2 | Yes | observations so far in group 2 | |
| tau | Yes | mixing prior's standard deviation over the true proportion difference -- e.g. 0.02 for 'I mainly care about a 2-point-or-larger swing'. Not a threshold; see the tool's docstring | |
| alpha | No | significance level for the test (and any confidence interval); default 0.05 | |
| successes1 | Yes | successes (e.g. conversions) observed so far in group 1 | |
| successes2 | Yes | successes observed so far in group 2 |