← Stripe Interview Insights

Stripe·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Stripe data science interview that went deep on expected value calculations and model calibration. Four questions, all quantitative, no fluff. The kind of round where you either know the delta method or you don't.

Questions Asked (4)

Q1

Given a base purchase rate of 4%, a $50 incremental profit per true positive, and a $1 cost per false positive, compute the expected profit for three candidate operating points (A: TPR=0.70, FPR=0.12; B: TPR=0.55, FPR=0.05; C: TPR=0.80, FPR=0.20) over a cohort of 100,000 users. Which threshold do you pick?

Product Analytics & MetricsPricing & Monetization
Author's notes

The formula itself isn't hard once you see it: 100000 times (0.04 times TPR times 50 minus 0.96 times FPR times 1).

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, compute the expected profit for each operating point by calculating the number of true positives and false positives from the given rates and cohort size, then apply the profit and cost per instance. Compare the net profits and select the threshold that maximizes expected profit, while also considering business context and potential trade-offs.

Pro tip: Always sanity-check your calculations and consider the implications of the base rate: with a low base rate, even a small FPR can lead to many false positives, significantly impacting profit. Also, discuss how the chosen threshold aligns with business goals, such as customer experience or risk tolerance.

1. Calculate the number of actual positives and negatives

Given a base purchase rate of 4% and a cohort of 100,000 users, compute the number of true positives (actual purchasers) and true negatives (non-purchasers).

2. Compute true positives and false positives for each operating point

For each threshold (A, B, C), multiply the TPR by the number of actual positives to get true positives, and multiply the FPR by the number of actual negatives to get false positives.

3. Calculate expected profit for each operating point

For each point, compute profit as (true positives * $50) - (false positives * $1). This gives the net expected profit.

4. Compare and select the optimal threshold

Compare the expected profits and choose the operating point with the highest profit. Also consider if any other factors (e.g., strategic importance, risk) might influence the decision.

Key Points to Mention

  • Base rate and its impact on false positives: with a 4% base rate, false positives can outnumber true positives even at low FPR.
  • Calculation of true positives and false positives using TPR, FPR, and cohort size.
  • Net profit formula: (TP * $50) - (FP * $1).
  • Comparison of expected profits across operating points to identify the maximum.
  • Consideration of business context: e.g., customer experience, cost of false positives beyond the $1, or strategic goals.
  • Potential need for further analysis, such as sensitivity to base rate or profit parameters.

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

Q2

Construct a 95% confidence interval for the expected profit at your chosen operating threshold. Walk through either a delta method or a bootstrap approach and explain what you're resampling and why.

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

This is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the setup: define the operating threshold, the profit function, and the data-generating process. Then choose either the delta method (if the profit function is smooth and you can derive its gradient) or the bootstrap (if the function is complex or non-differentiable), and walk through the computation step by step, emphasizing what is resampled and why.

Pro tip: Mention that the bootstrap should resample at the unit of randomization (e.g., users or sessions) to preserve dependence, and that for the delta method you must account for the covariance between estimated quantities if the threshold is also estimated.

1. Define the estimand and assumptions

Clearly state the profit function, the operating threshold, and the data structure (e.g., independent users). Specify any assumptions such as smoothness or finite variance.

2. Choose and justify the method

Decide between delta method and bootstrap based on the complexity of the profit function and available data. Explain why the chosen method is appropriate.

3. Implement the chosen method

For delta method: derive the gradient and compute the variance using the delta theorem. For bootstrap: describe the resampling procedure (e.g., resample users with replacement) and compute the interval from bootstrap replicates.

4. Explain what is resampled and why

Emphasize that you resample the original units (e.g., users) to preserve the dependence structure and mimic the sampling process. Clarify that you do not resample derived quantities like profit directly.

5. Interpret and validate the interval

Discuss the meaning of the 95% confidence interval, check assumptions (e.g., normality of bootstrap distribution), and mention potential pitfalls like bias or coverage issues.

Key Points to Mention

  • Delta method requires a differentiable profit function and uses a first-order Taylor expansion.
  • Bootstrap resamples at the unit of randomization (e.g., users) to account for correlation within units.
  • For the delta method, include covariance terms if the threshold is estimated from the same data.
  • Bootstrap confidence intervals can be computed via percentile, BCa, or normal approximation.
  • The operating threshold may be a decision variable; if it's estimated, its uncertainty must be propagated.
  • Stripe context: profit often involves revenue and cost components; ensure the profit function is correctly specified.

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

