A comprehensive data science platform for rigorous statistical A/B testing analysis
Combining advanced statistical methods, machine learning principles, and interactive data visualization
This project demonstrates expertise in data science, statistical analysis, and machine learning through a production-ready A/B testing evaluation platform. The system implements both Frequentist and Bayesian statistical approaches, providing robust analysis of marketing campaign effectiveness with comprehensive business intelligence metrics.
- Dual Statistical Frameworks: Frequentist hypothesis testing + Bayesian inference
- Advanced Statistical Methods: T-tests, Chi-square, Bootstrap, Effect size, Power analysis
- Bayesian Machine Learning: Beta-Binomial model with Monte Carlo sampling (100,000 samples)
- Interactive Data Visualization: Real-time statistical analysis dashboard
- Business Intelligence: ROAS, ROI, CPA, and scaling projections
- Professional Documentation: Jupyter notebooks with mathematical formulas
π View Interactive Dashboard
Experience the full platform with interactive visualizations, real-time statistical analysis, and dynamic confidence interval adjustments.
| Method | Purpose | Implementation |
|---|---|---|
| Two-Sample T-Test (Welch's) | Tests for difference in means with unequal variances | scipy.stats.ttest_ind() |
| Chi-Square Test | Tests independence between group and conversion | scipy.stats.chi2_contingency() |
| Bootstrap Confidence Intervals | Non-parametric CI estimation (10,000 resamples) | Custom implementation with NumPy |
| Effect Size (Cohen's h/d) | Magnitude assessment independent of sample size | Arcsine transformation for proportions |
| Statistical Power Analysis | Probability of detecting true effects | statsmodels.stats.power.TTestIndPower() |
Mathematical Foundation:
- T-statistic:
$t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}$ - Effect size:
$h = 2 \times (\arcsin(\sqrt{p_1}) - \arcsin(\sqrt{p_2}))$ - Power:
$\text{Power} = 1 - \beta = P(\text{reject } H_0 | H_1 \text{ is true})$
| Component | Description | Implementation |
|---|---|---|
| Beta-Binomial Model | Conjugate prior for binary outcomes |
scipy.stats.beta with Beta(1,1) uniform prior |
| Posterior Distributions | Full uncertainty quantification | 100,000 Monte Carlo samples |
| Credible Intervals | Probability-based uncertainty | Percentile method from posterior samples |
| Probability of Superiority | Direct probability statements |
Bayesian Inference:
- Prior:
$\text{Beta}(\alpha, \beta)$ where$\alpha = \beta = 1$ (uniform) - Posterior:
$\text{Beta}(\alpha + \text{successes}, \beta + \text{failures})$ - Posterior Mean:
$E[p \mid \text{data}] = \frac{\alpha + \text{successes}}{\alpha + \beta + \text{total trials}}$
- Temporal Pattern Analysis: Day/hour effects using time series analysis
- Dose-Response Analysis: Correlation between ad exposure and conversion (Pearson & Spearman)
- Exploratory Data Analysis: Comprehensive data quality assessment
- Scaling Projections: Revenue forecasting using statistical models
| Category | Technologies |
|---|---|
| Statistical Computing | Python 3.8+, NumPy, SciPy, Statsmodels |
| Data Manipulation | Pandas |
| Statistical Modeling | SciPy.stats, Statsmodels.stats.power |
| Bayesian Inference | Beta-Binomial model, Monte Carlo sampling |
| Data Visualization | Matplotlib, Seaborn |
| Interactive Analysis | Jupyter Notebooks |
| Category | Technologies |
|---|---|
| Framework | React 18.2, TypeScript 5.0+ |
| Build Tool | Vite 5.0 |
| Data Visualization | Recharts 2.10 |
| Styling | Tailwind CSS, Glassmorphism UI |
| Icons | Lucide React |
- Version Control: Git, GitHub
- Package Management: npm, pip
- Documentation: Markdown, LaTeX (for mathematical formulas)
Marketing-Analysis-ABTest/
βββ π Jupyter Notebooks (Data Science Analysis)
β βββ ab_test_eda.ipynb # Exploratory Data Analysis
β βββ ab_test_frequentist.ipynb # Frequentist Statistical Tests
β βββ ab_test_bayesian.ipynb # Bayesian Machine Learning
β βββ ab_test_business_impact.ipynb # Business Intelligence Metrics
β
βββ π Python Scripts (Statistical Analysis)
β βββ ab_test_eda.py # EDA automation
β βββ ab_test_frequentist.py # Frequentist tests
β βββ ab_test_bayesian.py # Bayesian inference
β βββ ab_test_business_impact.py # Business metrics
β
βββ βοΈ React Frontend (Interactive Dashboard)
β βββ src/
β β βββ ab_test_dashboard.tsx # Main dashboard component
β β βββ main.jsx # Application entry point
β β βββ index.css # Glassmorphism styling
β βββ public/ # Static assets & JSON results
β
βββ π Documentation
βββ README.md # This file
βββ ab_test_prd.md # Product requirements
βββ PROJECT_SUMMARY.md # Executive summary
βββ docs/
βββ STATISTICAL_METHODS.md # Statistical methods guide
βββ DEPLOYMENT.md # Deployment instructions
graph TD
A[Raw Data CSV] --> B[Data Quality Assessment]
B --> C[Exploratory Data Analysis]
C --> D[Frequentist Testing]
C --> E[Bayesian Inference]
D --> F[Statistical Results]
E --> F
F --> G[Business Metrics]
G --> H[Interactive Dashboard]
H --> I[Jupyter Documentation]
-
Data Loading & Quality Checks
- Missing value detection
- Duplicate identification
- Data consistency validation
-
Exploratory Data Analysis
- Conversion rate analysis
- Temporal pattern identification
- Dose-response relationships
- Correlation analysis
-
Statistical Testing
- Frequentist: T-test, Chi-square, Bootstrap, Effect size, Power analysis
- Bayesian: Beta-Binomial model, Posterior sampling, Credible intervals
-
Business Intelligence
- Incremental conversions
- ROAS, ROI, CPA calculation
- Break-even analysis
- Scaling projections
-
Visualization & Reporting
- Interactive dashboard
- Jupyter notebooks with formulas
- Exportable results
- P-value: Statistical significance testing
- Effect Size: Cohen's h and d for magnitude assessment
- Confidence Intervals: 90%, 95%, 99% (adjustable)
- Statistical Power: Probability of detecting true effects
- Probability of Superiority: Bayesian probability statements
- ROAS (Return on Ad Spend): Revenue per dollar spent
- ROI (Return on Investment): Net profit relative to investment
- CPA (Cost per Acquisition): Cost per incremental conversion
- Break-Even Analysis: Minimum performance thresholds
- Scaling Projections: Revenue forecasts at different volumes
- β Hypothesis testing (t-test, chi-square)
- β Bayesian inference (Beta-Binomial model)
- β Bootstrap methods
- β Effect size calculation
- β Power analysis
- β Confidence/Credible intervals
- β Probabilistic modeling
- β Monte Carlo sampling
- β Posterior distribution estimation
- β Uncertainty quantification
- β Data quality assessment
- β Temporal pattern analysis
- β Correlation analysis
- β Time series analysis
- β Interactive dashboards
- β Statistical plots
- β Business metrics visualization
- β Real-time updates
# Python 3.8+
python --version
# Node.js 16+
node --version
# npm
npm --version# 1. Clone repository
git clone https://github.com/RamenMachine/Marketing-Analysis-ABTest.git
cd Marketing-Analysis-ABTest
# 2. Install Python dependencies
pip install pandas numpy scipy matplotlib seaborn statsmodels jupyter
# 3. Install Node.js dependencies
npm install
# 4. Run analysis (optional - generates JSON for dashboard)
python ab_test_eda.py
python ab_test_frequentist.py
python ab_test_bayesian.py
python ab_test_business_impact.py
# 5. Start development server
npm run devjupyter notebook
# Open and run:
# - ab_test_eda.ipynb
# - ab_test_frequentist.ipynb
# - ab_test_bayesian.ipynb
# - ab_test_business_impact.ipynbEach notebook contains comprehensive analysis with:
- Mathematical Formulas: LaTeX-formatted equations
- Statistical Explanations: Step-by-step methodology
- Code Implementation: Production-ready Python
- Visualizations: Professional charts and graphs
- Interpretations: Results explanation and recommendations
| Notebook | Focus Area | Key Methods |
|---|---|---|
ab_test_eda.ipynb |
Exploratory Analysis | Data quality, temporal patterns, dose-response |
ab_test_frequentist.ipynb |
Frequentist Statistics | T-test, Chi-square, Bootstrap, Effect size, Power |
ab_test_bayesian.ipynb |
Bayesian ML | Beta-Binomial, Posterior sampling, Credible intervals |
ab_test_business_impact.ipynb |
Business Intelligence | ROAS, ROI, CPA, Break-even, Scaling |
- T-statistic and p-value
- 95% Confidence intervals
- Effect size (Cohen's h/d)
- Statistical power
- Posterior distributions
- 95% Credible intervals
- Probability of superiority
- Expected business impact
- Incremental conversions
- ROAS and ROI
- Cost per acquisition
- Break-even analysis
- Marketing Analytics: Evaluate campaign effectiveness
- Product Development: A/B test new features
- Data Science Research: Statistical methodology demonstration
- Business Intelligence: Revenue attribution and forecasting
- Academic: Statistical methods and machine learning
This project is licensed under the MIT License - see the LICENSE file for details.
RamenMachine
- GitHub: @RamenMachine
- Repository: Marketing-Analysis-ABTest