← TikTok Interview Insights

TikTok·Data Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026Remote

Summary

TikTok data science interview that went deep on regression modeling for retention. The whole session was basically one long applied stats problem broken into pieces, and I was not as sharp on the endogeneity section as I should have been.

Questions Asked (4)

Q1

Write out both a linear probability model and a logistic regression for predicting 7-day retention, using features like treatment exposure, day-1 watch time, new user flag, and fixed effects for country and signup date. Include an interaction term between treatment and new user. How do you interpret the treatment coefficient and the interaction term in each model, and for logit, can you convert a coefficient to an odds ratio and then to a marginal effect at the mean?

Data ModelingA/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

The LPM spec I wrote out fast, no issues.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by writing the two model equations clearly, defining each term and the interaction. Then interpret the treatment coefficient and interaction in each model, emphasizing the difference between additive (LPM) and multiplicative (logit) scales. Finally, explain how to convert logit coefficients to odds ratios and then to marginal effects at the mean, noting the dependence on other covariates.

Pro tip: When interpreting the interaction in a logit model, remember that the interaction coefficient does not directly give the interaction effect on the probability scale; you need to compute marginal effects or use the difference in differences of predicted probabilities. Also, mention that fixed effects for signup date can absorb time trends, so careful with collinearity with treatment if treatment is time-varying.

1. Write the model equations

Write the linear probability model as P(Y=1) = α + β1*Treatment + β2*Day1WatchTime + β3*NewUser + β4*(Treatment*NewUser) + γ*Country + δ*SignupDate + ε. Write the logistic regression as logit(P(Y=1)) = α + β1*Treatment + β2*Day1WatchTime + β3*NewUser + β4*(Treatment*NewUser) + γ*Country + δ*SignupDate.

2. Interpret treatment coefficient in LPM

In the LPM, β1 is the average difference in retention probability between treatment and control for existing users (NewUser=0), holding other covariates constant. For new users, the treatment effect is β1 + β4.

3. Interpret treatment coefficient in logit

In the logit, β1 is the change in log-odds of retention for treatment vs control for existing users. Exponentiating gives the odds ratio: exp(β1). For new users, the odds ratio is exp(β1 + β4).

4. Interpret interaction term

In LPM, β4 is the difference in treatment effect (probability points) between new and existing users. In logit, β4 is the difference in log-odds ratios; exp(β4) is the ratio of odds ratios (treatment effect for new users relative to existing users).

5. Convert logit coefficient to odds ratio and marginal effect

Exponentiate the coefficient to get odds ratio. To get marginal effect at the mean, compute p = 1/(1+exp(-(α + β1*mean(Treatment) + ...))) and then the marginal effect of Treatment is β1 * p * (1-p) for a continuous variable, but for binary treatment, it's the difference in predicted probabilities when Treatment=1 vs 0, evaluated at means of other covariates.

Key Points to Mention

  • LPM coefficients are directly interpretable as marginal effects on probability, but can predict probabilities outside [0,1].
  • Logit coefficients are on log-odds scale; exponentiate to get odds ratios.
  • Interaction term in LPM is additive; in logit it's multiplicative on odds scale.
  • Marginal effects in logit depend on the values of other covariates; use average marginal effects or marginal effects at the mean.
  • Fixed effects for country and signup date control for unobserved heterogeneity but can lead to incidental parameters problem in logit if many groups.
  • For binary treatment, the marginal effect is the difference in predicted probabilities, not simply β*p*(1-p).

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

Q2

What assumptions and diagnostics would you check for these models? Cover heteroskedasticity, perfect separation, multicollinearity, misspecification, and calibration. Also, what kind of standard errors would you report and how would you decide whether to cluster them, and on what variable?

Data ModelingTechnical Trade-offsA/B Testing & Experimentation
Author's notes

Went through heteroskedasticity and HC-robust SEs fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first addressing each diagnostic (heteroskedasticity, perfect separation, multicollinearity, misspecification, calibration) with specific tests and remedies, then discuss standard error choices and clustering decisions. Emphasize how these choices depend on the model type (e.g., logistic vs. linear) and the data structure (e.g., panel, time series, hierarchical). Conclude with a practical framework for deciding on clustering based on the data generating process and potential correlation.

Pro tip: Always connect diagnostics to business impact—e.g., heteroskedasticity can inflate false positives in A/B tests, while miscalibration can mislead targeting decisions. Mention that at TikTok, with massive user-level data, clustering by user or content ID is often essential to avoid underestimated standard errors.

1. Identify model type and data structure

Clarify whether the model is linear, logistic, or another GLM, and note the data's hierarchical or panel structure (e.g., users nested in regions, repeated observations). This determines which diagnostics and standard error adjustments are relevant.

2. Run diagnostics for each assumption

For heteroskedasticity: plot residuals vs. fitted, use Breusch-Pagan or White test; for perfect separation: check for extreme coefficients or use penalized regression; for multicollinearity: compute VIF or condition number; for misspecification: use RESET test, link test, or compare with flexible models; for calibration: plot observed vs. predicted probabilities and compute Brier score or calibration slope.

3. Choose appropriate standard errors

Decide between homoskedastic, heteroskedasticity-robust (e.g., White), or cluster-robust standard errors based on diagnostics. If clustering, specify the cluster variable (e.g., user ID, session ID) and justify it by the correlation structure.

4. Decide on clustering and implement

Cluster when observations within groups are correlated (e.g., repeated measures per user). Use cluster-robust standard errors with the cluster variable that captures the dependence; test sensitivity by comparing with and without clustering.

5. Summarize and communicate trade-offs

Explain how each diagnostic and standard error choice affects inference and business decisions. Highlight that ignoring these issues can lead to biased coefficients, invalid p-values, or poor predictions.

