BUSINESS ANALYTICS • EXPERIMENTATION AND CAUSAL THINKING

A/B Testing Pitfalls — Common pitfalls (peeking, multiple comparisons, selection bias)

Why even well-designed experiments produce misleading results when analysts violate core statistical assumptions.

Historical Context & Motivation

Randomized controlled experiments have been the gold standard for establishing causal relationships since R.A. Fisher formalized their design in the 1920s and 1930s. When internet companies began scaling rapidly in the early 2000s, they adapted Fisher's framework into what the technology industry now calls A/B testing — splitting live traffic between a control (A) and a variant (B) to measure whether a change in design, copy, pricing, or algorithm moves a business metric. Companies like Google, Amazon, and Netflix soon reported running hundreds of concurrent experiments at a time, and the practice quickly spread to startups, e-commerce brands, and even political campaigns.

Yet the democratization of experimentation brought a predictable consequence: many teams adopted the tool without fully understanding the statistical assumptions that make it valid. By the early 2010s, industry practitioners and academic statisticians alike began documenting systematic errors — false discoveries, inflated effect sizes, and irreproducible results — that traced back to a small set of recurring mistakes. Three pitfalls emerged as the most damaging: peeking at results before the sample size is reached, running multiple comparisons without adjusting significance thresholds, and selection bias in how users are assigned to groups. Understanding these pitfalls is essential for any business analyst who wants experiment-driven decisions to be trustworthy rather than merely data-flavored guesswork.

1925
Fisher's Statistical Methods
R.A. Fisher publishes Statistical Methods for Research Workers, formalizing hypothesis testing, p-values, and the logic of randomized controlled experiments that underpin modern A/B tests.
2000
Google's First A/B Test
Google engineers run one of the earliest large-scale online experiments, testing the number of search results displayed per page. The practice soon scales to thousands of simultaneous tests across the company.
2009
Kohavi et al. Publish Guidelines
Ron Kohavi and colleagues at Microsoft publish influential guidelines for online controlled experiments, cataloging common mistakes including peeking and metric selection errors that lead to false conclusions.
2014
Johari et al. on Continuous Monitoring
Researchers at Optimizely formalize the 'peeking problem,' showing that continuously checking significance can inflate false positive rates from the nominal 5% to over 30%, and propose always-valid inference as a solution.
2020s
Sequential Testing Goes Mainstream
Major experimentation platforms adopt sequential testing methods (e.g., group sequential designs, always-valid p-values) and auto-correction for multiple comparisons, making rigorous experimentation more accessible to business teams.

The central question this lesson addresses is deceptively simple: if A/B testing is just 'randomly split users and measure outcomes,' why do so many experiments produce conclusions that fail to replicate? The answer lies in the gap between the assumptions of classical hypothesis testing and the realities of how businesses actually run experiments — a gap that peeking, multiple comparisons, and selection bias exploit relentlessly.

Core Principles & Definitions

Before diagnosing what goes wrong, it helps to recall how a correctly executed A/B test is supposed to work. You begin by stating a null hypothesis (H₀: the variant has no effect on the metric) and an alternative hypothesis (H₁: the variant does have an effect). You choose a significance level (α, often 0.05) and compute the required sample size based on the minimum detectable effect, baseline conversion rate, and desired statistical power. Users are randomly assigned, the experiment runs until the pre-determined sample size is reached, and only then is the test statistic calculated and compared to the critical value. Each of the three pitfalls violates one or more of these steps.

1

Peeking (Optional Stopping)

Checking results repeatedly during the experiment and stopping early when a 'significant' result appears. Because random fluctuations are large in small samples, early looks dramatically inflate the false positive rate well beyond the stated α.
2

Multiple Comparisons

Testing many metrics, variants, or subgroups simultaneously without adjusting the significance threshold. Each additional test is another chance to find a spurious result, so the family-wise error rate compounds quickly.
3

Selection Bias

