Skip to content

Interactive A/B Testing Simulator with Bayesian & Frequentist Statistical Methods, Sample Size Calculator, and Dashboard built using Streamlit.

Notifications You must be signed in to change notification settings

AmritaVeshin/AB-Testing-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ A/B Testing Simulator

An interactive A/B testing simulator and analysis tool built with Streamlit. This app enables users to generate rich synthetic data, apply various frequentist statistical tests as well as advanced Bayesian A/B testing, calculate required sample sizes, and visualize results.


πŸš€ Features

  • 🧠 Simulate User Behavior
    Generate synthetic A/B test datasets with rich features (e.g., device, traffic source, session duration, signup month).

  • πŸ“Š Statistical Tests Supported

    • Z-test for proportions
    • Welch’s t-test for continuous metrics
    • Chi-squared test for feature relationships
    • Bayesian A/B test (Beta posteriors)
  • πŸ“ˆ Power & Sample Size Calculator
    Estimate the number of users required to detect a specific uplift.

  • 🎨 Streamlit Dashboard
    Easily explore results with visualizations and summary tables.


πŸ› οΈ Project Structure

ab_testing_simulator/
β”‚
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ init.py
β”‚ β”œβ”€β”€ main.py # Streamlit app entrypoint
β”‚ β”œβ”€β”€ data_generator.py # Simulates A/B test data
β”‚ β”œβ”€β”€ utils.py # Summary, sample size, helper functions
β”‚ └── tests.py # Statistical testing functions
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ streamlit_app.py # Optional Streamlit entry file (used in deployment)
└── README.md

▢️ Getting Started

1. Clone the Repository

git clone https://github.com/your-username/AB-Testing-Simulator.git
cd AB-Testing-Simulator

2. Install Dependencies

(Recommended: use a virtual environment)

pip install -r requirements.txt

3. Run the App

streamlit run app/main.py

πŸ“¦ Requirements

Python 3.8+ Streamlit NumPy, Pandas, SciPy, Statsmodels, Faker, Matplotlib All dependencies are listed in requirements.txt.

🧠 Use Cases

  • Learn and practice A/B testing
  • Demonstrate statistical decision-making
  • Simulate realistic experiments without real data
  • Teaching tool for marketing, product, or data teams

About

Interactive A/B Testing Simulator with Bayesian & Frequentist Statistical Methods, Sample Size Calculator, and Dashboard built using Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages