← Gemini Interview Insights

Gemini·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Gemini data scientist interview with a pretty brutal quantitative case study on ACH fraud detection. Four connected sub-problems covering expected value math, A/B test design, confidence intervals, and sequential testing. The kind of thing where you either know your stats cold or you're just guessing at formulas.

Questions Asked (4)

Q1

Given a proposed ACH fraud detection rule with known recall and false positive rate, compute the monthly gross fraud loss without the rule, the loss remaining after the rule is applied, and the net savings once false-positive operational costs are factored in. Show all formulas and units.

Product Analytics & MetricsA/B Testing & Experimentation
Author's notes

This part I actually felt okay about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining all variables and units, then compute the baseline monthly gross fraud loss. Next, apply the rule's recall to find the prevented loss, subtract from baseline to get remaining loss, and finally subtract false-positive operational costs to find net savings. Show every formula step-by-step with units.

Pro tip: Always state your assumptions explicitly (e.g., that false positives incur a fixed cost per alert) and consider edge cases like recall=0 or 1. This demonstrates rigor and prevents miscommunication.

1. Define variables and units

List all given values: monthly transaction volume, average fraud amount, recall, false positive rate, and cost per false positive. Ensure units are consistent (e.g., dollars, counts).

2. Compute baseline gross fraud loss

Calculate the total fraud loss without the rule: monthly transaction volume × fraud rate × average fraud amount. If fraud rate is not given, derive it from recall and false positive rate if possible, or state assumptions.

3. Compute loss remaining after rule

The rule catches a fraction (recall) of fraud, so remaining loss = baseline loss × (1 - recall). Show the formula and units.

4. Compute false-positive operational costs

Calculate the number of false positives: monthly transaction volume × false positive rate. Multiply by cost per false positive to get total operational cost.

5. Compute net savings

Net savings = baseline loss - remaining loss - false-positive operational costs. Present the final result with units and interpret the business impact.

Key Points to Mention

  • Clearly distinguish between fraud loss prevented and operational costs.
  • Use consistent units (e.g., dollars per month) and label all formulas.
  • Explain that recall is the proportion of actual fraud caught by the rule.
  • Note that false positive rate is the proportion of legitimate transactions flagged as fraud.
  • Consider that false positives may also have indirect costs (e.g., customer dissatisfaction) beyond direct operational costs.
  • If fraud rate is not provided, state how you would estimate it or what additional data is needed.

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

Q2

Design a two-arm online A/B test to detect a 15% relative reduction in fraud loss per 1,000 credits at 5% significance (two-sided) and 80% power. State your distributional assumptions, derive the per-arm sample size, and justify your modeling choice.

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

This is where I started sweating.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric definition and distributional assumptions (e.g., fraud loss per 1,000 credits is continuous, likely skewed, so use a t-test or bootstrap). Then derive the per-arm sample size using the standard formula for comparing two means, incorporating the 15% relative reduction, 5% significance, and 80% power. Finally, justify your modeling choice by discussing robustness to non-normality and practical considerations like randomization unit and duration.

Pro tip: Mention that you would pre-register the analysis plan and use a sequential testing framework or CUPED to increase sensitivity, showing awareness of practical experimentation pitfalls beyond the basic sample size calculation.

1. Define metric and assumptions

Clarify that the metric is fraud loss per 1,000 credits, a continuous variable. Assume independent observations, equal variances, and approximate normality (or rely on CLT for large n).

2. Set hypotheses and parameters

State null hypothesis (no difference) and alternative (15% relative reduction). Specify significance level (α=0.05, two-sided) and power (1-β=0.80).

3. Derive sample size formula

Use the formula for two independent means: n per arm = 2*(z_{α/2}+z_β)^2 * σ^2 / Δ^2, where Δ is the absolute effect corresponding to 15% relative reduction.

4. Estimate variance and effect size

Estimate σ from historical data or pilot. Compute Δ = 0.15 * μ_control, where μ_control is the baseline mean fraud loss per 1,000 credits.

5. Calculate and justify

Plug in values to get n per arm. Justify using t-test or bootstrap if normality is questionable, and discuss practical adjustments like unequal allocation or clustering.

Key Points to Mention

  • Distributional assumptions: independence, normality (or large sample), equal variances
  • Two-sided test at α=0.05, power=0.80, z-values: z_{α/2}=1.96, z_β=0.84
  • Sample size formula for two means: n = 2*(1.96+0.84)^2 * σ^2 / (0.15*μ)^2
  • Need baseline mean (μ) and standard deviation (σ) of fraud loss per 1,000 credits
  • Consideration of non-normal data: use t-test or bootstrap, or transform data
  • Practical factors: randomization unit, test duration, multiple testing, sequential analysis

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

