What is a sample ratio mismatch (SRM)?▾
A sample ratio mismatch occurs when the actual traffic split in an A/B test does not match the intended allocation. For example, if you configured a 50/50 split but observe 52% in control and 48% in the variant, there may be a systematic issue causing uneven assignment. SRM is detected using a chi-squared goodness-of-fit test, and it signals that your experiment results may be unreliable.
Why does SRM matter for A/B testing?▾
SRM is a critical data quality check. When traffic is not split as intended, it often means something is systematically different between your groups — for example, certain users may be filtered out of one variation. This breaks the fundamental assumption of random assignment and can lead to biased results, making your lift estimates and p-values unreliable.
What are common causes of sample ratio mismatch?▾
Common causes include: bot filtering that disproportionately affects one variation, redirect-based implementations that lose users, browser caching serving stale assignments, bucketing bugs in the assignment logic, interaction effects with other concurrent experiments, and differences in page load speed between variations causing higher bounce in one group.
What p-value threshold should I use for SRM detection?▾
The standard threshold for SRM detection is p < 0.01, which is stricter than the typical p < 0.05 used for experiment results. This lower threshold is appropriate because SRM is a data quality check — you want to be very confident there is a real mismatch before invalidating experiment results. Some teams use p < 0.001 for even more conservative detection.
How do I fix a sample ratio mismatch?▾
First, identify the root cause by examining your assignment logic, checking for bot filtering differences, reviewing redirect implementations, and looking at timing of the mismatch. Common fixes include: ensuring consistent assignment before any user-facing changes, applying bot filters equally across variations, fixing caching headers, and verifying your randomization algorithm. You should restart the experiment after fixing the underlying issue rather than continuing with biased data.