An A/B test needs about $16\sigma^2/\Delta^2$ users per group to detect a difference $\Delta$ with 80 percent power at the 0.05 level: for a 40 percent click rate, 37,824 for a one-point gain and 942,643 for 0.2 points. Clicks are biased by position: in a simulation on Cranfield with examination probability $1/r$, clicks fall more than tenfold from rank 2 to rank 10 while relevance falls about fourfold. Team-draft interleaving compares two rankings within one results page, and a click that ignores content favors neither. Chapelle and colleagues (2012) found it needed one to two orders of magnitude fewer queries; in our simulation it needed 29,000 impressions against 79,000 when users differ. It can err when rankings share documents.
The stemmer comparison of the previous article was decided by assessors' judgments on 225 Cranfield queries, and an effect of its size would need about 158 judged topics to detect reliably. A search engine with millions of users has a different source of evidence: how real people respond to its results. If a new ranking function leads users to find what they want sooner and come back more often, it is better for those users, whatever the assessors would have said. This article shows how user behavior can decide between two systems, and how many users that takes.
Online evaluation compares systems by exposing them to live traffic and measuring behavior. A test collection measures a system against fixed judgments made by assessors; online evaluation measures something closer to what a service actually cares about. It is how large search services and online stores decide whether to ship a change.
Here is the route. First we look at the A/B test and work out how many users it needs, with the sample-size formula of significance testing. Then we ask what clicks do and do not mean, and measure position bias in a simulation on Cranfield. Next we trace team-draft interleaving through every coin flip, see a case where it errs, and find where its sensitivity comes from, using the stemmer again. Finally we turn to evaluation from logged data and to how online and offline evaluation fit together.
A/B testing
The simplest design is the controlled experiment, or A/B test. Users are randomly assigned to two groups. The control group sees the current system, the treatment group sees the new one, and the groups' behavior is compared over days or weeks. Random assignment ensures that any difference in behavior beyond chance is caused by the change, the same logic as a clinical trial (Kohavi, Longbotham, Sommerfield, and Henne, 2009). Randomized Experiments proves what random assignment guarantees and reads A/B tests and interleaving as randomized designs.
Typical metrics for search include:
- Click rate: the fraction of queries with at least one click on a result. (Click-through rate more often means clicks per result shown, and definitions vary.)
- Time to first click, and rank of first click: how quickly users find something worth opening.
- Reformulation rate: how often users immediately rewrite a query, a sign the first results failed.
- Satisfied clicks: clicks after which the user stays on the page for a while, rather than returning at once. They are often defined by a dwell-time threshold, a fixed number of seconds chosen by the service. Fox and colleagues (2005) found that behavioral measures were associated with users' own satisfaction ratings; their best models for individual pages combined clickthrough, time spent on the search result page, and how the user left a result or ended the session.
- Session and long-term metrics: queries per session, sessions per user, and whether users come back.
A/B tests need large samples. Behavioral metrics are noisy, users differ greatly from one another, and the effect of a single ranking change is usually small. The calculation below puts numbers on this: detecting a change of 0.2 points in a 40 percent click rate takes nearly a million users in each group.
How many users?
How large an experiment must be follows from the same reasoning as the topic-count calculation in significance testing, with users in place of topics. Suppose the metric is a click rate. Each user in a group of $n$ either clicks (1) or does not (0), with probability $p$. One user's outcome has variance $\sigma^2 = p(1 - p)$, and the group's observed rate has variance $\sigma^2/n$. The difference between the two groups' rates, the quantity tested, has variance $2\sigma^2/n$ when the groups are the same size.
- The test. Declare a difference when the observed difference is more than $z_{1-\alpha/2}$ standard errors from zero: 1.96 for a two-sided test at $\alpha = 0.05$.
- The power. If the true difference is $\Delta$, the observed difference is centered on $\Delta$. It clears the threshold with probability $1 - \beta$ when $\Delta$ sits $z_{1-\beta}$ standard errors beyond it, that is, when $\Delta = (z_{1-\alpha/2} + z_{1-\beta}) \sqrt{2\sigma^2/n}$. For 80% power, $z_{0.8} = 0.842$.
- Solve for $n$:
$$n = \frac{2 (z_{1-\alpha/2} + z_{1-\beta})^2 \sigma^2}{\Delta^2} = \frac{2 (1.960 + 0.842)^2 \sigma^2}{\Delta^2} = \frac{15.7\, \sigma^2}{\Delta^2} \approx \frac{16\, \sigma^2}{\Delta^2}.$$
The last form is the rule of thumb Kohavi, Longbotham, Sommerfield, and Henne (2009, §3.2, equation 2) give for 95% confidence and 80% power, with $n$ the number of users in each group.
For a click rate of 40 percent, $\sigma^2 = 0.4 \times 0.6 = 0.24$. Detecting an improvement of one percentage point, to 41 percent, needs $16 \times 0.24/0.01^2 = 38{,}400$ users per group by the rule. The rule uses one variance for both groups and rounds 15.7 up to 16. The exact formula keeps the unrounded constant and each group's own variance, $p_0(1 - p_0)$ for the control and $p_1(1 - p_1)$ for the treatment, whose sum replaces $2\sigma^2$:
$$n = \frac{(z_{1-\alpha/2} + z_{1-\beta})^2 \,\bigl(p_0(1 - p_0) + p_1(1 - p_1)\bigr)}{\Delta^2} = \frac{7.849 \times (0.2400 + 0.2419)}{0.01^2} = 37{,}824.$$
Example (half the difference, four times the users). Detecting a one-point gain needs about 38,000 users per group, and detecting a half-point gain needs about four times as many: 153,600 by the rule, 151,005 by the exact formula. The script tools/experiments/online/online_examples.py computes the table and checks it by simulation:
| Improvement to detect | Relative change | Users per group (exact) | Rule of thumb |
|---|---|---|---|
| 2 points (40% to 42%) | 5% | 9,489 | 9,600 |
| 1 point | 2.5% | 37,824 | 38,400 |
| 0.5 points | 1.25% | 151,005 | 153,600 |
| 0.2 points | 0.5% | 942,643 | 960,000 |
The required sample grows with the inverse square of the difference. Halving the difference to detect quadruples the users, and detecting a 0.2-point change takes nearly a million users in each group. This is why a large service can detect a change too small for a smaller one to see. It is also why Kohavi and colleagues stress choosing metrics with low variance (§3.2). Power Analysis for Evaluations derives the same calculation for comparisons of language models, where both models answer the same questions and pairing reduces the variance.
The simulation confirms the design. In 30 runs of 2,000 experiments with 38,400 users per group and a true difference of one point, the test detected it in 80.5 percent of experiments (median; IQR 80.0 to 81.1). With no true difference it declared one in 5.0 percent, as designed.
The formula treats each user as one independent observation. Often the unit randomized is the user but the metric is computed per query. A user's queries are then correlated, and the variance must be computed per user, not per query, or the test will be overconfident. It also assumes the test is run once, at the planned size: checking the result as users arrive and stopping at the first significant difference declares a difference that is not there far more often than 5 percent of the time (Random Walks and Martingales, section "Peeking at an A/B test, measured").
The formula also assumes the metric means what it is meant to. For clicks, that holds only in part.
What behavior means
Behavior is evidence about relevance, but indirect and biased evidence:
- Position bias. Users click higher results more often regardless of their quality, as described in relevance. A raw click count largely measures where results were placed.
- Snippet attraction. A click shows that the snippet looked promising, not that the page was good. A misleading snippet attracts clicks and disappoints.
- Good abandonment. A query with no clicks may mean failure, or it may mean the answer was on the results page itself, in a snippet or an answer box. Li, Huffman, and Tokuda (2009) found such good abandonment to be common, especially on mobile devices. A metric that counts every no-click query as a failure penalizes systems for answering questions directly.
- Metric gaming. A change can raise a metric without helping users, for example by making snippets more enticing but less accurate. Metrics need guardrails, secondary metrics that would reveal such side effects.
Because of these effects, online metrics are chosen and validated carefully. A common check is that they agree with explicit user satisfaction ratings in smaller studies.
Position bias, measured and modeled
It is tempting to read a click as a vote: if the first result gets more clicks than the second, it must be better. Joachims, Granka, Pan, Hembrooke, and Gay (2005) tested that reading with an eye tracker and a deliberate manipulation. Students searched with Google while their gaze was recorded. The abstracts at ranks 1 and 2 were viewed almost equally often, yet the first was clicked substantially more (§4.1).
In one condition the top two results were swapped before display. Users still favored whatever appeared first. In the swapped condition, consider the searches where the second abstract had been judged more relevant and the user clicked exactly one of the top two. There, 10 of 17 clicks went to the first, less relevant, abstract (§5.2.1, Table 3). The authors called this trust bias: users rely on the engine's ordering as well as on what they read.
The usual way to reason about this is a model with two factors. A user clicks a result only if they examine it, which depends on its position, and if it looks attractive once examined, which depends on the document:
$$P(\text{click at rank } r) = P(\text{examine rank } r) \times P(\text{attractive} \mid \text{document}).$$
Models of this kind are the basis of the click models described below. To see what such a model does to click counts, a simulation on Cranfield (tools/experiments/cranfield/interleaving_sim.py) applies one to BM25's top ten for each of the 225 queries. For illustration, and without fitting any log, it assumes:
- an examination probability of $1/r$ at rank $r$;
- attractiveness of 0.9 for documents of Cranfield grade 1 or 2, 0.6 for grade 3, 0.3 for grade 4, and 0.05 for nonrelevant documents.
The fraction of relevant results falls by a factor of about four from rank 2 to rank 10, but simulated clicks fall by a factor of more than ten. (Rank 1 has fewer relevant results than rank 2 for a Cranfield-specific reason. For 91 of the queries, BM25's first result is the document each query marks with the code −1, probably the paper the question was written from, which the judgments do not count as relevant; see test collections.) A raw click count would give the top result more than twenty times the clicks of the tenth. Yet the share of relevant results at the two ranks differs by a factor of three.
Any metric built from clicks has to correct for the examination factor. It can model the factor, or, as interleaving does, arrange the experiment so that the factor affects both systems equally. Learning from clicks takes the first route, with the examination model above and the reweighting of the next section, to train a ranker as well as to evaluate one. Clicks also yield preferences, a result clicked over one skipped above it, which Ranking SVM uses as training pairs, following Joachims's earlier paper on clickthrough data.
Interleaving
A/B tests compare groups of users, so differences between users add noise. Interleaving compares two rankings within a single user's results page. For each query, the rankings from systems A and B are merged into one list shown to the user, and clicks on results contributed by each system are credited to that system. Each impression is a direct comparison by the same user on the same query, which removes most of the variation between users.
In team-draft interleaving (Radlinski, Kurup, and Joachims, 2008), the merge works like picking teams. In each round a coin flip decides which system picks first. Each system then adds its highest-ranked result that is not already in the merged list, and that result is credited to the system's team. Here is an example, with the rankings Chapelle et al. (2012) use to illustrate the method:
System A ranks: a, b, c, d
System B ranks: b, e, a, f
| Round | Coin flip | First pick | Second pick |
|---|---|---|---|
| 1 | A first | A adds a | B adds b |
| 2 | B first | B adds e | A adds c (its next result, b, is already shown) |
| 3 | A first | A adds d | B adds f (its next result, a, is already shown) |
The user sees a, b, e, c, d, f. If the user clicks b and e, both credited to B, then B wins this impression. Over many queries, the system that wins more impressions is preferred.
Because each comparison is made within one user's single interaction, interleaving is far more sensitive than an A/B test. Chapelle, Joachims, Radlinski, and Yue (2012) found that in most comparisons it needed one to two orders of magnitude fewer queries than click metrics measured on separate groups of users. Its limitation is that it gives only a preference between two rankers, not an absolute measurement of either. It also cannot compare changes that affect more than the ranking, such as a new page layout.
Every coin sequence
The coin flips are what make the method fair. With three rounds there are only $2^3 = 8$ sequences, so they can all be listed (tools/experiments/online/online_examples.py). Subscripts show the team of each result:
| Coins (first picker in rounds 1, 2, 3) | Interleaved list |
|---|---|
| A A A | $a_A, b_B, c_A, e_B, d_A, f_B$ |
| A A B | $a_A, b_B, c_A, e_B, f_B, d_A$ |
| A B A | $a_A, b_B, e_B, c_A, d_A, f_B$ |
| A B B | $a_A, b_B, e_B, c_A, f_B, d_A$ |
| B A A | $b_B, a_A, c_A, e_B, d_A, f_B$ |
| B A B | $b_B, a_A, c_A, e_B, f_B, d_A$ |
| B B A | $b_B, a_A, e_B, c_A, d_A, f_B$ |
| B B B | $b_B, a_A, e_B, c_A, f_B, d_A$ |
Each list has probability 1/8. In this example the teams never change: a, c and d always belong to A, and b, e and f to B. Only the positions change. That is the point of the coins. Within each round, each team's pick is equally likely to be shown first, so neither team's results are systematically placed higher.
Credit then depends only on which results are clicked. Clicks on b and e make B win under all eight sequences; a click on a alone makes A win; clicks on a and e are a tie.
Example (a random click favors neither system). A user who ignores the content and clicks one result at random from the top $k$ of the merged list credits each system with probability exactly 1/2, for any $k$. A user who ignores the content cannot create a preference. Chapelle, Joachims, Radlinski, and Yue (2012, §3.2) give this as the property that distinguishes team-draft from the older balanced interleaving.
Why it holds. Suppose both systems still have unshown results in every round considered. Round $j$ fills positions $2j - 1$ and $2j$ of the merged list with one result from each team, and a fair coin, independent of everything else, decides which team's result takes the upper position.
- If $k$ is even, the top $k$ consists of $k/2$ complete rounds and holds exactly $k/2$ results of each team, whatever the coins. A uniformly random click lands on team A with probability $(k/2)/k = 1/2$.
- If $k = 2j - 1$ is odd, the top $k$ holds $j - 1$ complete rounds, with $j - 1$ results of each team, and the upper position of round $j$, which belongs to A with probability 1/2. The expected number of A's results is $j - 1 + 1/2 = k/2$, so again the click lands on team A with probability $(k/2)/k = 1/2$.
With a single click, the clicked result's team wins the impression, so each system wins with probability 1/2. The script confirms it by enumeration for the example's rankings at $k = 1, 2, 3, 4$ and 6.
Over an experiment, Chapelle et al. (2012, equation 4) summarize the outcomes as
$$\Delta_{AB} = \frac{\text{wins}(A) + \tfrac{1}{2}\,\text{ties}(A, B)}{\text{wins}(A) + \text{wins}(B) + \text{ties}(A, B)} - 0.5,$$
counting only impressions with at least one click. If A wins 40 percent of those impressions, B 30 percent, and 30 percent are ties, $\Delta_{AB} = 0.40 + 0.15 - 0.5 = 0.05$: A is preferred.
A case where team-draft errs
Fairness to a random user does not guarantee the right answer for real ones. Chapelle et al. (2012, §3.2) construct an ambiguous query. Of its users, 49 percent want document a, 49 percent want b, and 2 percent want c, and each user clicks the first result that satisfies them. Ranking $R_1 = (a, b, \dots)$ satisfies 98 percent of users in its top two; $R_2 = (b, c, \dots)$ satisfies 51 percent. Enumerating the coin flips:
- If $R_1$ picks first, the list starts $a_1, b_2$: b goes to $R_2$, because $R_2$ picks it before $R_1$ reaches it.
- If $R_2$ picks first, it starts $b_2, a_1$.
Either way a is credited to $R_1$, and b and c to $R_2$. The 49 percent who want a vote for $R_1$. The 49 percent who want b, plus the 2 percent who want c, vote for $R_2$, which wins 51 percent of the comparisons although it serves users far worse. The two rankings share a document that each would place in the top two. The credit for it goes to whichever ranking claims it, not to the one that placed it best. The demo's third example reproduces this.
Where the sensitivity comes from
The same click simulation on Cranfield shows where interleaving's advantage comes from, and why its size varies. System A is BM25 with stemming and B is BM25 without it: the stemmer comparison of significance testing, where A is better on the judgments (MAP 0.307 against 0.282). Each simulated impression is a random query and a user who clicks under the position model above.
- The A/B test sends half the impressions to each system and compares clicks per query with a t-test.
- Interleaving shows every impression a team-draft list of the two top tens, and tests whether A wins more impressions than B.
For each design the script estimates the mean and variance of its per-impression statistic from 400,000 impressions. It computes the impressions needed for 80 percent power at 0.05 with the formula from the A/B section. It then confirms by simulating experiments of that size: in 30 runs of 100 experiments, power came out between 0.78 and 0.81, and the false-positive rate with two identical systems at 0.04 to 0.05.
Example (users who differ hurt the A/B test, not interleaving). Suppose users differ in how much they click: some click almost everything they examine, others very little. The A/B test suffers from that variation and interleaving does not:
| Simulated users | A/B test | Interleaving | Ratio |
|---|---|---|---|
| All alike | 44,000 impressions (IQR 40,000 to 49,000) | 36,000 (33,000 to 41,000) | 1.2 |
| Differ in how much they click | 79,000 (71,000 to 94,000) | 29,000 (26,000 to 34,000) | 2.7 |
The figures are medians over 30 repetitions of the estimate, rounded to the nearest thousand, with interquartile ranges. In the first row the ranges overlap, so the advantage there is small and uncertain; in the second they are far apart.
In the second row each user's click probabilities are multiplied by a factor drawn from a gamma distribution with mean 1 and variance 2. This variation inflates the variance of clicks per query and nearly doubles the A/B test's requirement. Interleaving's requirement did not grow (it fell slightly). A user who clicks a lot does so on both systems' results within the same list, and the comparison is made inside that list.
With identical users, interleaving gains little here, for a reason specific to these two systems. They return the same top document for 68 percent of queries. When that shared document is clicked, the credit goes to whichever team the coin let claim it, adding noise rather than information. In 56 percent of impressions neither team won, either because the user clicked nothing or because the clicks split evenly.
The size of interleaving's advantage therefore depends on how much users differ and on how different the two rankings are. Chapelle et al. (2012) found it to be one to two orders of magnitude in most comparisons on real search traffic. The simulation is not a substitute for that evidence; it shows the mechanism.
Both designs still need live traffic for every idea tested. Logs of past behavior can stand in for some of it, under a condition.
Evaluating from logs
Running a live experiment for every idea is slow, and showing users a bad ranking has a cost. Counterfactual evaluation estimates how a new ranker would have performed using logs collected while a different system was serving. This requires that the old system randomized some of what it showed.
- Replay. Li, Chu, Langford, and Wang (2011) evaluated news recommendation from logs collected while articles were chosen at random. They kept only the events in which the logged choice matches what the new policy would have chosen, and averaged the outcomes of those events.
- Reweighting. More general estimators reweight each logged outcome by the inverse of the probability that the old system showed it. The formula and the reason it works are given below.
- Click models. Probabilistic models of how users scan and click separate the effect of position from the effect of relevance. They can turn logged clicks into estimated relevance judgments or simulate user behavior for offline evaluation (Chuklin, Markov, and de Rijke, 2015).
The reweighting estimator. Here is the idea in one sentence: an outcome that the old system showed rarely stands for many occasions on which the new system would have shown it, so it is counted that many times. Suppose that on each of $n$ logged occasions the old system chose an action $a_i$ (a result, or a ranking) at random, with a known probability $p_i > 0$ of choosing the one it did, and observed an outcome $r_i$, such as a click. A new deterministic policy would choose $\pi_i$ on that occasion. The estimate of the new policy's mean outcome is
$$\hat{V} = \frac{1}{n} \sum_{i=1}^{n} \frac{r_i \cdot [a_i = \pi_i]}{p_i},$$
where $[a_i = \pi_i]$ is 1 when the logged action is the one the new policy would have taken and 0 otherwise. This is the estimator of Horvitz and Thompson (1952) for sampling with unequal probabilities.
It is unbiased, and the proof is one line per occasion. Fix an occasion, and let $q(a)$ be the old system's probability of choosing action $a$ and $\mu(a)$ the expected outcome when $a$ is shown. The term's expectation is a sum over the actions the old system might have chosen:
$$\sum_{a} q(a) \cdot \frac{\mu(a)\,[a = \pi]}{q(a)} = \mu(\pi),$$
because only the term $a = \pi$ survives and its $q(\pi)$ cancels. That is the expected outcome under the new policy. The condition is $q(\pi) > 0$: the old system must have had some chance of doing whatever the new one would do. Replay is the special case in which the old system chose uniformly among $K$ actions: every $p_i$ is $1/K$, and the estimate is $K/n$ times the sum of the outcomes over the matching events. Replay divides that sum by the number of matching events instead, which is $n/K$ on average. The price of unbiasedness is variance: a rarely shown action that matches gets a large weight $1/p_i$, so the estimate can swing on a few events. The size of the effect follows from the same sum. Write $m_2(a)$ for the expected squared outcome when $a$ is shown. One term's second moment is
$$\sum_{a} q(a) \cdot \frac{m_2(a)\,[a = \pi]}{q(a)^2} = \frac{m_2(\pi)}{q(\pi)},$$
so its variance is $m_2(\pi)/q(\pi) - \mu(\pi)^2$, and the variance of the estimate over $n$ independent occasions with the same probabilities is that divided by $n$. For a click, the outcome is 0 or 1, so $m_2(\pi) = \mu(\pi)$ and the variance of a term is $\mu(\pi)/q(\pi) - \mu(\pi)^2$. It grows as $1/q(\pi)$: halving the chance that the old system showed what the new one would show roughly doubles the number of logged events needed. In Problem 4 below it is $0.5/0.2 - 0.25 = 2.25$.
Online and offline together
Online and offline evaluation answer different questions, and organizations that can run both use both. They do not always agree. User studies have found that improvements on batch measures do not always produce better performance on real search tasks (Hersh et al., 2000; Turpin and Hersh, 2001), the gap noted in relevance.
| Offline (test collections) | Online (live users) | |
|---|---|---|
| Measures | Agreement with relevance judgments | User behavior |
| Speed | Minutes, repeatable at will | Days or weeks |
| Cost of a bad system | None | Real users see it |
| Sensitivity | Depends on judgments and topic count | Very high with interleaving |
| Reproducibility | Exact | Low: users and content change |
| Available to | Anyone with the collection | Only operators of large services |
A common practice uses offline evaluation to screen ideas cheaply and safely, then confirms the promising ones online before deploying them. Disagreements between the two are informative. They reveal either judgments that do not reflect what users value or online metrics that do not measure what they were meant to. Research outside large companies relies almost entirely on offline evaluation. That is one reason test collections and the measures in this topic remain central to the field.
Worked problems
The course text has no exercises on online evaluation, so the problems below are posed on this article's formulas and methods. The numbers are recomputed in the reference-pass block of tools/experiments/online/online_examples.py.
Problem 1 (a rarer click). A service's click rate is 20 percent. Find the number of users per group needed to detect an improvement of one percentage point with 80 percent power at the 0.05 level, by the rule of thumb and by the exact formula, and compare with the 40 percent case.
Solution. 25,600 by the rule and 25,580 by the exact formula, two thirds of what the 40 percent case needs. The variance of one user's outcome is $\sigma^2 = 0.2 \times 0.8 = 0.16$, so the rule gives $16 \times 0.16/0.01^2 = 25{,}600$. The exact formula uses both groups' variances, $0.2 \times 0.8 = 0.1600$ and $0.21 \times 0.79 = 0.1659$:
$$n = \frac{7.849 \times (0.1600 + 0.1659)}{0.01^2} = 25{,}580.$$
The same absolute difference is easier to detect at 20 percent than at 40 percent because the variance $p(1 - p)$ is smaller: $0.16/0.24 = 2/3$. Relative to the click rate, though, one point is a 5 percent change at 20 percent and a 2.5 percent change at 40 percent, so the comparison is of unequal relative effects.
Problem 2 (two rankings with the same first result). System A ranks $a, b, c, d$ and system B ranks $a, c, d, e$. Enumerate the team-draft lists of length four over the two coin flips. Then find, for a user who clicks only $a$ and for a user who clicks only $c$, the probability that each system wins the impression.
Solution. A click on $a$ credits each system with probability 1/2, and a click on $c$ credits B with probability 3/4. The four coin sequences, with the team of each result as a subscript:
| Coins (first picker in rounds 1, 2) | Interleaved list |
|---|---|
| A A | $a_A, c_B, b_A, d_B$ |
| A B | $a_A, c_B, d_B, b_A$ |
| B A | $a_B, b_A, c_A, d_B$ |
| B B | $a_B, b_A, c_B, d_A$ |
In round 1, whichever system picks first takes $a$. The other then adds its best result not yet shown: $c$ for B, $b$ for A. In round 2 with A first after "A A", A adds $b$ and B adds $d$. After "B A", A's best unshown result is $c$, so $c$ joins team A, and B adds $d$. After "B B", B adds $c$, and A, whose $a$, $b$ and $c$ are all shown, adds $d$.
Unlike the article's main example, the teams here depend on the coins. Document $a$, which both systems rank first, belongs to whoever won the first flip, so a click on it says nothing about either system: 1/2 each. Document $c$ belongs to B in three of the four sequences and to A in one, so a click on it credits B with probability 3/4. That is reasonable, since B ranks $c$ second and A third, but in the sequence "B A" the credit goes to A. This is the noise that shared documents add, which the Cranfield simulation above measured: when the shared top document is clicked, the credit is a coin flip.
Problem 3 (summarizing an interleaving experiment). Of 1,000 impressions with at least one click, A wins 450, B wins 380 and 170 are ties. Compute $\Delta_{AB}$, and test whether A wins more often than B.
Solution. $\Delta_{AB} = 0.035$, and the preference for A is significant at 0.05 ($p = 0.017$). By the formula, $\Delta_{AB} = (450 + 85)/1000 - 0.5 = 0.035$. For the test, each impression is one paired comparison of the two systems, so the sign test applies: drop the 170 ties, leaving 830 decided impressions with 450 wins for A. Under the null hypothesis the number of wins is binomial with 830 trials and probability 1/2, with mean 415 and standard deviation $\sqrt{830}/2 = 14.4$. The exact two-sided p-value is 0.017. The normal approximation with a continuity correction gives $z = (449.5 - 415)/14.4 = 2.40$, and nearly the same p-value.
Problem 4 (reweighting a log). An old system showed result $x$ with probability 0.8 and result $y$ with probability 0.2, at random. Users click $x$ with probability 0.3 and $y$ with probability 0.5. Find the click rate in the log, the expected value of the reweighting estimate for the policy "always show $y$", and the variance of one term of that estimate.
Solution. The log's click rate is 0.34, the estimate's expectation is 0.5, and one term has variance 2.25. The log mixes the two results: $0.8 \times 0.3 + 0.2 \times 0.5 = 0.34$, which is the value of the old system and not of either result. For the policy "always $y$", a logged event contributes $r/0.2$ when $y$ was shown and 0 otherwise. Its expectation is $0.2 \times 0.5/0.2 = 0.5$, the true click rate of $y$, as the proof above requires. A term equals $1/0.2 = 5$ with probability $0.2 \times 0.5 = 0.1$ and 0 otherwise, so its mean square is $25 \times 0.1 = 2.5$ and its variance is $2.5 - 0.5^2 = 2.25$. Had $y$ always been shown, a term would be a plain click indicator with variance $0.5 \times 0.5 = 0.25$. The log is worth one ninth as much per event for this question, because only a fifth of it concerns $y$ and those events carry a weight of five. In a simulated log of 200,000 events (seed 0) the estimate came to 0.502.
What we have learned
An A/B test compares groups of users, and the users it needs grow with the inverse square of the effect: about 38,000 per group for a one-point gain in a 40 percent click rate, nearly a million for 0.2 points. Clicks are biased evidence, dominated by position; in the Cranfield simulation clicks fall more than tenfold from rank 2 to rank 10 while relevance falls about fourfold. Team-draft interleaving makes position fair by coin flips and compares within one results page. It is far less sensitive to differences between users (29,000 impressions against 79,000 in the simulation), though it can be misled when rankings share documents. Online evaluation confirms what offline evaluation screens, and only large services can run it.
Offline evaluation, then, is the method open to everyone, and it is only as good as the code that computes the measures. The next article, Implementing Evaluation Measures, takes up the practical side: the file formats, a tested implementation, and the places where correct implementations still disagree.
References
- Chapelle, O., Joachims, T., Radlinski, F., and Yue, Y. (2012). Large-scale validation and analysis of interleaved search evaluation. ACM Transactions on Information Systems, 30(1), article 6. record · 2 pages
- Chuklin, A., Markov, I., and de Rijke, M. (2015). Click Models for Web Search. Morgan & Claypool. record · 2 pages
- Fox, S., Karnawat, K., Mydland, M., Dumais, S., and White, T. (2005). Evaluating implicit measures to improve web search. ACM Transactions on Information Systems, 23(2), 147–168. record
- Hersh, W., Turpin, A., Price, S., Chan, B., Kraemer, D., Sacherek, L., and Olson, D. (2000). Do batch and user evaluations give the same results? In Proceedings of SIGIR 2000, 17–24. record · 2 pages
- Horvitz, D. G., and Thompson, D. J. (1952). A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47(260), 663–685. record · 3 pages
- Joachims, T., Granka, L., Pan, B., Hembrooke, H., and Gay, G. (2005). Accurately interpreting clickthrough data as implicit feedback. In Proceedings of SIGIR 2005, 154–161. record · 2 pages
- Kohavi, R., Longbotham, R., Sommerfield, D., and Henne, R. M. (2009). Controlled experiments on the web: Survey and practical guide. Data Mining and Knowledge Discovery, 18(1), 140–181. record
- Li, J., Huffman, S., and Tokuda, A. (2009). Good abandonment in mobile and PC internet search. In Proceedings of SIGIR 2009, 43–50. record
- Li, L., Chu, W., Langford, J., and Wang, X. (2011). Unbiased offline evaluation of contextual-bandit-based news article recommendation algorithms. In Proceedings of WSDM 2011, 297–306. record
- Radlinski, F., Kurup, M., and Joachims, T. (2008). How does clickthrough data reflect retrieval quality? In Proceedings of CIKM 2008, 43–52. record
- Turpin, A. H., and Hersh, W. (2001). Why batch and user evaluations do not give the same results. In Proceedings of SIGIR 2001, 225–231. record · 2 pages
Reviewed: verified, 16 Nov 2026 · citations checked, 16 Nov 2026 · editorial review, 23 Nov 2026 · 13 revisions