Q3

A control arm observes 240,000 credits with a 0.12% fraud prevalence. Compute a 95% Wilson confidence interval for that prevalence and explain what it means for a go/no-go decision.

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

Wilson interval instead of Wald, which is the right call at low prevalence.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, compute the Wilson confidence interval for the given prevalence using the formula, then interpret the interval in the context of a go/no-go decision by comparing it to a predefined threshold. Emphasize that the interval provides a range of plausible values for the true fraud rate, which helps assess risk and uncertainty.

Pro tip: When interpreting the interval, consider the practical significance: even if the upper bound is above the threshold, the actual fraud rate might still be acceptable if the cost of fraud is low relative to the benefits. Also, mention that Wilson interval is preferred for small proportions because it has better coverage than the normal approximation.

1. Calculate the sample proportion

Compute the observed prevalence: p_hat = 240,000 / 100,000,000 = 0.0024 (or 0.24%). Note that the given 0.12% might be a typo; clarify with the interviewer if needed.

2. Apply the Wilson formula

Use the Wilson score interval formula: (p_hat + z^2/(2n) ± z * sqrt((p_hat*(1-p_hat) + z^2/(4n))/n)) / (1 + z^2/n), where z = 1.96 for 95% confidence.

3. Compute the interval

Plug in the numbers: n = 100,000,000, p_hat = 0.0024, z = 1.96. Calculate the lower and upper bounds. The interval will be very narrow due to the large sample size.

4. Interpret the interval

Explain that we are 95% confident the true fraud prevalence lies within this interval. Compare the interval to a decision threshold (e.g., if the upper bound is below the acceptable fraud rate, go; if the lower bound is above, no-go; if it straddles, consider more data or risk tolerance).

5. Make a recommendation

Based on the interval and business context, provide a clear go/no-go recommendation, acknowledging uncertainty and potential next steps.

Key Points to Mention

  • Wilson interval is robust for small proportions and large samples.
  • The interval provides a range of plausible values for the true fraud prevalence.
  • Decision thresholds should be based on business costs and risk tolerance.
  • Large sample size leads to a narrow interval, indicating high precision.
  • If the interval overlaps the threshold, consider the consequences of Type I and Type II errors.
  • Communicate uncertainty clearly to stakeholders.

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

Q4

If you're reviewing A/B test results daily over 14 days, how do you control Type I error? Propose a sequential testing plan with stopping rules and explain how early stopping affects your primary metric.

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

Alpha spending was my answer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the multiple testing problem and the need to control the family-wise error rate (FWER) or false discovery rate (FDR). Then propose a sequential testing framework such as group sequential boundaries (e.g., O'Brien-Fleming) or alpha spending functions, and outline stopping rules for efficacy and futility. Finally, discuss how early stopping can inflate effect sizes and introduce bias, and suggest adjustments like bias-corrected estimators or Bayesian methods.

Pro tip: Mention that while early stopping controls Type I error, it often leads to overestimated effect sizes due to the 'winner's curse'; consider using a Bayesian approach with posterior probabilities for more intuitive decision-making.

1. Acknowledge the multiple testing problem

Explain that daily peeking at results inflates Type I error if no adjustment is made. Mention that the overall alpha must be controlled across all interim analyses.

2. Choose a sequential testing method

Propose a method like group sequential design with alpha spending (e.g., O'Brien-Fleming or Pocock boundaries) or sequential probability ratio test (SPRT). Describe how it allocates alpha across looks.

3. Define stopping rules

Specify stopping boundaries for efficacy (reject null) and futility (accept null). Include both statistical and practical considerations (e.g., minimum sample size, business impact).

4. Explain impact on primary metric

Discuss how early stopping can bias the estimated effect size (usually upward) and reduce power for secondary metrics. Mention the need for adjusted estimators or sensitivity analyses.

5. Consider alternatives and trade-offs

Mention Bayesian sequential testing or always-valid inference as alternatives that allow continuous monitoring without alpha inflation. Discuss trade-offs in terms of complexity and interpretability.

Key Points to Mention

  • Family-wise error rate (FWER) and false discovery rate (FDR) control
  • Alpha spending functions (O'Brien-Fleming, Pocock) and group sequential designs
  • Stopping boundaries for efficacy and futility
  • Bias in effect size estimates due to early stopping (winner's curse)
  • Bayesian sequential testing and posterior probabilities
  • Always-valid inference and its practical implications

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