Q3

Your model outputs probabilities. Describe and compute two calibration diagnostics you would use in practice.

Product Analytics & MetricsTechnical Trade-offs
Author's notes

Went with Brier score and ECE from a reliability curve.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining calibration and why it matters for probabilistic predictions, then choose two complementary diagnostics: one that summarizes overall calibration (e.g., Expected Calibration Error) and one that visualizes it (e.g., reliability diagram). For each, describe the computation steps and how you would interpret the results in a practical setting, ideally with a concrete example.

Pro tip: Mention that calibration should be assessed on a held-out set and that you would also check for overconfidence in high-probability regions, since miscalibration there can be especially costly in business decisions.

1. Define calibration and its importance

Briefly explain that a calibrated model's predicted probabilities match observed frequencies (e.g., among predictions of 0.7, about 70% should be positive). Emphasize why this matters for decision-making, such as thresholding or expected value calculations.

2. Choose two complementary diagnostics

Select one aggregate metric (e.g., Expected Calibration Error, ECE) and one visual tool (e.g., reliability diagram). Explain that ECE gives a single number for comparison, while the reliability diagram reveals the nature of miscalibration.

3. Describe computation of the first diagnostic

For ECE: bin predictions into M bins (e.g., 10 equal-width or equal-frequency), compute the average predicted probability and the fraction of positives in each bin, then take the weighted average of their absolute difference. Provide a simple formula or example.

4. Describe computation of the second diagnostic

For reliability diagram: plot the mean predicted probability (x-axis) against the observed frequency (y-axis) for each bin, along with a diagonal line representing perfect calibration. Explain how to interpret deviations from the diagonal.

5. Interpret and act on results

Discuss how to use these diagnostics: if miscalibrated, consider post-hoc methods like Platt scaling or isotonic regression. Also note limitations, such as bin sensitivity for ECE and the need for sufficient data per bin.

Key Points to Mention

  • Definition of calibration: predicted probabilities match empirical frequencies.
  • Expected Calibration Error (ECE): formula and binning strategy.
  • Reliability diagram: visual representation with diagonal reference.
  • Importance of using a held-out calibration set.
  • Common pitfalls: bin sensitivity, small sample sizes, and overconfidence in high-probability bins.
  • Post-hoc calibration techniques (e.g., Platt scaling, isotonic regression) if diagnostics reveal miscalibration.

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

Q4

How would you design a monthly drift test to check whether the chosen operating threshold is still optimal as the underlying purchase rate shifts over time?

A/B Testing & ExperimentationRoot Cause Analysis
Author's notes

Framed it as monitoring the base rate pi monthly via a holdout sample, then recomputing expected profit at the current threshold versus adjacent thresholds.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business context: what decision does the threshold drive, and what are the costs of false positives vs. false negatives? Then outline a monitoring framework that tracks the purchase rate and threshold performance over time, using statistical tests to detect drift and re-optimize when necessary.

Pro tip: Emphasize that drift detection should be proactive, not reactive—set up automated alerts and a predefined decision rule for when to re-evaluate the threshold, so you're not caught off guard by gradual shifts.

1. Define the objective and metrics

Clarify what 'optimal' means for the threshold (e.g., maximizing profit, minimizing fraud) and identify the key metrics to monitor, such as purchase rate, false positive rate, and expected value.

2. Establish a baseline and monitoring plan

Use historical data to set a baseline purchase rate and threshold performance. Define a monthly cadence for data collection and specify the statistical tests (e.g., sequential testing, CUSUM) to detect significant changes.

3. Detect drift in purchase rate

Apply change point detection or hypothesis testing to determine if the purchase rate has shifted significantly from the baseline. Consider seasonality and external factors.

4. Re-evaluate threshold optimality

If drift is detected, simulate or run a small experiment to find the new optimal threshold. Compare the expected value under the current threshold vs. alternatives.

5. Automate and iterate

Implement an automated pipeline that runs the monthly test, alerts stakeholders if action is needed, and updates the threshold if necessary. Continuously refine the process based on feedback.

Key Points to Mention

  • Statistical power and sample size considerations for detecting drift
  • Cost-sensitive evaluation of threshold performance (e.g., false positives vs. false negatives)
  • Use of control charts or sequential testing to monitor over time
  • Accounting for seasonality and external factors in purchase rate
  • Automated alerting and decision rules to avoid manual oversight
  • Simulation or A/B testing to validate new threshold before full rollout

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