← Google Interview Insights

Google·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Brutal Google DS onsite question covering basically every dimension of A/B testing at once. The depth expected here is no joke, this is the kind of question where you can talk for 45 minutes and still feel like you left things on the table.

Questions Asked (6)

Q1

You're launching a personalized ranking feature on a product listing page. Define your primary success metric including the exact formula with numerator, denominator, and any data filters you'd apply.

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

I went with something like revenue per session filtered to sessions with at least one ranking impression, and the interviewer pushed back immediately asking why not per user or per page load.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the product goal (e.g., increase user engagement or revenue) and the specific behavior the ranking feature aims to influence. Then define a primary success metric that directly measures that goal, with a precise formula including numerator, denominator, and filters. Finally, justify why this metric is the best choice and how you would validate it through experimentation.

Pro tip: Choose a metric that balances sensitivity and business relevance—avoid purely engagement metrics that can be gamed, and instead anchor to a long-term value metric like revenue per session or successful conversion rate. Also, mention guardrail metrics to ensure the ranking doesn't harm other key areas.

1. Clarify Product Goal and Hypothesis

Ask clarifying questions to understand the product's objective (e.g., increase clicks, conversions, or revenue) and how the personalized ranking is expected to drive that. State your assumption explicitly.

2. Define Primary Success Metric

Propose a metric that directly measures the goal, such as click-through rate (CTR) on the listing page or conversion rate. Provide the exact formula with numerator and denominator.

3. Specify Data Filters and Scope

Detail any filters: user segments (e.g., new vs. returning), time window (e.g., first 7 days), device type, and exclude bot traffic or internal users. Explain why these filters matter.

4. Justify Metric Choice and Guardrails

Explain why this metric is the best proxy for success, and mention guardrail metrics (e.g., latency, diversity of results) to monitor unintended consequences.

5. Outline Validation Plan

Briefly describe how you'd test the metric via A/B experiment, including sample size, duration, and statistical significance. Mention potential pitfalls like novelty effects.

Key Points to Mention

  • Clear definition of numerator and denominator with units (e.g., clicks per session).
  • Data filters: exclude bot traffic, internal users, and apply time window (e.g., 7-day attribution).
  • Alignment with business goal (e.g., revenue, engagement) and long-term value.
  • Guardrail metrics to ensure no negative impact on other areas (e.g., page load time, diversity).
  • Consideration of novelty effects and seasonality in experiment design.
  • Statistical rigor: power analysis, significance testing, and avoiding peeking.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Define at least three guardrail metrics with specific thresholds and explain what failure mode each one is protecting against.

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

This part felt more natural.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining guardrail metrics as metrics that should not degrade significantly during an experiment, then select three that cover different failure modes (e.g., user experience, business health, system performance). For each, specify a concrete threshold (e.g., 'no more than a 2% relative decrease') and explain the failure mode it protects against, using examples from Google's context.

Pro tip: Tie each guardrail to a real or plausible Google product scenario (e.g., Search, Ads, YouTube) and mention how you'd monitor them with sequential testing or automated alerts to show practical maturity.

1. Define guardrail metrics

Explain that guardrail metrics are metrics that should not be harmed by the experiment, and they act as safety checks to prevent launching changes that hurt key aspects of the product.

2. Select three diverse metrics

Choose three guardrail metrics that cover different failure modes: user experience (e.g., task success rate), business health (e.g., revenue per user), and system performance (e.g., page load time).

3. Set specific thresholds

For each metric, state a concrete threshold, such as 'no more than a 1% relative decrease' or 'no more than a 5% increase in latency', and justify why that threshold is meaningful.

4. Explain failure modes

For each metric, describe the failure mode it protects against, e.g., user frustration, revenue loss, or system overload, and how that would manifest if the metric degraded.

5. Summarize and link to action

Conclude by explaining how you would monitor these guardrails during the experiment and what actions you'd take if a threshold is breached (e.g., pause the experiment, investigate).

Key Points to Mention

  • Guardrail metrics are distinct from success metrics; they ensure no harm.
  • Thresholds should be based on historical variability and business impact.
  • Use relative thresholds (e.g., 2% relative decrease) to account for scale.
  • Consider multiple comparison corrections when monitoring many guardrails.
  • Automate alerts and have a pre-defined rollback plan.
  • Examples: task success rate (UX), revenue per user (business), page load time (system).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Design the experiment: what's your unit of randomization and why, how do you handle exposure rules, pre-exposure filtering, stratification, and repeat visitors across devices?

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

User-level randomization was the obvious call here since personalization is user-specific and you'd get interference issues with session-level.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the experiment's goal and constraints, then systematically address each component: randomization unit, exposure rules, pre-exposure filtering, stratification, and cross-device repeat visitors. Emphasize trade-offs and justify your choices based on validity, sensitivity, and practical implementation.

Pro tip: Always consider the 'trigger' or 'exposure' point as the moment of randomization to avoid dilution and ensure valid causal inference. For cross-device users, use a stable user ID (e.g., Google account) when available; otherwise, acknowledge limitations and propose sensitivity analyses.

