A/B tests · ResultsOrder value and revenue in an A/B test

How to compare order value and revenue in an A/B test: Welch's t-test on summary data, a bootstrap on revenue per user, winsorizing outliers, Mann–Whitney as a check and an ARPU breakdown into conversion and order value. For revenue per order, the delta method with a bootstrap check. Python and R code.

Your numbers stay in the browser and are never sent anywhere

01Data02Bootstrap03Revenue04Code05Examples06Questions07Related
01

Data

Input

n, mean and standard deviation per group, from a report or an export. Welch's t-test is used: group variances do not have to match.

A
B
α = 0.05 · two-sided test
B brings in more.
The mean in B is higher by 100 (+3.3 %), likely between +4 and +196; p = 0.042.
Difference of means
+100
CI: +4 … +196B − A
Uplift
+3.3 %
over 3,000 in Auplift
Probability of chance
0.042
Welch's t-testp
t statistic
2.039
df = 3981.5t
Standard error
49.0
SE
Degrees of freedom
3981.5
Welch–Satterthwaitedf
02

Bootstrap

A bootstrap needs per-user values: choose “Raw” or “Ratio”.

03

Revenue breakdown

The breakdown needs per-user values with zeros: choose “Raw”.

04

Check in Python / R

Check in Python / R
from scipy.stats import ttest_ind_from_stats

ttest_ind_from_stats(3100, 1600, 2000, 3000, 1500, 2000, equal_var=False)
05

Examples

06

Frequently asked questions

With summary data, use Welch's t-test: you need the number of buyers, the mean and the standard deviation in each group. For 3,000 ± 1,500 against 3,100 ± 1,600 with 2,000 buyers each, t = 2.04, p = 0.042, and the difference is between 3.9 and 196.1. If you have revenue for every user, add a bootstrap: it does not assume normality.

Updated