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.
-
π§ 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.
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
git clone https://github.com/your-username/AB-Testing-Simulator.git
cd AB-Testing-Simulator(Recommended: use a virtual environment)
pip install -r requirements.txtstreamlit run app/main.pyPython 3.8+ Streamlit NumPy, Pandas, SciPy, Statsmodels, Faker, Matplotlib All dependencies are listed in requirements.txt.
- Learn and practice A/B testing
- Demonstrate statistical decision-making
- Simulate realistic experiments without real data
- Teaching tool for marketing, product, or data teams