Notes

A/B Testing

A/B testing is the everyday way teams answer questions like “Does this new button text increase sign-ups?” by trying two versions side-by-side and letting real user behavior decide.

What it is
In an A/B test, you randomly split people (or sessions) into two groups. Group A sees the current version (control), and group B sees a changed version (treatment). You then compare an outcome metric—like click-through rate, purchase rate, or average revenue—to estimate the treatment effect. Random assignment is the key: it makes the groups comparable so differences in outcomes can be attributed to the change, not to pre-existing differences between users.

How results are judged
Because outcomes vary naturally, you use hypothesis testing (or an equivalent Bayesian approach) to decide whether the observed difference is likely real. Common ingredients include:

  • A null hypothesis (“no difference”) and an alternative (“there is a difference”).
  • A p-value and a chosen significance level (often 0.05).
  • Confidence intervals to show a plausible range for the effect size.
  • Power and sample size planning to avoid missing meaningful improvements.

Practical examples
Typical uses look like:

  • E-commerce: “Free shipping” banner vs. no banner → compare conversion rate.
  • Education apps: new practice schedule → compare exam-score improvement.
  • Healthcare ops: reminder message wording → compare appointment attendance.

Why it matters in AI/ML
A/B testing is how ML systems prove they help in the real world: a new ranking model, recommender, or fraud threshold can be evaluated on live metrics. Without careful randomization and guardrails (e.g., avoiding peeking, handling multiple metrics, and preventing interference between users), you can “ship” models that look good offline but hurt outcomes online.

A/B Testing is a randomized controlled experiment that compares two variants (A and B) by splitting subjects into groups and measuring a predefined outcome (e.g., conversion rate). Statistical hypothesis tests and confidence intervals quantify whether observed differences are likely due to chance. It is crucial in AI/ML for validating product changes and model-driven interventions with causal evidence. Example: test two recommendation ranking algorithms and compare click-through rates.

Imagine you’re choosing between two versions of a movie poster and want to know which one makes more people buy tickets. You show poster A to some people and poster B to others, then compare what happens. That’s the basic idea of A/B Testing.

In statistics and AI/ML, A/B Testing is a simple experiment where you randomly split users into two groups, give each group a different option (like two website designs), and measure a result (like clicks or purchases). Random splitting helps make the comparison fair, so differences are more likely caused by the change you made, not by who happened to see it.