Skip to main content

ABOBA

AB tests library with simplicity in mind

📚 Documentation

✨ Features

  • Simple & Intuitive API - Easy to learn and use for both beginners and experts
  • Multiple Statistical Tests - t-tests, ANOVA, Kruskal-Wallis, and more
  • Variance Reduction - Built-in CUPED, stratification, and regression adjustments
  • Power Analysis - Simulate synthetic effects to estimate required sample sizes
  • Flexible Pipelines - Chain data processors and splitters for complex workflows
  • Experiment Orchestration - Run and visualize multiple test scenarios simultaneously
  • Extensible Architecture - Easy to create custom tests, splitters, and processors
  • Production Ready - Type hints, comprehensive tests, and detailed documentation

🚀 Quick Start

Installation

pip install aboba

📖 Quick Example

To conduct a test, you need several entities:

  • data
  • data processing
  • data sampling technique
  • the test strategy itself

Data can be a simple pandas dataframe or custom data generator.

General use case

import numpy as np
import pandas as pd
import scipy.stats as sps

from aboba import (
    tests,
    splitters,
    effect_modifiers,
    experiment,
)
from aboba.pipeline import Pipeline

# Create dataset with two groups
data = pd.DataFrame({
    'value'  : np.concatenate([
        sps.norm.rvs(size=1000, loc=0, scale=1),
        sps.norm.rvs(size=1000, loc=0, scale=1),
    ]),
    'is_b_group': np.concatenate([
        np.repeat(0, 1000),
        np.repeat(1, 1000),
    ]),
})

# Configure test
test = tests.AbsoluteIndependentTTest(
    value_column='value',
)

# Create pipeline with splitter
splitter = splitters.GroupSplitter(
    column='is_b_group',
    size=100,
)
pipeline = Pipeline([
    ('splitter', splitter),
])

# Run experiment
n_iter = 500
exp = experiment.AbobaExperiment(draw_cols=1)

group_aa = exp.group(
    name="AA, regular",
    test=test,
    data=data,
    data_pipeline=pipeline,
    n_iter=n_iter
)
group_aa.run()

effect = effect_modifiers.GroupModifier(
    effects={1: 0.3},
    value_column='value',
    group_column='is_b_group',
)

group_ab = exp.group(
    name="AB, regular, effect=0.3",
    test=test,
    data=data,
    data_pipeline=pipeline,
    synthetic_effect=effect,
    n_iter=n_iter
)
group_ab.run()

# Draw results
fig, axes = exp.draw()
fig.savefig('results.png')

🎯 Key Components

  • Tests - Statistical tests for hypothesis testing (t-tests, ANOVA, etc.)
  • Splitters - Control how data is split into groups (random, stratified, grouped)
  • Processors - Transform data before testing (CUPED, bucketing, normalization)
  • Pipelines - Chain multiple processors and splitters together
  • Effect Modifiers - Simulate synthetic effects for power analysis
  • Experiments - Orchestrate multiple test runs and visualize results

📊 Use Cases

  • A/B Testing - Compare two variants to determine which performs better
  • Multivariate Testing - Test multiple variants simultaneously
  • Power Analysis - Determine required sample sizes for detecting effects
  • Variance Reduction - Use CUPED or stratification to improve test sensitivity
  • Custom Tests - Implement domain-specific statistical tests

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License - see LICENSE file for details

Metadata

Release files for aboba 1.0.12

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

Source distribution (sdist)

Source distribution for aboba 1.0.12
File Size Uploaded
aboba-1.0.12.tar.gz 60.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aboba 1.0.12
File Interpreter ABI Platform
aboba-1.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 144.0 kB

Release files / aboba-1.0.12.tar.gz

Download URL aboba-1.0.12.tar.gz
Size 60.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c7a53a7eb938fb4dc654633daa12d6debe292b59e098b2fe4e2fbc5e43041a2b
BLAKE2b-256 checksum
How to use checksums
756a6a60d2550496552d34f972555ea4512def66e10195bef10779da327726ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / aboba-1.0.12-py3-none-any.whl

Download URL aboba-1.0.12-py3-none-any.whl
Size 84.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6496471d780eeef63322d0839b75db79c7c5719fbe3f8553567b04e56ff0debe
BLAKE2b-256 checksum
How to use checksums
4d7b06db722a79ccd4d1fb77436fa7dc825439012cf7d442796a8978b31e8469
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.12 This release

2 release files

1.0.11

2 release files

1.0.10

1 release file

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

0.0.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