Posterior Probability That Variant B Beats A in a Gmail Test

Last updated: November 29, 2026

Quick Overview

In a Gmail upsell experiment, control converts 1,000 of 20,000 users and the variant converts 1,080 of 20,000. Compute the Bayesian probability that the variant is better and the expected loss of shipping it, and compare with the frequentist test.

Google
Statistics & Math
Data Scientist
Google
November 29, 2026
Data Scientist
Onsite
Statistics & Math
Hard

0

0

0 solved


In a Gmail upsell experiment, control converts 1,000 of 20,000 users and the variant converts 1,080 of 20,000. Compute the Bayesian probability that the variant is better and the expected loss of shipping it, and compare with the frequentist test.

Some Google teams report Bayesian summaries alongside p-values because product managers find 'probability B is better' easier to act on. The interviewer checks you can derive it with conjugate priors, approximate it analytically, verify by simulation, and explain where it can mislead.

What the Interviewer Expects
  • Set up Beta posteriors for both arms
  • Approximate P(pB > pA) with a normal approximation
  • Verify by Monte Carlo
  • Compute expected loss as a decision criterion
  • Relate the result to the one-sided p-value
Key Topics to Cover
Bayesian A/B testing
Beta posterior
Monte Carlo
expected loss
normal approximation
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • How sensitive is the answer to the prior with these sample sizes?
  • Does peeking at the posterior every day cause the same problems as peeking at p-values?
  • How would you choose a loss threshold for shipping?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

Assume each user converts at most once, users are independent, and we use flat Beta(1,1)\text{Beta}(1,1) priors. Confirm the decision: ship the variant if we are confident it is not worse by more than a tiny...

Approach

Posteriors: pA∼Beta(1001,19001)p_A \sim \text{Beta}(1001, 19001) and pB∼Beta(1081,18921)p_B \sim \text{Beta}(1081, 18921). With this much data each posterior is close to normal, so pB−pAp_B - p_A is approximately normal. Expected loss of...


Submit Your Answer
Markdown supported