Skip to content

basseat/ab-test-checkout-fraud

Repository files navigation

Does a Faster Checkout Cost More Than It Earns?

An end-to-end A/B testing case study on a simulated fintech payment checkout, demonstrating experiment design, statistical analysis, and business decision-making when conversion gains come with increased fraud risk.

Key Findings

  • The simplified checkout flow lifts conversion by 1.6 percentage points (p = 0.005), but fraud among completed transactions doubles from ~2% to ~3.9% (p < 0.001).
  • At realistic fraud cost assumptions (2.5x chargeback multiplier), the increased fraud wipes out the revenue gain from higher conversion. The experiment is a net negative.
  • Fraud risk is concentrated on desktop transactions, suggesting a mobile-only rollout as a viable alternative.

What This Covers

  1. Experiment design: hypothesis definition, metric hierarchy (primary, guardrail, secondary), power analysis (analytical and simulation-based), sample size calculation.
  2. Data simulation: realistic user-level data with segment-specific conversion rates, log-normal transaction values, and differential fraud rates across treatment groups.
  3. Statistical analysis: two-proportion z-tests, confidence intervals, randomisation checks.
  4. Guardrail analysis: fraud rate testing, cost-benefit analysis with sensitivity to fraud cost multipliers.
  5. Segment analysis: heterogeneous treatment effects by device type and country.
  6. Common pitfalls: simulation showing inflated false positive rates from daily peeking, and how ignoring guardrail metrics leads to wrong decisions.

Context

The scenario is informed by experience working with payment fraud and transaction data at fintech companies. The simulation models a European payments company operating across Germany, France, the Netherlands, and Spain. All data is simulated; no proprietary information is used.

Dashboard

Interactive Tableau dashboard showing conversion lift, fraud increase by segment, and the revenue vs fraud cost tradeoff.

Tools

Python, NumPy, Pandas, SciPy, statsmodels, Matplotlib, Seaborn, Tableau

How to Run

pip install numpy pandas scipy statsmodels matplotlib seaborn
jupyter lab ab-test-checkout-fraud.ipynb

About

End-to-end A/B test simulation on a fintech checkout flow, weighing conversion gains against fraud costs. Python + Tableau.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors