power_for_two_proportion_test
Compute statistical power to detect a true difference between two proportions (e.g., conversion rates) with a two-proportion z-test, given sample size per group and proportion estimates.
Instructions
Statistical power to detect a difference between two proportions (e.g. two conversion rates) with n_per_group observations in each group, using a two-proportion z-test. p1 and p2 are interchangeable (only their difference matters) -- e.g. current vs. new conversion rate. Use sample_size_for_two_proportion_test instead to solve for n given a target power. Returns a float in [alpha, 1].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| p1 | Yes | a proportion in [0, 1] | |
| p2 | Yes | a proportion in [0, 1] | |
| alpha | No | significance level for the test (and any confidence interval); default 0.05 | |
| n_per_group | Yes | planned (or actual) observations per group |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |