Skip to main content
Sequential TestingExplainer· 9 min read· in Data & Analysis

How the Alpha-Spending Function Prevents False Positives When Continuously Monitoring A/B Tests

Checking an A/B test early inflates the risk of false positives, a statistical trap known as the peeking problem. The alpha-spending function solves this by mathematically rationing the error budget across the duration of the experiment.

By Logan Price

Frequentist Statisticians 40%Bayesian Practitioners 30%Product and Growth Teams 30%
Frequentist Statisticians
Advocate for strict pre-specification and alpha-spending to control Type I errors.
Bayesian Practitioners
Prefer continuous monitoring through posterior probabilities rather than fixed error budgets.
Product and Growth Teams
Prioritize velocity and early stopping to maximize business impact.

Perspectives this story doesn't cover

  • Data Safety Monitoring Boards (DSMBs) in clinical trials
  • Platform engineers building automated A/B testing tools

Summary

  • Evaluating an A/B test multiple times without statistical correction inflates the false positive rate well beyond the nominal 5%.
  • An alpha-spending function solves this by rationing the Type I error budget across the experiment's information fraction.
  • The O'Brien-Fleming boundary is strict early on, preserving nearly all statistical power for the final analysis.
  • The Pocock boundary distributes the error budget evenly, making early stopping easier but penalizing the final look.
  • Sequential testing allows product teams to make faster, mathematically sound decisions without falling victim to the peeking problem.

The statistical validity of an A/B test is determined not when the data is collected, but at the exact moment an analyst decides to look at the dashboard and stop the experiment. In a standard fixed-horizon design, the mathematics governing the test assume that the data will be evaluated exactly once, after a predetermined sample size has been fully reached. This single evaluation is the boundary condition that makes a 5% significance threshold meaningful. When a product manager or data scientist opens a live dashboard to check if a new feature is winning, they are not simply observing a stable measurement. They are performing an independent statistical test on accumulating data. If they use that interim look to stop the test early because the results appear favorable, they fundamentally alter the probability of declaring a false positive. This decision point is where the integrity of the experiment is either preserved or destroyed.

This phenomenon is known across the industry as the "peeking problem," and its mathematical consequences are severe. Because early data is inherently noisy, metrics swing considerably before enough observations have accumulated for the estimates to stabilize. Every check made with the intent to stop introduces another opportunity for random variance to cross the significance threshold purely by chance. If an analyst checks the results five times during an experiment and uses a standard uncorrected 5% threshold, the actual false positive rate climbs to 14.2%. If they peek ten times, the false positive rate approaches 19%. The promise of a 95% confidence interval evaporates, leaving teams to deploy features that do nothing—or actively harm conversion—while their reporting tools falsely claim a statistically significant victory.

To solve this without forcing teams to fly blind for weeks, statisticians rely on sequential testing frameworks. Rather than forbidding interim looks entirely, sequential testing mathematically accounts for them by adjusting the significance threshold at each check. The mechanism that governs this adjustment is the alpha-spending function. First introduced in 1983 by statisticians K.K. Gordon Lan and David DeMets, the alpha-spending function is a pre-specified rule that determines exactly how much of a trial's overall Type I error budget—typically 5%, or an alpha of 0.05—may be "spent" at any given interim look. By treating the error rate as a finite budget, the function ensures that the cumulative probability of a false positive across every look, including the final analysis, never exceeds the nominal alpha.[3]

Uncorrected interim looks dramatically inflate the false positive rate.

The alpha-spending function operates on a metric called the information fraction, denoted as t. The information fraction represents the proportion of the total planned statistical information—such as the maximum sample size or the total number of required conversions—that has been collected so far. The function itself, written as α(t), is a continuous, non-decreasing curve that maps the information fraction from 0 to 1 against the cumulative alpha spent from 0 to 0.05. Because the function evaluates the cumulative error based on the realized information fraction rather than calendar time, it allows data monitoring committees or automated A/B testing platforms to conduct interim analyses at flexible, unplanned intervals without violating the overall error rate guarantee.[1]

