← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

SeniorPending
Sep 2025Remote

Summary

Meta data scientist interview that went deep into survival analysis and nonparametric statistics for ad conversion measurement. The whole thing was a single extended technical problem about right-censored CVR estimation, which I was not expecting to be this involved.

Questions Asked (5)

Q1

Propose a nonparametric estimator for a 14-day conversion rate when recent impressions are right-censored due to unknown conversion delays. How would you use historical cohorts to learn the delay survival function and debias the current partially observed cohort? Write out the formulas and specify what data each term requires.

A/B Testing & ExperimentationProduct Analytics & MetricsTechnical Trade-offs
Author's notes

This is where I spent most of my mental energy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as right-censored survival analysis where conversion time is the event time and the 14-day conversion rate is the cumulative incidence at day 14. Propose a nonparametric estimator that combines the empirical conversion-time distribution from historical cohorts with the current cohort's partially observed data, using inverse probability of censoring weighting (IPCW) or a Kaplan-Meier-type estimator to debias the current cohort.

Pro tip: Emphasize that the key assumption is that the delay distribution is stable over time; validate this by comparing historical cohorts and testing for drift. Also, mention that you would use the current cohort's early conversions to adjust the historical delay curve if needed, e.g., via a multiplicative shift.

1. Define the estimand and data structure

Clarify that the 14-day conversion rate is the probability of conversion within 14 days of impression. For each user i, we observe impression time T_i, conversion time C_i (if converted), and censoring time U_i = min(C_i, 14 days). Data: current cohort has (T_i, U_i, δ_i) where δ_i=1 if converted by 14 days, else 0; historical cohorts have full conversion times for users who converted within some window.

2. Estimate the delay survival function from historical cohorts

Using historical cohorts with complete follow-up (e.g., 30 days), compute the empirical distribution of conversion delays D = C - T. Estimate the survival function S(d) = P(D > d) nonparametrically via Kaplan-Meier or empirical CDF. This requires historical data with known conversion times for all converters.

3. Debias the current cohort using inverse probability of censoring weighting (IPCW)

For the current cohort, each observed conversion by day 14 is weighted by 1 / (1 - S(14 - age_i)), where age_i is the time since impression. The 14-day conversion rate estimator is the weighted sum of conversions divided by the total number of impressions. Formula: \hat{p} = (1/N) * Σ_{i: δ_i=1} [1 / (1 - S(14 - age_i))], where N is total impressions.

4. Alternative: Kaplan-Meier estimator for the current cohort

Alternatively, treat the current cohort as right-censored data and compute the Kaplan-Meier estimate of the conversion time distribution, then evaluate at day 14. This uses only current cohort data but may be unstable if few conversions. Formula: \hat{S}_{KM}(t) = Π_{j: t_j ≤ t} (1 - d_j / n_j), where d_j is conversions at time t_j and n_j is at risk. Then \hat{p} = 1 - \hat{S}_{KM}(14).

5. Validate assumptions and combine estimators

Check that the historical delay distribution is stable over time (e.g., compare S(d) across cohorts). If stable, the IPCW estimator is consistent. If not, consider a hybrid: use current cohort's early conversions to update S(d) via a parametric or semi-parametric model. Report uncertainty via bootstrap.

Key Points to Mention

  • Right-censoring and the need for survival analysis methods like Kaplan-Meier or IPCW.
  • The assumption of stable conversion delay distribution across cohorts and how to test it.
  • Formulas: IPCW estimator \hat{p} = (1/N) Σ δ_i / (1 - S(14 - age_i)) and Kaplan-Meier estimator.
  • Data requirements: historical cohorts with complete conversion times, current cohort with impression times, conversion status, and censoring times.
  • Trade-offs: IPCW relies on historical data but is unbiased if assumption holds; KM uses only current data but may be high variance.
  • Practical considerations: handling of late conversions beyond 14 days, and potential seasonality or drift in delay distribution.

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

Q2

How would you construct a 95% confidence interval for the CVR14 estimate using Greenwood's formula for Kaplan-Meier variance and the delta method for the transformed metric? What assumptions does this require, and how would you widen the intervals if you suspect the delay distribution has shifted over time?

A/B Testing & ExperimentationProduct Analytics & MetricsTechnical Trade-offs
Author's notes

I knew Greenwood's formula in principle but applying the delta method on top of it for a transformed CVR was a bit awkward to write out under pressure.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining CVR14 as a cumulative incidence function (CIF) derived from Kaplan-Meier estimates, then apply Greenwood's formula to obtain the variance of the survival function and use the delta method to transform it to the CVR14 scale. Finally, discuss assumptions and how to adjust intervals if the delay distribution shifts over time.

