Skip to content

artemxdata/ab-testing-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

62 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ A/B Testing Pro

Professional A/B Testing Tool with ML Predictions, Bayesian Analysis & ROI Calculations

Built for data scientists, growth teams, and anyone who wants to make data-driven decisions with confidence.

โœจ Features

๐Ÿ“Š Statistical Analysis

  • Frequentist Approach: Z-tests, confidence intervals, p-values
  • Sample Size Calculator: Power analysis with industry benchmarks
  • Effect Size Detection: Cohen's h and practical significance
  • Sequential Testing: Early stopping recommendations

๐Ÿง  Bayesian Analysis

  • Beta-Binomial Model: Prior and posterior distributions
  • Probability Calculations: P(B > A) with Monte Carlo simulation
  • Expected Loss: Risk assessment for business decisions
  • Credible Intervals: Bayesian confidence ranges

๐Ÿค– ML-Powered Insights

  • Success Prediction: AI estimates test outcome probability
  • Industry Benchmarks: Performance comparison by sector
  • Risk Assessment: Automated factor analysis
  • Optimization Suggestions: Data-driven recommendations

๐Ÿ’ฐ Business Intelligence

  • ROI Calculator: Complete financial impact analysis
  • Cost-Benefit Analysis: Test investment vs. expected returns
  • Payback Period: Time to recoup testing costs
  • Annual Projections: Long-term revenue impact

๐Ÿ“ฑ Modern Experience

  • Progressive Web App: Install on any device
  • Real-time Analytics: Live metrics and updates
  • Dark/Light Themes: Customizable interface
  • Multi-language Support: English and Russian
  • Offline Functionality: Works without internet

๐Ÿ“ˆ Export & Integration

  • PDF Reports: Executive-ready analysis documents
  • CSV/Excel Export: Raw data for further analysis
  • API Integration: Webhook support for automation
  • Sharing: Easy collaboration with stakeholders

๐Ÿš€ Quick Start

Option 1: Use Online (Recommended)

๐ŸŒ Open A/B Testing Pro - No installation required!

Option 2: Run Locally

# Clone the repository
git clone https://github.com/artemxdata/ab-testing-pro.git
cd ab-testing-pro

# Install dependencies
npm install

# Start development server
npm start

# Open http://localhost:3000

Option 3: Install as PWA

  1. Visit the live demo
  2. Click the install button or use browser's "Add to Home Screen"
  3. Use offline anywhere!

๐Ÿ“š How to Use

1. Planning Your Test

๐ŸŽฏ Set Your Goals
โ”œโ”€โ”€ Define baseline conversion rate
โ”œโ”€โ”€ Choose minimum detectable effect
โ”œโ”€โ”€ Set confidence level (95% recommended)
โ”œโ”€โ”€ Configure statistical power (80%+)
โ””โ”€โ”€ Estimate daily traffic

๐Ÿค– Get ML Predictions
โ”œโ”€โ”€ Industry-specific success probability
โ”œโ”€โ”€ Expected lift estimation
โ”œโ”€โ”€ Risk factor analysis
โ””โ”€โ”€ Optimization recommendations

2. Analyzing Results

๐Ÿ“Š Statistical Analysis
โ”œโ”€โ”€ Enter conversion data for both groups
โ”œโ”€โ”€ Review significance tests
โ”œโ”€โ”€ Check confidence intervals
โ””โ”€โ”€ Evaluate effect size

๐Ÿง  Bayesian Analysis  
โ”œโ”€โ”€ Examine P(B > A) probability
โ”œโ”€โ”€ Review posterior distributions
โ”œโ”€โ”€ Assess expected loss
โ””โ”€โ”€ Make risk-informed decisions

๐Ÿ’ฐ Business Impact
โ”œโ”€โ”€ Calculate ROI and payback period
โ”œโ”€โ”€ Project annual revenue impact
โ”œโ”€โ”€ Evaluate cost-effectiveness
โ””โ”€โ”€ Generate executive reports

3. Export and Share

๐Ÿ“„ Professional Reports
โ”œโ”€โ”€ PDF executive summaries
โ”œโ”€โ”€ Technical documentation
โ”œโ”€โ”€ Raw data exports
โ””โ”€โ”€ API integration payloads

๐Ÿงฎ Statistical Methods

Sample Size Calculation

n = [Z_ฮฑโˆš(2pฬ‚(1-pฬ‚)) + Z_ฮฒโˆš(pโ‚(1-pโ‚) + pโ‚‚(1-pโ‚‚))]ยฒ / (pโ‚‚-pโ‚)ยฒ