Key Points to Mention

  • Heteroskedasticity: Use robust standard errors (e.g., HC3) or model the variance (e.g., WLS, GLS).
  • Perfect separation: Detect via large coefficients or separation plots; remedy with Firth's penalized likelihood or Bayesian priors.
  • Multicollinearity: Assess with VIF > 5 or 10; consider dropping variables, combining them, or using regularization.
  • Misspecification: Test functional form with RESET, link test, or splines; check for omitted variable bias.
  • Calibration: Use calibration plots, Hosmer-Lemeshow test, or Brier score; recalibrate with Platt scaling or isotonic regression if needed.
  • Standard errors and clustering: Choose cluster-robust SEs when intra-cluster correlation exists; cluster on the unit of dependence (e.g., user, content, time period) and justify with ICC or design effect.

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

Q3

If day-1 watch time is endogenous because it reflects unobserved user preferences, what are two approaches to address that? Walk through the assumptions behind each. What instruments or proxies might actually be valid here?

Data ModelingTechnical Trade-offsRoot Cause Analysis
Author's notes

This was the hardest part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the endogeneity problem: day-1 watch time is correlated with unobserved user preferences that also affect the outcome (e.g., long-term engagement). Then, present two approaches: (1) instrumental variables (IV) and (2) proxy variables or fixed effects. For each, explicitly state the assumptions required for validity and discuss potential instruments/proxies in the TikTok context, such as random exposure to content or app-level variations.

Pro tip: Acknowledge that no instrument is perfect; discuss the trade-off between bias and variance, and suggest sensitivity analyses (e.g., plausible exogenous variation) to strengthen your answer.

1. Define the endogeneity problem

Explain that day-1 watch time is endogenous because unobserved user preferences (e.g., content taste, engagement propensity) affect both day-1 watch time and the outcome (e.g., long-term retention). This creates omitted variable bias.

2. Approach 1: Instrumental Variables (IV)

Propose using an instrument that affects day-1 watch time but is uncorrelated with unobserved preferences. State the assumptions: relevance (instrument affects day-1 watch time) and exogeneity (instrument is uncorrelated with the error term).

3. Approach 2: Proxy variables or fixed effects

Suggest using proxies for unobserved preferences (e.g., historical behavior, device type) or fixed effects (e.g., user fixed effects) to control for time-invariant unobserved heterogeneity. Assumptions: proxy is correlated with the unobserved preference and uncorrelated with the error; fixed effects assume unobserved preferences are time-invariant.

4. Evaluate potential instruments/proxies

Discuss valid instruments/proxies in TikTok context: random content exposure (e.g., A/B tests, algorithmic variations), app version updates, network outages, or natural experiments. For proxies: pre-period engagement metrics, demographics, or device characteristics.

5. Discuss limitations and trade-offs

Acknowledge that instruments may be weak or violate exogeneity; proxies may be imperfect. Suggest robustness checks, sensitivity analyses, and triangulation with multiple methods.

Key Points to Mention

  • Endogeneity due to omitted variable bias (unobserved user preferences)
  • Instrumental variables: relevance and exogeneity assumptions
  • Proxy variables: correlation with unobserved preference and uncorrelated with error
  • Fixed effects: controlling for time-invariant unobserved heterogeneity
  • Potential instruments: random content exposure, algorithmic changes, app updates, network outages
  • Limitations: weak instruments, proxy validity, and need for sensitivity analysis

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

Q4

You also have count data for daily videos watched. When would you prefer Poisson or negative binomial regression over OLS for this? How do you check for overdispersion, and how do you interpret the exponentiated coefficients?

Data ModelingTechnical Trade-offsProduct Analytics & Metrics
Author's notes

Felt more comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining that count data like daily videos watched is non-negative and often skewed, making OLS inappropriate due to violated assumptions. Then discuss when Poisson or negative binomial is preferred, focusing on the mean-variance relationship and overdispersion. Finally, cover how to check for overdispersion and interpret exponentiated coefficients in practical terms.

Pro tip: Emphasize that in practice, negative binomial is often the default for count data because overdispersion is the norm, not the exception. Also, mention that exponentiated coefficients represent multiplicative effects on the expected count, which is directly interpretable for product metrics like video watches.

1. Identify when OLS is inappropriate

Explain that OLS assumes continuous, normally distributed errors with constant variance, which is violated for count data that is non-negative, integer, and often heteroscedastic.

2. Choose between Poisson and negative binomial

Discuss that Poisson assumes mean equals variance, while negative binomial relaxes this by adding a dispersion parameter. Prefer Poisson when variance equals mean; otherwise, negative binomial.

3. Check for overdispersion

Describe methods such as comparing residual deviance to degrees of freedom, using Pearson chi-square statistic, or conducting a dispersion test (e.g., Cameron & Trivedi's test).

4. Interpret exponentiated coefficients

Explain that exponentiating a coefficient gives the multiplicative change in the expected count for a one-unit increase in the predictor, holding other variables constant.

5. Relate to product context

Connect the modeling choice to TikTok's metrics, e.g., understanding what drives daily video watches and how changes in features affect engagement.

Key Points to Mention

  • Count data characteristics: non-negative integers, often skewed, variance increases with mean.
  • Poisson regression assumes equidispersion (mean = variance); negative binomial allows overdispersion.
  • Overdispersion tests: deviance/df ratio, Pearson chi-square/df, Cameron & Trivedi test.
  • Exponentiated coefficients are incidence rate ratios (IRRs), interpreted as multiplicative effects.
  • Negative binomial is often preferred in practice due to unobserved heterogeneity.
  • OLS can yield negative predictions and inefficient estimates for count data.

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