Pro tip: Emphasize that CVR14 is a cumulative incidence metric and that ignoring censoring or competing risks can bias the estimate; always check the proportional hazards assumption and consider time-varying effects.

1. Define CVR14 and its estimator

Clarify that CVR14 is the cumulative incidence of conversion within 14 days, estimated via 1 - S(14) from Kaplan-Meier, accounting for censoring.

2. Compute Greenwood variance for S(t)

Use Greenwood's formula: Var(S(t)) = S(t)^2 * sum_{t_i <= t} d_i / (n_i (n_i - d_i)), where d_i and n_i are events and at-risk at each event time.

3. Apply delta method for CVR14

Since CVR14 = 1 - S(14), the variance is Var(CVR14) = Var(S(14)) by the delta method (derivative -1). Construct a 95% CI as CVR14 ± 1.96 * sqrt(Var(CVR14)).

4. State assumptions

Assumptions include independent censoring, no competing risks, correct specification of the survival model, and that the delta method approximation is valid (large sample).

5. Adjust for time-varying delay distribution

If the delay distribution shifts, use a time-varying coefficient model or stratified Kaplan-Meier, and widen intervals via bootstrapping or robust variance estimation to account for model misspecification.

Key Points to Mention

  • CVR14 as a cumulative incidence function (1 - survival probability at day 14)
  • Greenwood's formula for variance of Kaplan-Meier survival estimates
  • Delta method for transforming variance to the CVR14 scale
  • Assumptions: independent censoring, no competing risks, proportional hazards
  • Time-varying delay distribution: use stratified or time-varying coefficient models
  • Widening intervals: bootstrap or robust variance estimation

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

Q3

Provide a distribution-free conservative bound for CVR14 using minimal assumptions, such as applying the DKW inequality to the empirical CDF of delays or Clopper-Pearson on observed conversions plus a worst-case bound for impressions that haven't resolved yet. Show how you'd compute it from raw counts available today.

A/B Testing & ExperimentationProduct Analytics & MetricsAlgorithms & Data Structures
Author's notes

Honestly the cleanest part of the interview for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric CVR14 (conversion rate within 14 days) and the data available: conversions, impressions, and delays. Then propose a conservative bound using distribution-free methods: apply the DKW inequality to bound the delay distribution, or use Clopper-Pearson for observed conversions and a worst-case bound for unresolved impressions. Finally, show the computation from raw counts, emphasizing minimal assumptions and conservativeness.

Pro tip: Emphasize that the bound is conservative and distribution-free, which is crucial for trust in A/B testing where false positives are costly. Also, mention that you would validate the bound with historical data or simulations to ensure it's not overly pessimistic.

1. Clarify the metric and data

Define CVR14 as the proportion of impressions that convert within 14 days. Identify the raw counts available: total impressions, conversions observed so far, and the time since each impression (to know which are unresolved).

2. Choose a distribution-free method

Select either the DKW inequality to bound the empirical CDF of conversion delays, or Clopper-Pearson for observed conversions combined with a worst-case bound for unresolved impressions. Justify the choice based on minimal assumptions.

3. Compute the bound from raw counts

For DKW: compute the empirical CDF of delays for resolved impressions, then use the DKW inequality to get a confidence band. For Clopper-Pearson: compute the lower confidence bound on conversion rate for resolved impressions, then assume all unresolved impressions convert (or not) to get a conservative bound.

4. Combine and present the final bound

Combine the bounds appropriately (e.g., take the minimum for a lower bound or maximum for an upper bound) to get a conservative estimate of CVR14. Clearly state the confidence level and assumptions.

5. Discuss practical considerations

Mention how to handle edge cases (e.g., zero conversions), the trade-off between conservativeness and tightness, and how to communicate the bound to stakeholders.

Key Points to Mention

  • DKW inequality: provides a distribution-free confidence band for the CDF, requiring only i.i.d. samples.
  • Clopper-Pearson interval: exact binomial confidence interval for the conversion rate among resolved impressions.
  • Worst-case bound for unresolved impressions: assume all unresolved convert (for upper bound) or none convert (for lower bound).
  • CVR14 definition: conversion within 14 days of impression, so unresolved impressions are those less than 14 days old.
  • Conservative bound: ensures the true CVR14 is likely within the bound with high probability, useful for decision-making.
  • Raw counts: total impressions, conversions, and time since impression for each unresolved unit.

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

Q4

What diagnostics would you run to check whether historical delay distributions are still applicable to current traffic? How would you detect covariate shift using things like PSI or KS tests across traffic mix, device type, or day-of-week effects, and what would you do if shift is detected?

Root Cause AnalysisA/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