1. Clarify the Experiment Goal and Constraints

Understand what metric you're trying to move, the population, and any technical constraints (e.g., login status, device graph availability). This informs the choice of randomization unit and exposure rules.

2. Choose the Randomization Unit

Decide between user-level, session-level, or device-level randomization. Justify based on the intervention, interference risk, and ability to track users across devices. User-level is often preferred for consistency and to capture cross-device effects.

3. Define Exposure Rules and Pre-Exposure Filtering

Specify when a user is considered exposed (e.g., first view of the feature) and filter out users who were exposed before the experiment start. This prevents contamination and ensures clean pre-period baselines.

4. Implement Stratification and Handle Repeat Visitors Across Devices

Use stratification to balance key covariates (e.g., device type, geography) and improve sensitivity. For repeat visitors across devices, use a consistent user identifier (e.g., logged-in ID) to assign the same variant; if unavailable, discuss potential biases and mitigation.

5. Validate and Monitor the Experiment

Run A/A tests, check for sample ratio mismatch (SRM), and monitor key metrics to ensure the randomization and exposure logic are working as intended. Be prepared to adjust if issues arise.

Key Points to Mention

  • Randomization unit: user-level vs. session-level vs. device-level, and implications for interference and analysis.
  • Exposure rules: define trigger event (e.g., first impression) and ensure randomization at that point to avoid dilution.
  • Pre-exposure filtering: exclude users who have already interacted with the feature before the experiment to avoid carryover effects.
  • Stratification: use covariates like device, geography, or pre-experiment activity to balance groups and increase power.
  • Cross-device repeat visitors: use stable user IDs (e.g., Google account) for consistent assignment; if not possible, consider device-level randomization with caveats.
  • Trade-offs: discuss validity vs. practicality, and how choices impact metrics like click-through rate or conversion.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Compute the required sample size to detect a 1.5% relative lift in the primary metric at 90% power with a two-sided alpha of 0.05, given a baseline mean of 3.2 and an SD of 2.1 per user-day. Show the formula.

A/B Testing & Experimentation
Author's notes

The formula is n = 2 * (z_alpha/2 + z_beta)^2 * sigma^2 / delta^2, where delta is the absolute lift.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric and assumptions: the primary metric is a per-user-day mean, so the unit of analysis is user-day. Compute the absolute lift from the relative lift (1.5% of 3.2 = 0.048), then use the standard formula for sample size per arm for a two-sample t-test: n = 2 * (z_{α/2} + z_β)^2 * σ^2 / Δ^2. Plug in z_{0.025}=1.96, z_{0.10}=1.28, σ=2.1, Δ=0.048, and round up to the nearest integer.

Pro tip: Always state the unit of analysis (user-day vs. user) and mention that if the metric is per-user-day, you need to account for the number of days per user to get the number of users, and consider clustering if multiple observations per user. Also, note that this calculation assumes independent observations and normally distributed data; for skewed metrics, consider transformations or non-parametric methods.

1. Clarify metric and assumptions

Confirm that the primary metric is a mean per user-day, and that the lift is relative to the baseline mean. State assumptions: independent observations, known variance (or large sample), two-sided test, equal allocation.

2. Compute absolute effect size

Convert the relative lift to an absolute difference: Δ = baseline_mean * relative_lift = 3.2 * 0.015 = 0.048.

3. Identify z-scores for alpha and power

For two-sided alpha=0.05, z_{α/2}=1.96. For 90% power, z_β=1.28 (since β=0.10).

4. Apply sample size formula

Use n = 2 * (z_{α/2} + z_β)^2 * σ^2 / Δ^2. Plug in values: n = 2 * (1.96+1.28)^2 * (2.1)^2 / (0.048)^2. Compute step by step.

5. Calculate and round up

Perform the arithmetic: (1.96+1.28)=3.24, squared=10.4976; σ^2=4.41; Δ^2=0.002304. Numerator: 2*10.4976*4.41 ≈ 92.59. Divide by 0.002304 ≈ 40187. Round up to 40188 per arm.

Key Points to Mention

  • Unit of analysis: user-day vs. user; if per-user-day, need to account for multiple days per user (clustering or average per user).
  • Formula for sample size per arm: n = 2 * (z_{α/2} + z_β)^2 * σ^2 / Δ^2.
  • Conversion of relative lift to absolute lift: Δ = baseline_mean * relative_lift.
  • Z-scores: z_{0.025}=1.96 for two-sided alpha=0.05, z_{0.10}=1.28 for 90% power.
  • Assumptions: independence, normality (or large sample), equal variance, equal allocation.
  • Practical considerations: rounding up, potential for overdispersion, and the need to adjust for multiple testing if multiple metrics.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