"The alpha spending function dictates, in advance, the amount of Type I error probability to be spent at each of the multiple tests," notes the Google Cloud glossary on sequential testing. "This way, as an adaptive design, no matter the frequency at which the chunks of data arrive, or the cumulative sample size available at each test, the alpha spending function enables to find the thresholds accordingly." This flexibility is what makes the Lan-DeMets approach the gold standard for modern continuous monitoring, replacing older group sequential methods that required the exact number and timing of interim looks to be rigidly fixed before the experiment began.[1]

When implementing an alpha-spending function, experimenters typically choose between two classical boundary shapes: the O'Brien-Fleming type and the Pocock type. The O'Brien-Fleming spending function is highly conservative during the early stages of an experiment. It spends almost none of the alpha budget when the information fraction is low, resulting in extremely strict critical values for early interim looks. For example, at a 20% information fraction, the required Z-score to declare significance might be so high that only a massive, undeniable effect could cross it. Because it hoards the error budget, the O'Brien-Fleming boundary preserves nearly all of the statistical power for the final analysis, making it the preferred choice when early stopping is only desired for overwhelming efficacy.

Conversely, the Pocock-type spending function distributes the alpha budget much more uniformly across the duration of the experiment. By spending more of the error budget early on, the Pocock boundary makes it mathematically easier to stop a test during the initial interim looks. However, this early leniency comes at a steep cost. Because a significant portion of the 5% budget has already been consumed by the interim checks, the critical value required at the final analysis is substantially higher than the standard 1.96 Z-score. An experiment sized for a fixed-horizon test but analyzed with a Pocock boundary will suffer a noticeable loss of statistical power at the final look, often requiring a 10% to 25% larger maximum sample size to compensate.[3]

O'Brien-Fleming boundaries are strict early on, while Pocock boundaries remain flat.
Conversely, the Pocock-type spending function distributes the alpha budget much more uniformly across the duration of the experiment.

While frequentist alpha-spending functions dominate clinical trials and many commercial A/B testing platforms, alternative approaches exist for continuous monitoring. Researchers at Microsoft have detailed how Bayesian optional stopping provides a different mechanism for avoiding the peeking problem. In a Bayesian framework, the analysis focuses on updating the posterior probability of an effect as new data arrives, rather than controlling a strict frequentist Type I error rate. Because the posterior distribution is considered a valid summary of the evidence at any given moment, some Bayesian methods allow for continuous monitoring without the explicit need for an alpha-spending penalty, though they require careful specification of prior distributions to avoid their own forms of bias.[2]

Despite the mathematical elegance of sequential testing, its implementation in business environments requires strict organizational discipline. The alpha-spending function must be pre-specified before any data is examined. If an analyst launches a test, peeks at the data, and only then decides to apply a sequential boundary to justify stopping early, the statistical guarantee is voided. The function is a rigid rule for distributing the error budget, not a post-hoc justification for a desired outcome. When properly applied, however, the alpha-spending function transforms A/B testing from a rigid waiting game into a dynamic, continuously monitored process, allowing companies to ship winning features faster while mathematically neutralizing the false positive risks of the peeking problem.

The origins of the alpha-spending function lie not in software development, but in the high-stakes environment of clinical trials. In the 1970s and 1980s, medical researchers recognized that it was unethical to continue administering a placebo to patients if early data overwhelmingly proved a new drug was effective, or conversely, to keep administering a drug that was clearly causing harm. The Greenberg Report, finalized in 1967, established the ethical mandate for interim monitoring, but the statistical tools to do so without inflating false positives were still in their infancy. The development of the Lan-DeMets spending function in 1983 provided the mathematical breakthrough that allowed Data Safety Monitoring Boards to peek at the data safely.

The transition of these methods from clinical medicine to digital A/B testing accelerated in the 2010s, driven by the massive scale of online experimentation. Technology companies running thousands of concurrent tests could not afford the inefficiency of fixed-horizon designs. Waiting weeks for a test to finish when a feature was already demonstrating a 20% conversion lift meant leaving substantial revenue on the table. By adopting sequential testing and alpha-spending functions, experimentation platforms enabled product teams to monitor results continuously. The error budget was no longer spent accidentally through undisciplined dashboard refreshing; it was spent deliberately, governed by a mathematical curve that protected the integrity of the platform's overall decision-making.[3]

Modern experimentation platforms process millions of events, requiring sequential testing to monitor results safely.

