Sample Ratio Mismatch: check the data before trusting your A/B result
Understand SRM calculations and diagnose assignment, event collection, and report selection before interpreting paywall conversion or revenue gains.
Article summary
- Random 50/50 assignment does not produce exactly equal groups; volume affects interpretation.
- SRM tests user counts against expected allocation, not conversion differences.
- Check assignment, event collection, and report inclusion separately.
- Initially balanced groups can become selected after treatment-influenced filters.
- An alert needs diagnosis; no alert does not certify the entire experiment.
Summarize this article with
Your paywall variant shows a significant 15% uplift, but you planned 50/50 and counted 5,200 users in A versus 4,800 in B. Is that random variation or missing participants?
Sample Ratio Mismatch (SRM) flags counts that depart from expected allocation more than the chosen randomisation model would ordinarily predict. It does not identify the winner; it asks whether the comparison is trustworthy. All scenarios are fictional, not client incidents.
1. SRM and conversion ask different questions
| Check | Question |
|---|---|
| Participant allocation | Are counts compatible with the intended split? |
| Performance comparison | Do outcomes differ on the selected metric? |
Higher conversion cannot repair a biased comparison. Microsoft Research describes SRM diagnosis across assignment, execution, collection, and analysis. Ask who received a variant and who survived into the report; that difference can matter as much as conversion.
Newsletter
Once a week.
Last issue
We opened 10 apps to see how they sell a subscription.
+534 people read us each week
2. The same 52/48 split means different things at different volumes
Illustrate with a chi-square goodness-of-fit test, one degree of freedom, no continuity correction, independent users, and fixed 50% assignment probabilities:
| A | B | Split | Chi-square | Approximate p-value |
|---|---|---|---|---|
| 520 | 480 | 52/48 | 1.6 | 0.206 |
| 5,200 | 4,800 | 52/48 | 16 | 0.0000633 |
The larger sample is much less compatible with the expected allocation model. A p-value is not the probability the system is broken: it measures an at-least-as-extreme discrepancy under the null assumptions.
Prespecify monitoring thresholds; they need not equal the 5% performance threshold. Repeated checks and many breakdowns require false-alarm management.
3. How the calculation works
At 50/50 among 10,000 users, expect 5,000 per arm:
Chi-square = sum[(observed − expected)² / expected].
200² / 5,000 + (−200)² / 5,000 = 16.
Two categories with prespecified probabilities give one degree of freedom. SciPy’s documentation describes conditions; expected counts must support the approximation. At small volumes, use an appropriate method such as an exact binomial test for two arms. For planned 80/20, expect 8,000/2,000—not 50/50.
4. Check assigned users before exposed users
| Stage | A | B |
|---|---|---|
| Assigned users | 5,000 | 5,000 |
| Recorded paywall viewers | 4,000 | 3,000 |
| Buyers | 320 | 300 |
Viewer-only conversion is 8% versus 10%, apparently +25% for B. Assigned-user conversion is 6.4% versus 6%, −6.25% relatively for B. These are descriptive, not established significant differences.
If B prevents reaching the paywall, excluding those people hides harm. Or events may be missing rather than people abandoning. The table locates investigation, not the explanation.
Assignment is balanced here; filtered exposure is not. This does not prove randomisation failed. Primary analysis should include users assigned before treatment can alter their journey; properly constructed exposure analyses can complement it.
5. Four places to investigate
Assignment
Check unit: user, account, device, or session. Reassigning each app open breaks a user-level protocol. Anonymous-to-account reconciliation can duplicate users, lose assignments, or misattribute payments.
Variant execution
B’s extra content could fail before display-event logging, removing people from an event-based report. It may also be genuine product failure. Distinguish them; neither is solved by deleting affected participants.
Collection and joins
Check ingestion delays, app versions, duplicates, and joins. An inner join of assignment with purchases removes non-buyers. Useful transaction analysis then no longer represents the experiment’s economic population.
Dashboard filters
Completion, viewing, and clicking may be treatment-influenced. Post-treatment selection can bias groups. Predetermined country differs from subsequent purchase; record when each inclusion criterion becomes known.
6. Diagnose periods and versions without excusing results
Breakdowns can locate a faulty day, version, or platform. Record expected configuration, assigned counts, received events, and exclusions by date, then relevant versions and platforms.
These are diagnostic slices, not permission to retain only B’s winning subset. For ramp-ups, preserve allocation history and calculate expected counts under actual periods and probabilities.
Counts consistent with the ramp-up still do not justify a naive pooled performance comparison: changing allocation and traffic over time may require an analysis respecting the design.
7. Stop, repair, or restart?
| Diagnosis | Possible next step |
|---|---|
| Delayed events, assignments retained | Wait for completeness over equal periods |
| Incorrect report filter, raw data intact | Correct and document reanalysis |
| Unstable assignment or irrecoverable users | Fix mechanism; prepare a new experiment |
| Real variant-induced journey failure | Resolve incident and retain its interpretive trace |
| Changed ratio omitted from monitoring | Reconstruct design and verify effect estimation |
Reconstruction can be valid when causes and data are known; disclose it, especially after inspecting outcomes. Randomly deleting “excess” users restores equality, not missing people or causal validity. Weighting is not universal repair when selection depends on treatment response.
8. No alert does not certify everything
Both arms can be wrong equally. Symmetrically missing purchase events may not trigger SRM. Mispriced products, short follow-up, or irrelevant metrics can also coexist with balanced counts.
A/A tests help inspect the measurement chain, not guarantee future correctness. SRM complements identity, events, cohort maturity, sample sizing, and subsequent-revenue analysis.
9. Report an honest verdict
B has higher revenue in the current report, but observed counts are incompatible with planned allocation at our monitoring threshold. Performance conclusions are suspended pending diagnosis; this is not yet a reliable gain.
After resolution, document analysed populations, retained periods, and corrections’ effect. firstapp connects screens, subscriptions, and comparable data through Growth support. When figures conflict before choosing a test, a monetisation audit starts with diagnosis.
FAQ
What is SRM?
Statistical incompatibility between observed counts and expected allocation under a selected check, signalling possible assignment, execution, collection, or selection problems.
Does 52/48 always indicate a problem?
No. With 1,000 users it may be compatible with 50/50 randomisation; with 10,000 it is much less usual. Volume and protocol matter.
Does SRM test conversion significance?
No. It tests counts and allocation. Significant conversion or revenue cannot neutralise a data-quality alert.
Can we analyse only paywall viewers?
It depends on the protocol. If treatment affects reaching the paywall, exposure selection may bias results. Assign before divergence and retain global effects in primary analysis.
Should excess users be deleted?
No. Equal counts do not explain imbalance. Investigate missingness, assignment, and filters first.
Does no SRM mean a reliable test?
It removes one warning, not all concerns. Metrics, tracking, identities, follow-up, and statistical methods still need verification.