DaletGuard supports civilians affected by armed conflict through Families Beyond War. All sides, no political affiliation. About our humanitarian work

Sample Ratio Mismatch in Ad Experiments

A sample ratio mismatch happens when the traffic of an experiment does not split the way that you planned it. You schedule a 50/50 test between two ad headlines, and after one week one headline has a far larger share. That gap is too large to be chance, so delivery, tracking or the traffic split went wrong in that test. It sounds like a small technical issue, but it is not, because the two groups are no longer truly alike. Therefore, any winner you read from that data may be an artifact, not a real effect of the ad change.

This article explains what a sample ratio mismatch in ad tests is and why it happens. Next, it shows how to run a sample ratio mismatch check and what to do after an alert.

Our guide to paid media management places this check among other testing habits. Moreover, it shows how DaletAds runs the check in every experiment cycle.

Illustration of A and B cards, linechart, signpost for sample ratio mismatch
Key takeaway

A sample ratio mismatch means traffic did not split the way the test planned. When it happens, the result cannot be trusted, however strong it looks. Check the split with a chi-square test before reading any winner, and find the cause before you rerun.

Why does a sample ratio mismatch void a test result?

A test works because the groups differ only in the one thing you changed. Indeed, random assignment makes them alike in everything else. However, when traffic leaks from one group, that promise breaks.

Microsoft Research gives a memorable example. For example, in one of its tests, a change seemed to hurt engagement. In fact, some of the most active users had been removed from one group. Thus, the result reversed once the cause was found.

Therefore, the lesson is direct. Do not trust a test with a sample ratio mismatch until you find the root cause. The Microsoft Research article on diagnosing it (opens in new tab) also notes that missing users are rarely random. Notably, they are often the users most affected by the change.

So a failed sample ratio mismatch test does not just add noise. It adds bias in a direction that you cannot predict. As a result, invalid test results look just as clean as valid ones.

Which causes of a skewed split show up in ad tests?

Paid media tests have their own sample ratio mismatch causes. These are the usual suspects:

  • Platform delivery: Ad platforms optimize delivery while a test runs. One variant may win extra auctions, so it gets a larger share of impressions than planned.
  • Policy review: If one ad is held in review for longer, it starts serving late.
  • Tracking gaps: A broken tag or redirect on one landing page drops visits for that group only.
  • Uneven edits: Someone pauses or edits one variant in the middle of the test.
  • Bot filtering: Filters remove traffic unevenly when one variant attracts extra automated clicks.
  • Ramp-up mistakes: Starting one arm later than the other skews the totals.

Each cause has a different fix. Therefore, the first job is not to rerun the test. It is to find the traffic split mismatch and its cause.

How does a chi-square test find a broken traffic split?

The standard sample ratio mismatch detection method is a chi-square test. Specifically, it is a goodness-of-fit test. Next, it compares the counts you observed in each group with the counts you expected from the planned traffic split.

First, a very small p-value means that the gap is unlikely to be chance. Besides, the threshold should be strict. The platform of Microsoft uses a p-value below 0.0005. Therefore, false alarms stay rare, and people still pay attention when the alarm sounds.

DaletAds campaigns across platforms screen
For example, the campaign list: every platform in one model, and each new campaign goes to the queue.

How do we set the counts for an adaptive test?

Adaptive allocation needs one extra step. Notably, methods such as Thompson sampling shift traffic toward stronger variants on purpose. So the expected counts must come from the scheduled traffic split of the allocator, not from an even split. Otherwise, every experiment allocation mismatch alert would be false.

In other words, adaptive allocation tests need their own expected counts. In addition, DaletAds runs the chi-square test with a default alpha of 0.0005. If the check fails, the decision of that cycle is voided. As a result, no winner is declared from a split that did not run as planned.

Also, the Bayesian ad testing page shows where the check sits in an experiment cycle. That page covers adaptive allocation in depth.

What should you do when the check finds a problem?

A sample ratio mismatch alert is a stop sign, not a detour. So treat it that way. Work through these steps in order:

  1. Pause decisions: Do not promote either variant while the cause is unknown.
  2. Compare timelines: Find when the traffic split started to drift.
  3. Check delivery and review status: Look for a held or edited ad.
  4. Check tracking: Test the landing page tag in every variant.
  5. Fix and restart: Rerun from a clean start rather than patching old data.
  6. Record the cause: Next time, you check that cause first.

Severity and direction matter too. Indeed, a mismatch that favors the variant that is ahead deserves extra suspicion. Several mismatches in a row often point to a shared pipeline problem.

What does a quick example of the check look like?

First, suppose a 50/50 test reaches 20,000 impressions. Next, you expect about 10,000 per arm. If one arm shows 10,080 and the other shows 9,920, the gap is small and likely chance.

For example, if one arm shows 10,600 and the other shows 9,400, the chi-square test flags it clearly. The numbers in this sample ratio mismatch example are round figures that show the point. Overall, the size of the gap matters relative to the total, not the raw difference alone. A sample ratio mismatch test reads counts, not feelings.

How do you make the check a routine part of tests?

The safest place for the check is inside the test system, before any result is shown. In fact, if people must remember to run it by hand, it will be skipped in a busy week. Also, make that check visible to everyone. The test dashboard should show the traffic split status beside the probability that each variant leads.

Moreover, reports for leaders should say whether the sample ratio mismatch check passed. An adaptive allocation test needs the same check, with adaptive allocation counts as the expected values. Automated suggestions deserve the same rule, which is the theme of our article on AI ad optimization oversight. For reporting that keeps test results apart from simple trends, see cross-channel ad reporting.

For instance, an analyst runs a body copy test on a social platform. On day four, the sample ratio mismatch alert fires. The analyst finds that one variant was held in policy review for a day. Next, the analyst fixes the wording, restarts the test and notes the cause in the log.

Why should you trust the split before you trust a winner?

A sample ratio mismatch is one of the few test problems that you can detect cheaply and reliably. Besides, a chi-square test against the planned traffic split takes seconds. Notably, skipping it can cost a quarter of decisions based on biased data.

First, check the split before you read the result. Treat a failed check as a reason to investigate, not as a number to explain away. Indeed, DaletAds voids the decision of a cycle when the check fails, even under adaptive allocation. For the terms used in this article, see our paid media glossary.

A diagram with the topic at the centre and four connected parts: Traffic split, Causes, Approval queue.

Questions and answers on this topic from the product team

What counts as a sample ratio mismatch?

It is a statistically significant gap between the traffic each variant received and the traffic you scheduled. A small wobble is normal, but a gap that a chi-square test flags at a strict threshold is not. Microsoft Research describes it as a sign that the experiment did not run as designed.

Can I still use results from a test with a mismatch?

Not until you know why it happened, because the missing or extra traffic is rarely random. Often it is exactly the users most affected by the change, so the comparison is biased in ways you cannot fix afterwards. Find the cause, fix it and rerun, and treat the old numbers as a clue only.

Why use such a strict chi-square test threshold?

The check runs often, on many tests and many cycles, so a loose threshold would raise false alarms all the time and teams would learn to ignore them. A strict threshold, such as a p-value below 0.0005, flags only clear imbalances. That keeps the alarm rare enough that people take it seriously.

Does adaptive allocation cause a traffic split mismatch?

Not by itself, because adaptive methods change the split on purpose and send extra traffic to stronger variants. The check must compare observed traffic with the split that the allocator actually scheduled, not with an even split. Comparing against the wrong expectation would flag every adaptive test as broken.

See how DaletAds fits the providers your team uses today

Book a short meeting for a walkthrough with your own providers in mind, or join an in-person class to learn the method first.