ab-test-calculator
Two-proportion z-test for A/B conversion-rate experiments. Returns each arm's rate and 95% Wald confidence interval, the absolute and relative lift, the z statistic, the two-tailed p-value, and a significance decision at the given alpha (default 0.05).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | Significance threshold (default 0.05). p < alpha declares a statistically significant difference. Two-tailed. | |
| control_visitors | Yes | Number of unique visitors (or sessions, or impressions — whatever the conversion denominator is) in the control arm. Must be a positive integer. | |
| variant_visitors | Yes | Number of unique visitors in the variant arm. Must be a positive integer. | |
| control_conversions | Yes | Number of conversions observed in the control arm. Must be a non-negative integer, and cannot exceed control_visitors. | |
| variant_conversions | Yes | Number of conversions observed in the variant arm. Must be a non-negative integer, and cannot exceed variant_visitors. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | Yes | Significance threshold used (defaults to 0.05). | |
| winner | Yes | Which arm has the higher observed rate ('tie' if exactly equal). This is the observed winner regardless of significance — pair it with `significant` to know whether the result is reliable. | |
| p_value | Yes | Two-tailed p-value from the standard normal distribution. | |
| z_score | Yes | Two-proportion z statistic with pooled standard error. | |
| control_ci | Yes | 95% Wald confidence interval for the control rate. Bounds are clamped to [0, 1]. | |
| variant_ci | Yes | 95% Wald confidence interval for the variant rate. Bounds are clamped to [0, 1]. | |
| significant | Yes | True when p_value < alpha. The standard win/no-win decision. | |
| control_rate | Yes | Control conversion rate as a proportion in [0, 1]. | |
| variant_rate | Yes | Variant conversion rate as a proportion in [0, 1]. | |
| absolute_lift | Yes | Absolute difference in rates: variant_rate − control_rate. Positive means the variant beat the control. | |
| relative_lift | Yes |