Analyzing A/B Tests
Estimate a difference and its uncertainty
Enter data for independent arms with complete follow-up. Use all eligible accounts as assigned and a common follow-up window. For cluster assignment, use uncertainty estimates that account for the randomized clusters. The contrast is offer minus control in percentage points. Relative lift divides the contrast by the control rate and is undefined when that rate is zero.
| Arm | Converted | Did not convert | Assigned |
|---|---|---|---|
| Control | |||
| Offer |
Repeat samples from known rates
Keep the assigned counts above and specify the rates that generate each binomial sample. View 300 independently simulated 95% Newcombe intervals.
Wilson gives uncertainty for an individual arm rate. Newcombe’s hybrid-score method combines Wilson limits to estimate uncertainty for the difference. The Wald interval can collapse when observed rates are zero or one. Overlap of the arm intervals cannot decide a test of their difference. Coverage is how often a procedure includes the true difference in repeated samples under stated assumptions, and it can vary with the true rates.
The pooled z-test is a separate test of a zero difference. Its two-sided p-value equals the uncorrected Pearson chi-square p-value for the same 2×2 outcome table with one degree of freedom. A sample ratio mismatch (SRM) instead checks assignment counts against planned allocation. Sparse expected cells can make the z approximation unreliable.
A nonsignificant result can still include a meaningful lift
For confidence intervals and critical values, see Regression confidence intervals and the t-distribution. For several arms or outcomes, use Multiple comparisons across arms.
Inspect spend per account
For a spend outcome, record total spend over the same follow-up window for each randomized account. The example uses synthetic positive spend to show how skew and extreme values affect summaries.
Kernel density estimate
Normal Q–Q plot
The Gaussian kernel can put density below the zero-dollar boundary. The highlighted rightmost point shows the upper tail relative to the Q–Q reference line. A mean answers an average-value decision. A median describes a typical account, and a gap between them alone cannot identify outliers.
Check comparable groups or model residuals. Pooling can hide group differences or create a mixture that departs from normality. A pooled mixture can also be normal, as when its component distributions are identical. Look at sample size and tail shape alongside Shapiro–Wilk and Anderson–Darling, which emphasizes the tails. A large W, a nonsignificant test or a close visual fit cannot establish normality. The usual central limit argument for means requires independent units and finite variance. Extreme values and skew can slow convergence.
Check whom and when the estimate represents
Both activity bands have a five-point offer advantage. Change the composition of the two arms and see whether pooling reverses the sign. These segments were defined before assignment. Randomization balances segment mix in expectation. In a sizable randomized trial, an 80% versus 20% split on a baseline trait is a reason to check assignment, logging and exclusions within each band. See the sample-ratio and balance checks.
If one arm has no observed accounts in a band, the synthetic rates still show what standardization would do. Estimating that rate in a real experiment would require observations or a modeling assumption.
Daily and cumulative lift in a separate trial
This synthetic trial enrolls Monday through Sunday for three weeks. Each daily contrast uses the cohort assigned that day, with a common seven-day outcome window from assignment. The last cohort matures seven days after the end of recruitment.
Daily assignment cohorts and estimates
Novelty or learning could change the effect as exposure accumulates, and weekday demand and traffic can also move the estimate. Whole weeks include every weekday, while traffic determines their weights. Align calendar periods and exposure windows across arms. A changing daily contrast alone cannot distinguish these explanations from noise. See P-Hacking and Replication before choosing a cutoff after looking at a cumulative plot.