Skip to main content

babbab

The two purposes of babbab are:

  1. To be the simplest tool for Data Analysts/Statisticians to analyze A/B tests.
  2. To return the simplest results for Stakeholders/Non-Statisticians to understand.

babbab an acronym of BAyesian Beta-Binomial A/B testing (BaBBAB), but it's spelled in lowercase (babbab) because it doesn't like shouting.

Install

This should work in vanilla Python +3.8.

pip install babbab

A quick example

Lets say we sell subscriptions to a paper magazine and want to conduct a simple A/B test.

We want to change the background color of our app from grey to green because we want to know if changing the background color will increase sales. To do so, we assign 50% of our users to the new app design with a green background (The Variant Group), while other 50% stay in the old grey design (the Control group). We managed to pull these 4 numbers out our tracking into Python:

control_sold_subscriptions = 200 
control_users = 40316
variant_sold_subscriptions = 250
variant_users = 40567

Because babbab is awesome you can just run:

import babbab as bab

plot, statement, trace = bab.quick_analysis(control_sold_subscriptions, 
                                            control_users, 
                                            variant_sold_subscriptions, 
                                            variant_users)

And get everything you need.

  1. In plot you will find a matplotlib figure. You can change the title and labels in the quick_analysis function.
  2. In statement, you will get a string that is intended to be interpreted verbatim by Non-Statisticians.
  3. In trace, you will get an arviz InferenceData object, in case you want to explore the run further.

In the signature of quick_analysis you can configure the statistics and the aesthetics of most of this.

Motivation

A/B tests (or controlled experiments) are an increasingly popular way of incrementally improving websites, desktop, and mobile apps. At Multilayer we have analyzed probably hundreds, with a miriad of different tools and statistical methodologies.

In our experience, when companies A/B tests the biggest problems they encounter are around interpreting the results and acting appropiately on them. There are plenty of statistical libraries out there that do A/B testing right (babbab actually uses PyMC in the background). However, sharing statistics (like p-values) with non-statisticians can lead to confusion and misuse of results.

What babbab tries to cover is the "last mile" of the A/B test analysis: Interpreting and communicating the results for them to be actionable.

In other words - Why babbab is awesome

  • Get 4 numbers in, get a statistically valid statement that you can repeat to your manager verbatim, and a plot you can understand.
  • Get 4 numbers in + some labels, and you will get the above and a plot you can share and a statement you can C&P in the company chat.
  • Add a bit more work, and you have your own custom built AB testing dashboard/tool.

Stop worrying about your peers and yourself misinterpreting stats.

TODO list

Still a lot to basic docs to do.

  • Add example results (plot, statement) to the README
  • Add example with labels to README
  • Add docstrings

Maybe?

  • Sphinx or RTD Documentation

Metadata

Release files for babbab 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for babbab 0.3.3
File Size Uploaded
babbab-0.3.3.tar.gz 589.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for babbab 0.3.3
File Interpreter ABI Platform
babbab-0.3.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 594.9 kB

Release files / babbab-0.3.3.tar.gz

Download URL babbab-0.3.3.tar.gz
Size 589.2 kB
Tags Source
SHA-256 checksum
How to use checksums
21ebe2c05223d4547eea01dd1faf6d8e58f8aa2d240da4e8dc8177eac97b056d
BLAKE2b-256 checksum
How to use checksums
7478248c96a50d7bc3de0df5d8d41b76d664c904a455b36095eb7f93e1d32eab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / babbab-0.3.3-py2.py3-none-any.whl

Download URL babbab-0.3.3-py2.py3-none-any.whl
Size 5.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6b2b77ebebfd51c9dcb4fb21d48ac9d592b88fd436fcfff7c49f3befc99c70a5
BLAKE2b-256 checksum
How to use checksums
145f28c0759f38a00e0a42dae8a0c7eed512b3a3ad7b5990c60de3ab1753ebe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page