Problem
An A/B test has three stages: design (how many objects, how long), splitting into groups, and the readout. MTS Big Data found no full-fledged open-source tool covering all stages. Without a design step, a team can run a test that cannot detect the effect the business needs, wasting time and money.
Example from the article: MTS tests an ML system that recommends services to companies instead of manual selection by staff. The business will switch only for a gain of at least 180 rubles per company per month (about 15% relative). The test lasts one month, and channels hold at most 15,000 companies per group.
Solution in brief
Ambrosia is an open-source Python library with one class per stage: Designer (size, power or minimum detectable effect), Splitter (hash, stratified or nearest-neighbor groups) and Tester (effect, interval, p-value). Each has one run() method and accepts pandas or PySpark data. Designing on a parameter grid gives the business a trade-off table, so the threshold can be renegotiated before launch.
Questions this case answers
- How to choose the sample size and agree a decision threshold with the business before running a controlled experiment on a skewed monetary metric
- How to assign units to experiment groups reproducibly from a fixed pool without storing the assignment
- How to find the group size an A/B test needs before launch, and the smallest effect a fixed group size can detect?
- How to split customers into control and test groups deterministically, without storing the group table?
Tools and methods
- Ambrosia —
Designer,Splitter,Tester, plus CUPED, MultiCUPED andMLVarianceReducer. - Sample-size formula and empirical design — group size from historical mean and variance, or from simulated effects.
- Hash split with salt — deterministic group assignment from object ids.
- t-test, Mann-Whitney test, bootstrap — criteria for the readout.
Google or a one-time email code. No password.