What stopping rule would you use, how would you apply CUPED or re-randomization to reduce variance, and what SRM test would you run daily?

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Fixed horizon is safer for avoiding peeking inflation, I said I'd use alpha spending only if there was a strong business reason to peek early.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer around three pillars: stopping rule, variance reduction, and SRM detection. For the stopping rule, discuss sequential testing or fixed-horizon with alpha spending, and explain how you balance speed and error control. For variance reduction, compare CUPED and re-randomization, highlighting when each is appropriate, and for SRM, describe a daily test like chi-square or sequential probability ratio test with practical thresholds.

Pro tip: Emphasize that SRM checks should be automated and run daily, but avoid overreacting to minor deviations—use a sequential test to control false alarms. Also, mention that CUPED requires pre-experiment data and works best when correlated with the metric, while re-randomization is a design-time solution.

1. Clarify the context and goals

Start by asking about the experiment's objectives, expected effect size, and constraints (e.g., traffic, duration). This shows you tailor solutions to business needs.

2. Choose a stopping rule

Discuss options like fixed-horizon with power analysis, sequential testing (e.g., always-valid p-values), or Bayesian methods. Explain trade-offs between early stopping and error control.

3. Apply variance reduction techniques

Explain CUPED: use pre-experiment covariates to adjust post-experiment metrics, reducing variance. For re-randomization, describe how to balance covariates at assignment to improve sensitivity.

4. Implement daily SRM checks

Describe running a chi-square test on sample ratios daily, with a low p-value threshold (e.g., 0.001) to flag issues. Mention sequential testing to account for multiple looks.

5. Integrate and monitor

Combine these methods into a monitoring dashboard, and set up alerts for SRM and stopping criteria. Discuss how to handle violations (e.g., pause experiment, investigate).

Key Points to Mention

  • Sequential testing methods (e.g., alpha spending, group sequential designs) to control Type I error when peeking.
  • CUPED: using pre-experiment data as covariates to reduce variance, and its assumptions (e.g., linear relationship).
  • Re-randomization: balancing covariates by re-assigning until balance is achieved, and its limitations (e.g., not always feasible).
  • SRM detection: chi-square test on expected vs. actual sample sizes, with daily monitoring and adjusted significance levels.
  • Trade-offs: CUPED vs. re-randomization (post-hoc vs. design-time), and stopping rules (fixed vs. sequential).
  • Practical considerations: automation, alerting, and avoiding p-hacking with multiple SRM checks.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you visualize experiment results and diagnose issues, including quantile treatment effects, funnel breakouts, and time-since-exposure plots? How do you interpret heterogeneous treatment effects without p-hacking?

A/B Testing & ExperimentationProduct Analytics & MetricsRoot Cause Analysis
Author's notes

This is where I felt most comfortable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining a structured visualization and diagnostic strategy for experiments, emphasizing quantile treatment effects, funnel breakouts, and time-since-exposure plots. Then, explain how to interpret heterogeneous treatment effects rigorously, using pre-registration, correction for multiple comparisons, and validation to avoid p-hacking. Conclude with a practical example or framework that ties these elements together.

Pro tip: Always pre-register your hypotheses and analysis plan to prevent p-hacking, and use simulation or bootstrapping to validate that your heterogeneous treatment effect findings are not artifacts of multiple testing.

1. Visualize Overall and Quantile Treatment Effects

Use density plots, QQ plots, or box plots to compare distributions between control and treatment groups. For quantile treatment effects, plot the difference in quantiles (e.g., 10th, 50th, 90th) with confidence intervals to see where the treatment has the most impact.

2. Diagnose Funnel Breakouts

Break down the conversion funnel by step and segment. Visualize conversion rates at each stage with error bars, and use heatmaps or bar charts to identify where the treatment causes drop-offs or improvements.

3. Analyze Time-Since-Exposure Plots

Plot the treatment effect over time since exposure to detect novelty effects, delayed effects, or decay. Use line charts with confidence bands to show how the effect evolves.

4. Interpret Heterogeneous Treatment Effects Rigorously

Pre-register subgroups and hypotheses. Use methods like Bonferroni correction, false discovery rate control, or Bayesian shrinkage to adjust for multiple comparisons. Validate findings with holdout sets or replication.

5. Communicate and Iterate

Present findings with clear visualizations and caveats. Recommend follow-up experiments to confirm heterogeneous effects, and emphasize that correlation does not imply causation without proper validation.

Key Points to Mention

  • Quantile treatment effects: use quantile regression or distributional plots to capture effects beyond the mean.
  • Funnel breakouts: segment by user attributes, device, or geography to identify where the treatment effect varies.
  • Time-since-exposure: account for novelty and primacy effects, and use cumulative or rolling metrics.
  • Avoid p-hacking: pre-register hypotheses, correct for multiple comparisons (e.g., Bonferroni, FDR), and use holdout validation.
  • Heterogeneous treatment effects: leverage causal forests or meta-learners, but validate with out-of-sample testing.
  • Visualization best practices: use confidence intervals, avoid overplotting, and choose appropriate scales (e.g., log scale for skewed data).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.