Systematic differences between treatment and control groups caused by non-random assignment, self-selection, or differential attrition. Selection bias means the groups are not comparable at baseline, so any observed difference may reflect the bias rather than the treatment.
4

Type I vs. Type II Errors

A Type I error (false positive) means declaring a winner when no real effect exists. A Type II error (false negative) means missing a real effect. All three pitfalls primarily inflate Type I error rates.
KEY TAKEAWAY
Think of a well-designed A/B test like a courtroom trial with strict procedural rules. The null hypothesis is 'innocent until proven guilty,' the sample size is a pre-set trial date, and the significance level is the burden of proof. Peeking is like asking the jury to vote after every witness — eventually they will convict on emotion. Multiple comparisons is like charging the defendant with twenty crimes hoping one sticks. Selection bias is like stacking the jury — the verdict tells you about the bias, not the evidence.

Visual Explanation — The Peeking Problem

The diagram below illustrates how peeking inflates the false positive rate. In a correctly run test (left path), the analyst waits until the pre-determined sample size is reached before evaluating the p-value. In the peeking scenario (right path), the analyst checks the p-value at multiple interim points — and stops as soon as any check crosses the significance threshold. Because random noise is largest in small samples, early p-values fluctuate wildly, and the cumulative probability of at least one spurious 'significant' result grows with every peek.

The left column shows a properly conducted test: the analyst commits to a sample size and evaluates the p-value once. The right column shows a peeking scenario where the analyst checks the p-value at every 20% increment of data collection, stopping early whenever p < 0.05. Even under a true null hypothesis (no real effect), this practice inflates the false positive rate from the nominal 5% to roughly 26–30%.

The diagram makes clear that the issue is not merely carelessness — it is a structural consequence of the test's design. A p-value of 0.05 guarantees a 5% false positive rate only if the test is evaluated once at the pre-specified sample size. Every additional peek is like buying an extra lottery ticket: individually each has low odds of a false alarm, but collectively the chances compound. This is why modern experimentation platforms increasingly implement sequential testing methods that control the overall error rate even when analysts check results continuously.

Mathematical Framework

Each of the three pitfalls can be understood quantitatively. The mathematics are not complex, but they reveal how quickly error rates escalate when assumptions are violated. Below we formalize the key relationships.

Peeking — Cumulative Type I Error

NAIVE UPPER BOUND ON FALSE POSITIVE RATE
P(at least one false alarm in k peeks) ≤ 1 − (1 − α)ᵏ
Where α = nominal significance level per peek (e.g., 0.05), and k = number of interim looks. This is an upper bound because successive peeks on overlapping data are positively correlated, so the true rate is somewhat lower — but still far above α. For k = 5 and α = 0.05, this bound gives 1 − 0.95⁵ ≈ 0.226 (22.6%), and simulations typically show rates of 26–30%.

Multiple Comparisons — Family-Wise Error Rate

FAMILY-WISE ERROR RATE (FWER)
FWER = 1 − (1 − α)ᵐ
Where m = number of independent hypothesis tests. With 20 metrics tested at α = 0.05, FWER = 1 − 0.95²⁰ ≈ 0.64 — a 64% chance of at least one false positive among the 20 tests.
BONFERRONI CORRECTION
α_adjusted = α / m
The Bonferroni correction divides the significance level by the number of comparisons. For 20 tests at α = 0.05, each individual test must achieve p < 0.0025 to be declared significant. This is conservative — it guarantees FWER ≤ α but may reduce power. Less conservative alternatives include the Benjamini-Hochberg procedure, which controls the false discovery rate (FDR) instead of the FWER.

Selection Bias — Confounding in Estimation

