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].
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"n_per_group": "<n_per_group>",
"p1": "<p1>",
"p2": "<p2>"
},
"name": "power_for_two_proportion_test"
}
}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 |