I talked through PSI for categorical features and KS for continuous ones, then mentioned stratifying the KM estimator by device or traffic source if shift is detected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a distribution shift detection task, then outline a systematic diagnostic process: compare historical and current delay distributions using statistical tests and drift metrics, segment by key covariates (traffic mix, device type, day-of-week), and finally propose actionable remediation if shift is detected. Emphasize the importance of both global and segment-level monitoring to catch subtle shifts that could impact model performance.

Pro tip: Don't just run tests—quantify the impact of shift on your specific downstream metric (e.g., ETA accuracy) and prioritize segments by business impact. Also, consider using a holdout set from recent data to validate whether retraining or recalibration actually improves performance before deploying changes.

1. Define and measure delay distributions

Clearly specify the delay metric (e.g., delivery time minus estimated time) and compute its distribution for historical and current periods. Use summary statistics, histograms, and quantile plots to visually inspect differences.

2. Run global drift tests

Apply statistical tests like Kolmogorov-Smirnov (KS) or Population Stability Index (PSI) on the overall delay distribution to detect any significant shift. Set thresholds based on business tolerance and monitor over time.

3. Segment by covariates and test for covariate shift

Break down the data by traffic mix (e.g., source channel), device type, day-of-week, and other relevant dimensions. Compute PSI or KS for each segment to identify where the shift is concentrated.

4. Investigate root causes and impact

If shift is detected, drill down to understand why (e.g., new traffic source, device update, seasonal effect). Assess the impact on model performance by evaluating prediction errors on recent data.

5. Remediate and monitor

Decide on actions: retrain the model on recent data, recalibrate predictions, or adjust for segment-specific shifts. Implement continuous monitoring with alerts and A/B test the fix before full rollout.

Key Points to Mention

  • Population Stability Index (PSI) and Kolmogorov-Smirnov (KS) test as drift detection metrics, with typical thresholds (e.g., PSI > 0.1 or 0.2 indicates significant shift).
  • Segmentation by traffic mix, device type, and day-of-week to detect covariate shift and localize the problem.
  • Importance of temporal validation: use time-based splits and monitor drift over time, not just a single comparison.
  • Impact analysis: link distribution shift to changes in model performance metrics (e.g., MAE, RMSE) and business KPIs.
  • Remediation strategies: retraining, recalibration, or adding new features to account for the shift; consider online learning if shift is frequent.
  • Continuous monitoring and alerting: set up automated dashboards and alerts for PSI/KS on key segments to catch shifts early.

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

Q5

If you only have access to aggregated daily counts of impressions and same-day conversions with no user-level data, how would you approach estimating or bounding CVR14? What additional assumptions are required to make this identifiable?

Product Analytics & MetricsTechnical Trade-offsAdaptability & Ambiguity
Author's notes

This one tripped me up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric definition and the data limitations, then propose a bounding approach using the relationship between same-day CVR and CVR14. Use assumptions like stable conversion delay distribution or stationarity to derive bounds, and discuss how to validate or refine with additional data.

Pro tip: Acknowledge that without user-level data, CVR14 is not identifiable, but you can provide useful bounds by leveraging known patterns from similar products or historical data. Always state your assumptions explicitly and discuss sensitivity.

1. Clarify the metric and data

Define CVR14 as conversions within 14 days of impression divided by impressions. Confirm that you only have daily aggregated impressions and same-day conversions, so you cannot track users over time.

2. Identify the missing information

Recognize that CVR14 requires knowing conversions on days 1-13 after impression, which are not directly observed. The same-day conversions only give you CVR0.

3. Propose bounding strategies

Use assumptions to bound CVR14. For example, if you assume conversions only happen within 14 days, then CVR14 >= CVR0. If you assume a maximum conversion rate per day, you can set an upper bound. Alternatively, use a conversion delay distribution from historical data to estimate.

4. State required assumptions for identifiability

To make CVR14 identifiable, you need assumptions like: the conversion delay distribution is stable over time, or the ratio of CVR14 to CVR0 is constant. Discuss how these assumptions might be validated.

5. Discuss validation and sensitivity

Suggest ways to validate assumptions, such as using holdout data or A/B tests where user-level data is available. Perform sensitivity analysis on the bounds to show robustness.

Key Points to Mention

  • Definition of CVR14 and the difference from same-day CVR (CVR0)
  • The problem of identifiability without user-level data
  • Bounding techniques: lower bound (CVR0) and upper bound (e.g., assuming all users convert within 14 days)
  • Use of historical conversion delay distributions to estimate CVR14
  • Assumptions needed: stationarity, stable delay distribution, no seasonality effects
  • Sensitivity analysis and validation with additional data sources

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