Inferensys

Glossary

Online Controlled Experiment

A randomized experiment conducted on live production traffic where users are randomly assigned to control or treatment groups to measure the causal impact of a software change on key metrics.
Research scientist tracking AI experiments on laptop, experiment results visible, casual lab environment.
CAUSAL INFERENCE METHODOLOGY

What is an Online Controlled Experiment?

An online controlled experiment is a randomized experiment conducted on live production traffic to measure the causal impact of a software change on key metrics.

An online controlled experiment is a randomized experiment conducted on live production traffic where users are randomly assigned to a control group or one or more treatment groups to measure the causal impact of a software change on key metrics. Unlike offline evaluation, this methodology isolates the effect of a specific variable—such as a new recommendation model or UI element—from external confounders by ensuring the only systematic difference between groups is the intervention itself. The approach relies on randomization to balance known and unknown covariates, enabling valid statistical inference through hypothesis testing.

The infrastructure supporting these experiments requires a randomization unit (typically a user ID or device ID), a metrics pipeline to compute aggregate statistics, and a logging system to capture exposure events. Core statistical concepts include the null hypothesis (assuming no difference between variants), p-values for significance testing, and confidence intervals to quantify uncertainty around the estimated treatment effect. Properly designed experiments also monitor guardrail metrics to detect regressions and employ sample ratio mismatch checks to validate the integrity of the randomization mechanism before drawing conclusions.

FOUNDATIONAL PRINCIPLES

Key Characteristics of a Valid Experiment

A valid online controlled experiment relies on rigorous statistical design and robust infrastructure to establish true causal relationships between a model change and observed business metrics, free from confounding biases.

01

Randomization & Independence

The cornerstone of causal inference. Users must be randomly assigned to control or treatment groups using a deterministic hashing algorithm on a stable user ID. This ensures that, on average, all known and unknown confounding covariates are balanced. A violation of the Stable Unit Treatment Value Assumption (SUTVA), known as the Interference Effect, occurs when the treatment of one user influences the outcome of another, breaking independence.

02

Statistical Power & MDE

An experiment must be adequately powered to detect a meaningful change. A Power Analysis calculates the required sample size based on:

  • Minimum Detectable Effect (MDE): The smallest lift you care about.
  • Statistical Power: Typically set to 80%, representing the probability of correctly rejecting a false null hypothesis.
  • Significance Level (Alpha): Usually 5%. Insufficient power leads to Type II Errors (false negatives), missing real improvements.
03

Guardrail Metrics & Trustworthiness

Experiments must not sacrifice long-term health for short-term gains. Guardrail Metrics are secondary organizational checks that protect the business from unintended harm. Key trustworthiness checks include:

  • Sample Ratio Mismatch (SRM): Verifying the actual traffic split matches the design to detect buggy randomization.
  • Data Leakage: Ensuring no future information contaminates the training data.
  • Peeking Problem: Avoiding the inflation of false positives by not stopping tests early based on interim significance.
04

Hypothesis Testing Framework

A structured statistical framework is required to draw conclusions. The process begins by assuming the Null Hypothesis (no difference exists). A P-Value is calculated to measure the probability of observing the data if the null were true. If the p-value falls below the significance threshold, the null is rejected. To control for multiplicity when testing many metrics, adjustments like the Bonferroni Correction or False Discovery Rate (FDR) control are essential to prevent Type I Errors (false positives).

05

Long-Term Impact & Holdouts

Standard A/B tests measure short-term impact but miss novelty effects or long-term user fatigue. A Holdout Group is a stable, permanent subset of users excluded from all experimental treatments. This group serves as a global baseline to measure the aggregate, cumulative causal impact of all model changes over months or years, preventing the tragedy of the commons where individually winning tests degrade the overall ecosystem.

06

Covariate Balance & Shift

Even with randomization, finite samples can be imbalanced. Stratified Sampling ensures critical segments are proportionally represented. During analysis, Covariate Shift must be monitored—if the input feature distribution diverges from the training set, the model's performance metrics become unreliable. Techniques like propensity score matching can adjust for residual imbalances, but they cannot replace proper randomization.

EXPERIMENTATION FUNDAMENTALS

Frequently Asked Questions

Clear, technically precise answers to the most common questions about designing, running, and interpreting online controlled experiments for AI-driven personalization.

An online controlled experiment is a randomized experiment conducted on live production traffic where users are randomly assigned to a control group or one or more treatment groups to measure the causal impact of a software change on key metrics. Unlike offline evaluation, it captures real user behavior in a genuine production environment. The mechanism relies on a randomization engine that deterministically assigns user IDs to variants based on a hash of the user identifier and a seed for the experiment layer. The control group receives the existing experience (often called the "holdback" or "baseline"), while the treatment group receives the new model, feature, or algorithm. A metric pipeline then computes summary statistics—such as the mean, variance, and sample size—for each group on North Star Metrics and guardrail metrics. Statistical tests, typically a Student's T-Test for continuous metrics or a Chi-Squared Test for binary metrics, determine whether the observed difference is statistically significant. The experiment runs for a pre-calculated duration based on a power analysis that specifies the minimum detectable effect and required sample size. Critically, experimenters must avoid the peeking problem by not stopping the test early based on interim p-values, which inflates the Type I Error rate. The output is a causal estimate of the treatment effect, expressed as a percentage delta with a confidence interval.

CAUSAL INFERENCE METHODOLOGY COMPARISON

Online Controlled Experiment vs. Alternative Methods

A comparison of randomized online controlled experiments against quasi-experimental and observational methods for measuring the causal impact of software changes.

FeatureOnline Controlled ExperimentPre-Post AnalysisCausal Impact (Synthetic Control)

Randomization of Treatment Assignment

Controls for Confounding Variables

Requires Holdout Group

Sensitive to External Time-Based Shocks

Minimum Sample Size Required

10,000+ users per variant

N/A (single cohort)

100+ time periods

Typical False Positive Rate Control

Precise (via p-value threshold)

Uncontrolled

Moderate (Bayesian posterior intervals)

Real-Time Decisioning Compatibility

Primary Use Case

Feature and model validation

Post-hoc campaign measurement

Macro-level intervention impact

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.