OBSERVED DIFFERENCE WITH SELECTION BIAS
Δ_observed = Δ_true + Bias(X_T − X_C)
Where Δ_true is the actual causal effect, X_T and X_C are the average covariate values in the treatment and control groups. When randomization fails, X_T ≠ X_C, and the bias term can be positive or negative, making the observed effect either larger or smaller than the true effect. Proper random assignment ensures E[X_T] = E[X_C], zeroing out the bias term in expectation.
⚠️ Why These Errors Compound in Practice
In a real business environment, all three pitfalls often occur simultaneously. A team might run a test with three variants and ten metrics (multiple comparisons), peek at a dashboard daily (peeking), and allow users to self-select into the experiment by opting into a new feature (selection bias). The combined false positive rate can easily exceed 50%, meaning most 'wins' are illusory.

Detailed Breakdown of Each Pitfall

Each pitfall has distinct causes, symptoms, and remedies. The visual below maps the full landscape, showing how each error enters the experimentation workflow and what safeguards exist.

This cause-symptom-remedy map organizes the three pitfalls in parallel. Each column tracks a single pitfall from its root cause (top) through the observable symptom (middle) to the recommended statistical or operational remedy (bottom, in green). Notice that all three remedies share a common principle: pre-specifying the analysis plan before data collection begins.

Deep Dive: Multiple Comparisons in Practice

Multiple comparisons occur more often than analysts realize. Every time you slice your experiment by a user segment — mobile vs. desktop, new vs. returning, US vs. international — you are implicitly running additional hypothesis tests. A test with one variant and ten metrics already has ten comparisons; add three user segments and the count jumps to thirty. At α = 0.05, the probability of at least one false positive among thirty independent tests is 1 − 0.95³⁰ ≈ 0.785, or nearly 79%. The Bonferroni correction addresses this by dividing the per-test significance level by the number of comparisons (0.05 / 30 ≈ 0.00167), though its conservatism reduces power. In practice, many organizations adopt the Benjamini-Hochberg procedure, which controls the false discovery rate rather than the family-wise error rate, offering a better balance between rigor and sensitivity.

Deep Dive: Selection Bias in Digital Experiments

Selection bias can enter an A/B test through several doors. The most obvious is non-random assignment — for example, routing all high-value customers to the variant because the product team wants them to see the 'better' experience. Subtler forms include survivorship bias (analyzing only users who completed the funnel, ignoring those who dropped out) and novelty or primacy effects (early adopters of a new feature behave differently from the general population). A practical safeguard is the AA test — running both groups through identical experiences to verify that the randomization mechanism produces statistically indistinguishable groups before introducing the treatment.

Worked Example — Diagnosing Pitfalls in a Pricing Test

Imagine you are a data analyst at an e-commerce company. The marketing team ran a pricing experiment: half of visitors saw the original price ($49.99) and half saw a discounted price ($39.99). The team reports the following: they checked the dashboard after three days (about 40% of the planned sample), found a p-value of 0.03 on conversion rate, and declared the discount a winner. They also note that revenue per visitor, average order value, and return rate were analyzed but were not significant — only conversion rate was. Finally, they mention that the experiment was shown only to users who had previously created an account, not to anonymous visitors. Let us diagnose the pitfalls.

