Why does a fixed split waste spend on a losing ad?
Also, a fixed split is simple. Two ads get half of the traffic each in a static split, from the first day to the last. However, if one ad is clearly better by day three, the other ad keeps burning budget.
In addition, an adaptive split fixes this waste. It moves traffic toward the leading arm while the test runs, as an adaptive split. As a result, fewer views go to the loser, and the regret cost of the test falls.
Moreover, the risk of an adaptive split is moving too fast. The weights are shifted only as fast as the evidence allows.
An ad that looks good on ten views may be lucky. Therefore, a good allocation rule must learn quickly and still protect against noise. Likewise, thompson sampling is a rule built for this balance.
How does thompson sampling turn the evidence into a split?
Each ad has a posterior, and each cycle makes a posterior draw from it. A posterior draw is a random sample, which is the range of rates that the data still allows. At each cycle, the rule draws one random rate from the posterior of every ad. Besides, the ad with the highest draw wins that round.
Repeat the draw many times over.
The share of rounds that an ad wins is its probability of leading. Indeed, thompson sampling then gives that same share of traffic to the ad. These shares are applied as the traffic weights. This idea is called probability matching, and it is the heart of the rule.
Notably, two cases show how thompson sampling behaves. If one ad is clearly ahead, it wins nearly every round, and it absorbs most of the traffic. If two ads are tied, each wins about half of the rounds, and the traffic splits evenly. Read our guide to Bayesian ad testing for the model behind the posteriors.
Why must a split stay adaptive and not be static?
DaletAds states this as a product rule. In fact, the allocation must not be a static fifty-fifty split. A clear leader should absorb almost all traffic, while tied arms share it evenly.
Why does a weaker ad still keep a minimum share?
Overall, a pure rule could starve an ad on early noise. A starved arm is never given a second chance. Suppose the strongest ad starts badly by chance. Importantly, it could lose all traffic, and the test would never find out.
To prevent this, DaletAds sets an exploration floor.
Also, every active ad keeps a minimum weight, which the code calls the warmup weight. The runner-up in particular keeps its arm weight above the warmup weight, so the leading arm is found quickly.
In addition, the exploration floor is a small tax. It costs a little spend on weak ads. In return, it protects the test from a wrong early verdict. Moreover, it keeps evidence flowing for every ad that is still in the race.
What does the hierarchical prior add to early rate data?
Early data is thin in most tests. With ten views, one lucky response can double a rate. Therefore, DaletAds uses a hierarchical prior, which pulls early estimates toward known base rates.
Likewise, this pull is strong at the start and weak later. A hierarchical prior is a shared belief about ad rates, and it gives a weak start a fair chance. After many samples, the data outweighs the prior. In the first few hundred views, however, the hierarchical prior keeps a lucky streak from looking like a star.
Besides, the hierarchical prior and the exploration floor serve the same purpose. Both protect thompson sampling from early noise. A shrunk estimate is calmer than a raw one. Indeed, both also fade in importance as real samples accumulate.
Why does DaletAds avoid a Top-Two variant of the rule?
A known variant, called Top-Two Thompson sampling, splits traffic between the two leading ads. With the common mixing weight of one half, a test with one champion and one challenger splits about fifty-fifty. Notably, that holds no matter how far ahead the leader is.
DaletAds rejects this behavior on purpose, and it keeps plain thompson sampling. The common case is one champion and one lone challenger, and a static split there contradicts the product rule. For that reason, the code uses the plain rule with a floor and a prior instead.
How do traffic weights become whole numbers on each cycle?
A platform needs clear numbers, not probabilities, so thompson sampling must end in traffic weights. DaletAds converts the chances into integer weights from 1 to 100. In fact, the weights sum to 100 for each cycle.
Every active ad is at or above the exploration floor. Each weight is checked against that floor. Overall, the weight table is then easy to apply and easy to audit. Anyone can read each arm weight, and anyone can check that it sums to 100.
Because the split is adaptive, the planned share of each ad changes over time. A downstream check must therefore compare observed traffic with the planned weights, and not with an equal split. Our article on sample ratio mismatch explains that check.
What should a team watch when traffic follows the evidence?
Adaptive splits change what you can read from raw counts, and thompson sampling is no exception. An ad that gets extra traffic will collect extra samples. Therefore, compare ads by their rates and probabilities, and not by totals.
Also keep the stopping rule in view. The minimum samples and the confidence bar still decide when a winner is named. Our guide to ad test sample size explains those limits. In addition, a rollback rule can cut a harmful ad, as described in ad test rollback rules.
Finally, do not treat the traffic weights as a promise. DaletAds publishes no promised lift from adaptive allocation. Measure your own results, and compare them with a plain split on a small test first.
How can a team try the idea on a small test?
Follow this short list for a first trial:
- Pick one low-risk element, such as a headline.
- Set a clear metric and a time limit.
- Run the test with two challengers.
- Watch how the weights move over several cycles.
- Compare the result with a plain split.