To understand the precise impact of these boundaries, consider the critical values required to declare significance. In a standard fixed-horizon test with a 5% alpha, the two-sided critical Z-score is 1.96. If a team uses an O'Brien-Fleming alpha-spending function and checks the data at exactly 50% of the planned sample size, the required Z-score to stop the test early jumps to approximately 2.96. This high hurdle ensures that only a genuinely massive effect can trigger an early deployment. By the time the test reaches 100% of its sample size, the required Z-score drops back down to roughly 1.97, almost identical to the uncorrected threshold, preserving the test's ability to detect smaller, marginal gains.

The Pocock boundary, by contrast, maintains a relatively flat critical value across all interim looks. If the same test is monitored with a Pocock-type spending function across five equally spaced interim analyses, the required Z-score hovers around 2.41 for every single look, including the final one. While this makes it much easier to stop the test at the 20% or 40% information fraction, it severely penalizes the final analysis. A variant that achieves a Z-score of 2.10 at the end of the experiment would be declared a statistically significant winner under a fixed-horizon design or an O'Brien-Fleming boundary, but it would be rejected as a failure under a Pocock boundary.

The alpha-spending function ensures the cumulative Type I error never exceeds the nominal 5% budget.

This trade-off highlights why the choice of an alpha-spending function is a critical business decision, not just a statistical technicality. If a company is testing a high-risk, high-reward feature—such as a complete redesign of a checkout flow—they may prefer a Pocock boundary to fail fast or win fast. If they are testing subtle algorithmic tweaks where small, incremental gains are expected, the O'Brien-Fleming boundary is vastly superior, as it protects the test's power to detect those small lifts at the final analysis. The spending function must align with the specific risk profile and expected effect size of the experiment.[3]

Ultimately, the alpha-spending function represents a triumph of statistical engineering over human impatience. It acknowledges that the desire to peek at accumulating data is inevitable, and rather than fighting that psychological urge, it builds a mathematical framework to accommodate it safely. By forcing experimenters to declare their monitoring strategy in advance and strictly rationing the Type I error budget across the information fraction, sequential testing ensures that when a dashboard flashes green, the result is driven by genuine user behavior rather than the statistical illusion of the peeking problem.[1]

14.2%
False positive rate at 5 uncorrected peeks
19.0%
False positive rate at 10 uncorrected peeks
1.96
Standard fixed-horizon Z-score (α=0.05)
2.96
O'Brien-Fleming Z-score at 50% information
2.41
Pocock Z-score across 5 equal looks

Chronology

  1. 1967

    The Greenberg Report establishes the ethical rationale for interim analyses in clinical trials.

  2. 1977

    Stuart Pocock publishes his group sequential method, featuring constant critical values across interim looks.

  3. 1979

    Peter O'Brien and Thomas Fleming introduce their boundary, which preserves statistical power for the final analysis.

  4. 1983

    K.K. Gordon Lan and David DeMets generalize group sequential methods into the continuous alpha-spending function.

  5. 2010s

    Major tech companies adopt sequential testing to solve the peeking problem in high-velocity online A/B testing.

Limits of the evidence

  • How the correlation structure of complex ratio metrics, such as revenue-per-user, affects the independent increment assumption required by standard alpha-spending functions.
  • The exact degree to which delayed conversions and cohort maturation skew interim analyses even when an alpha-spending boundary is correctly applied.
  • Whether the widespread adoption of Bayesian optional stopping will eventually replace frequentist alpha-spending in commercial experimentation platforms.

Sources

Source coverage

4 outlets

3 viewpoints surfaced

Frequentist Statisticians 40%Bayesian Practitioners 30%Product and Growth Teams 30%
  1. [1]Google CloudProduct and Growth Teams

    Sequential Testing in A/B Experiments: How It Works and When to Use It

    Read on Google Cloud
  2. [2]MicrosoftBayesian Practitioners

    Continuous Monitoring of A/B Tests without Pain: Optional Stopping in Bayesian Testing

    Read on Microsoft
  3. [3]DRIPFrequentist Statisticians

    Sequential Testing in A/B Testing: When to Stop Without Inflating Risk

    Read on DRIP
  4. [4]Factlen Editorial TeamProduct and Growth Teams

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team

Comments

Stay informed

Every angle. Every day.

Get Data & Analysis stories with full source coverage and perspective breakdowns delivered to your inbox.