Diagnosing and Correcting Pitfalls in a Pricing Experiment
1
Step 1 — Identify PeekingThe team checked results at 40% of the planned sample size and stopped early based on p < 0.05. This is a textbook case of peeking (optional stopping). Even if the true effect is zero, stopping at the first 'significant' interim look inflates the false positive rate. With the planned full sample still unfinished, the p-value of 0.03 is unreliable.
Pitfall detected: Peeking. The reported p = 0.03 understates the true error rate.
2
Step 2 — Identify Multiple ComparisonsFour metrics were tested: conversion rate, revenue per visitor, average order value, and return rate. The team highlighted the one metric that was significant while dismissing the three that were not. This is the multiple comparisons problem — specifically, post-hoc cherry-picking. With m = 4 comparisons and α = 0.05, the FWER is 1 − 0.95⁴ ≈ 0.185 (18.5%). The Bonferroni-adjusted threshold would be 0.05 / 4 = 0.0125, and the observed p = 0.03 does not meet it.
Pitfall detected: Multiple comparisons. The p = 0.03 for conversion rate does not survive Bonferroni correction (α_adj = 0.0125).
3
Step 3 — Identify Selection BiasThe experiment was restricted to logged-in users with existing accounts. This population is systematically different from anonymous visitors — they are more engaged, more familiar with the product, and likely have higher baseline conversion rates. Any conclusion about the discount's effect applies only to this self-selected group and cannot be generalized to all visitors. Moreover, if account holders were further filtered (e.g., those who visited during the test period), survivorship bias may compound the issue.
Pitfall detected: Selection bias. Results are valid only for logged-in users and may not generalize.
4
Step 4 — Recommend CorrectionsTo correct these issues: (1) Let the test run to the pre-determined sample size, or use a sequential testing framework with spending functions that allocate α across interim analyses. (2) Designate one primary metric (e.g., revenue per visitor) before the test launches and apply a correction method to secondary metrics. (3) Either include all visitors in the experiment or clearly scope the conclusion to the account-holder population and plan a separate test for anonymous visitors.
Corrected approach: Pre-register one primary metric, wait for the full sample, apply Bonferroni or BH to secondary metrics, and either broaden the population or clearly state the scope.

Remedies — Strengths and Limitations

Each pitfall has well-established statistical remedies, but no remedy is without trade-offs. The table below compares the most common approaches across practical dimensions that matter to business teams: ease of implementation, impact on statistical power, and organizational adoption barriers.

