TeamTamoad / abtestoo

A/B testing and Multi-armed Bandits Made Easy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

abtestoo

A/B testing and Multi-armed Bandits Made Easy

Frequentist Approach

See interactive notebook frequentist.ipynb / Colab / Kaggle Kernel

Frequentist A/B testing is one of the most used and abused statistical methods in the world. This article starts with a simple problem of comparing two online ads campaigns (or teatments, user interfaces or slot machines). It outlines several useful statistical concepts and how we exploit them to solve our problem. At the end, it acknowledges some common pitfalls we face when doing a frequentist A/B test and proposes some possible solutions to a more robust A/B testing. Readers are encouraged to tinker with the widgets provided in order to explore the impacts of each parameter.

Bayesian Approach

See interactive notebook bayesian.ipynb / Kaggle Kernel

We reuse the simple problem of comparing two online ads campaigns (or teatments, user interfaces or slot machines). We details how Bayesian A/B test is conducted and highlights the differences between it and the frequentist approaches. Readers are encouraged to tinker with the widgets provided in order to explore the impacts of each parameter.

Multi-armed Bandits

See interactive notebook mab.ipynb / Kaggle Kernel

Frequentist and Bayesian A/B tests require you to divide your traffic into arbitrary groups for a period of time, then perform statistical tests based on the results. By definition, this forces us to divert out traffic to suboptimal variations during the test period, resulting in lower overall conversion rates. On the other hand, multi-barmed bandit appraoch (MAB) dynamically adjusts the percentage of traffic shown to each variation according to how they have performed so far during the test, resulting in smaller loss in conversion rates.

Installation

To install for the first time:

git clone https://github.com/cstorm125/abtestoo.git
cd abtestoo
pip install . #normal
pip install -e . #dev

To upgrade:

cd abtestoo
git pull

Dependencies

  • plotnine
  • numpy
  • pandas

Resources

Thanks

  • korakot for notebook conversion to run in Colab

About

A/B testing and Multi-armed Bandits Made Easy

License:Apache License 2.0


Languages

Language:Jupyter Notebook 99.2%Language:Python 0.8%