Z-Test for Proportions

Z = (pฬ‚โ‚‚ - pฬ‚โ‚) / โˆš[pฬ‚(1-pฬ‚)(1/nโ‚ + 1/nโ‚‚)]

Bayesian Analysis

Posterior: Beta(ฮฑ + successes, ฮฒ + failures)
P(B > A) = โˆซโˆซ[x>y] Beta(ฮฑB, ฮฒB) ร— Beta(ฮฑA, ฮฒA) dx dy

ROI Calculation

ROI = (Additional Revenue - Test Cost) / Test Cost ร— 100%

๐Ÿ› ๏ธ Technology Stack

Category Technology Purpose
Frontend React 18 + TypeScript Modern UI development
Styling Tailwind CSS Utility-first styling
Charts Recharts Interactive visualizations
Math MathJS Statistical calculations
PWA Service Workers Offline functionality
Icons Lucide React Beautiful iconography
Export jsPDF + html2canvas Report generation
Data XLSX + PapaParse File processing

๐Ÿ“ Project Structure

ab-testing-pro/
โ”œโ”€โ”€ ๐Ÿ“ public/              # Static assets and PWA files
โ”‚   โ”œโ”€โ”€ index.html          # Main HTML template
โ”‚   โ”œโ”€โ”€ manifest.json       # PWA manifest
โ”‚   โ””โ”€โ”€ sw.js              # Service worker
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ components/      # React components
โ”‚   โ”‚   โ””โ”€โ”€ ABTestingPro.tsx
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ hooks/          # Custom React hooks
โ”‚   โ”‚   โ””โ”€โ”€ useABTesting.ts
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ utils/          # Utility functions
โ”‚   โ”‚   โ”œโ”€โ”€ statistics.ts   # Statistical calculations
โ”‚   โ”‚   โ”œโ”€โ”€ mlPredictions.ts # ML algorithms
โ”‚   โ”‚   โ””โ”€โ”€ exportUtils.ts  # Export functionality
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ types/          # TypeScript definitions
โ”‚   โ”‚   โ””โ”€โ”€ index.ts
โ”‚   โ”œโ”€โ”€ App.js             # Main app component
โ”‚   โ”œโ”€โ”€ index.js           # App entry point
โ”‚   โ””โ”€โ”€ index.css          # Global styles
โ”œโ”€โ”€ package.json           # Dependencies and scripts
โ”œโ”€โ”€ tailwind.config.js     # Tailwind configuration
โ””โ”€โ”€ README.md             # This file

๐ŸŽจ Key Features Demo

Planning Interface

  • Interactive sample size calculator
  • Industry-specific benchmarks
  • ML-powered success predictions
  • Risk assessment matrix

Analysis Dashboard

  • Real-time statistical calculations
  • Interactive Bayesian visualizations
  • ROI and business impact metrics
  • Export-ready reports

Advanced Analytics

  • Segment analysis and clustering
  • Sequential testing recommendations
  • Multi-variate test support
  • Integration APIs

๐Ÿš€ Deployment

GitHub Pages (Current)

npm run deploy

Vercel/Netlify

npm run build
# Upload build/ folder

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Use TypeScript for type safety
  • Follow the existing code style
  • Add tests for new features
  • Update documentation as needed
  • Ensure PWA functionality works

๐Ÿ“Š Performance

Metric Score Description
Lighthouse Performance 95+ Optimized loading and rendering
Accessibility 100 WCAG 2.1 AA compliant
Best Practices 100 Security and modern standards
SEO 100 Search engine optimized
PWA โœ… Installable with offline support

๐Ÿ”ฎ Roadmap

v2.1 (Next Release)

  • Multi-armed bandit algorithms
  • Advanced segmentation analysis
  • Google Analytics integration
  • Team collaboration features

v2.2 (Future)

  • Automated test monitoring
  • Slack/Teams notifications
  • Custom ML model training
  • Enterprise SSO support

v3.0 (Vision)

  • Real-time test orchestration
  • Advanced causal inference
  • Marketplace integrations
  • No-code test builder

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • React Team - For the amazing framework
  • Tailwind CSS - For the utility-first approach
  • Recharts - For beautiful visualizations
  • Open Source Community - For inspiration and tools

๐Ÿ“ฌ Contact & Support


โญ If this project helped you, please give it a star! โญ

Made with โค๏ธ for the data science community

๐Ÿš€ Try A/B Testing Pro Now

About

Professional A/B Testing Tool with ML Predictions & Bayesian Analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published