Comparison of common remedies for A/B testing pitfalls
RemedyPitfall AddressedStrengthsLimitations
Fixed-horizon testingPeekingSimple to implement; exact Type I error control at α. No special software required.Requires analysts to resist checking early; may run longer than necessary if true effect is large.
Group sequential testingPeekingAllows pre-specified interim looks while controlling overall α via spending functions (e.g., O'Brien-Fleming).Requires upfront planning of interim analysis times; slightly reduced power at each look.
Bonferroni correctionMultiple comparisonsGuarantees FWER ≤ α. Easy to compute and explain. Works regardless of dependence among tests.Very conservative — may miss real effects when many comparisons are made.
Benjamini-HochbergMultiple comparisonsControls false discovery rate (FDR), offering greater power than Bonferroni when many hypotheses are tested.Assumes independence or positive dependence among tests; less intuitive to explain to non-technical stakeholders.
Proper randomization + AA testSelection biasEliminates systematic differences at baseline; AA test provides empirical evidence that assignment is balanced.Requires engineering infrastructure for true randomization; AA test adds time; doesn't address attrition bias.
KEY TAKEAWAY
Choosing a remedy is analogous to selecting a quality control system on a factory production line. Fixed-horizon testing is like inspecting products only at the end of the line — simple but inflexible. Sequential testing is like placing checkpoints along the line with pre-calibrated tolerance levels. Correction methods (Bonferroni, BH) are like tightening the tolerance when you inspect multiple product characteristics simultaneously. The best experimentation programs combine all three, guided by a pre-registered analysis plan.

Connection to Advanced Experimentation Methods

The three pitfalls discussed here are entry points into deeper statistical territory. Understanding them positions you to engage with advanced methods that modern experimentation teams use to scale testing without sacrificing rigor. The table below maps each pitfall to the advanced methodology that addresses it most directly.

From basic remedies to advanced experimentation methods
PitfallBasic RemedyAdvanced MethodKey Idea
PeekingFixed-horizon designAlways-valid inference (confidence sequences)Construct confidence intervals that are valid at every sample size, allowing continuous monitoring without inflating α. Based on martingale theory.
Multiple comparisonsBonferroni / BH correctionBayesian hierarchical modelsModel all metrics jointly, letting partial pooling (shrinkage) reduce extreme estimates. Naturally handles multiplicity through the prior.
Selection biasRandomization + AA testRegression adjustment / CUPEDUse pre-experiment covariates to reduce variance and correct for residual imbalance. CUPED (Controlled-experiment Using Pre-Experiment Data) is widely used at Netflix, Microsoft, and others.
All threePre-registrationExperimentation platforms with guardrailsAutomated platforms (e.g., Statsig, Eppo, Optimizely) enforce sample size commitments, apply corrections, and flag imbalanced assignments by default.

The trajectory from basic to advanced is clear: modern experimentation seeks to make rigor automatic rather than optional. Always-valid inference eliminates the peeking problem entirely by redefining what a valid confidence interval means. Bayesian hierarchical models replace the ad-hoc Bonferroni adjustment with a principled framework for borrowing information across metrics. CUPED leverages historical data to both reduce variance and guard against residual selection bias. As you progress in business analytics, these methods will become essential tools for designing experiments that stakeholders can trust.

Practice Problems

PROBLEM 1CONCEPTUAL
A product manager runs an A/B test and checks the results dashboard every morning. After one week (60% of the planned sample), the p-value is 0.04 and she declares the variant a winner. A colleague argues that the result is not trustworthy. Which pitfall is the colleague identifying, and why does it undermine the conclusion?
PROBLEM 2BASIC CALCULATION
A marketing team tests a new landing page and analyzes 8 different metrics (click-through rate, bounce rate, time on page, sign-ups, etc.) at α = 0.05. Assuming the tests are independent, calculate the family-wise error rate (FWER). Then determine the Bonferroni-adjusted significance level for each individual test.
PROBLEM 3INTERMEDIATE
An e-commerce company runs a test comparing the original checkout flow (Control) with a simplified version (Variant). The test is shown only to users who add items to their cart. After the experiment, the company finds the Variant has a 12% higher conversion rate (p = 0.01). However, the Control group has a 15% cart abandonment rate before reaching the checkout page, while the Variant group has only a 5% cart abandonment rate. Identify the pitfall and explain how it affects the validity of the 12% conversion lift claim.
PROBLEM 4APPLIED
You are the lead analyst at a SaaS company. The growth team wants to run a test with 3 pricing variants (plus the control) across 5 user segments (free, trial, basic, pro, enterprise) and measure 4 metrics (conversion, revenue, churn, NPS). They plan to check the dashboard weekly over a 6-week test. (a) How many hypothesis tests does this design imply? (b) Calculate the unadjusted FWER assuming independence. (c) Propose a realistic analysis plan that controls error rates while preserving the ability to learn from the experiment.
PROBLEM 5CRITICAL THINKING
A colleague argues: 'Bayesian A/B testing solves all three pitfalls — you don't need p-values, so peeking is fine; you get posterior probabilities for each variant, so multiple comparisons don't matter; and the prior handles selection bias.' Critically evaluate each of these three claims. Which are partially correct, which are wrong, and why?

Lesson Summary

A/B testing is one of the most powerful tools in business analytics, but its value depends entirely on the rigor with which experiments are designed and analyzed. This lesson examined three pervasive pitfalls: peeking (optional stopping), which inflates the false positive rate by evaluating results before the planned sample size; multiple comparisons, which compounds error when many metrics, variants, or segments are tested simultaneously; and selection bias, which occurs when non-random assignment or differential attrition makes the treatment and control groups fundamentally incomparable. Each pitfall has a mathematical signature — peeking raises the cumulative Type I error rate, multiple comparisons increase the family-wise error rate, and selection bias introduces a confounding term into the estimated treatment effect.

The remedies are well established: fixed-horizon or sequential testing controls error across interim looks; the Bonferroni correction and Benjamini-Hochberg procedure adjust significance thresholds for multiplicity; and proper randomization combined with AA tests ensures balanced groups at baseline. The overarching principle is pre-registration — committing to a primary metric, sample size, analysis plan, and correction method before data collection begins. This single practice neutralizes most of the pathways through which these pitfalls operate and is the hallmark of a mature experimentation culture.

Varsity Tutors • Business Analytics • A/B Testing Pitfalls — Common pitfalls (peeking, multiple comparisons, selection bias)