Sample ratio mismatch (SRM) occurs when the actual traffic allocation in an A/B test differs significantly from the intended allocation.
A test with SRM is invalid for decision-making. Do not use its results to make decisions until you identify and resolve the underlying issue.
For example, a test configured with a 50/50 split might have an actual allocation of 48% and 52%, indicating SRM.
How to identify SRM
SRM is identified by comparing the expected traffic allocation with the actual traffic allocation and determining whether the difference is larger than would be expected by chance.
A p-value below 0.01 is commonly used as the threshold for identifying SRM. If the p-value is below 0.01, the test has SRM.
You can use an external calculator, such as the Sample Ratio Mismatch (SRM) Checker, to evaluate your allocation data.
When to check for SRM
Check for SRM whenever you review the results of an A/B test.
We recommend making SRM checks part of your standard experiment review process. This helps ensure that the observed results reflect user behavior rather than a tracking or implementation issue
What causes SRM?
In most cases, SRM is caused by an implementation or data collection issue rather than the traffic allocation mechanism.
The specific causes vary, so there is no single troubleshooting process that applies to every case. If SRM is detected, investigate the implementation and tracking setup to determine why the observed allocation differs from the intended allocation.
Example: Missing impression reporting
One possible cause of SRM involves API-based implementations.
When the choose call includes:
{
"is_implicit_impression": false
}the system allocates users to variations but does not automatically report an impression. In this configuration, the integration must report impressions separately.
If impressions are not reported correctly, the observed distribution can differ from the allocation distribution, even though users were allocated correctly. This can result in SRM and unreliable test data.
What to do if SRM is detected
If SRM is detected:
- Stop using the test results for decision-making
- Investigate the underlying cause
- Fix the implementation or tracking issue
- Start a new test after the issue is resolved
Because the source of SRM varies, the investigation should be performed on a case-by-case basis.
If you cannot determine the cause, review the implementation and tracking setup to ensure that user allocation and impression reporting are functioning correctly.