DEV Community

Feng Zhang
Feng Zhang

Posted on • Originally published at prachub.com

TikTok Data Scientist Interview Cheatsheet 2026

TikTok Data Scientist interviews usually test product sense, causal reasoning, SQL, experiment design, and statistics. The tricky part is that the prompts can sound basic: calculate retention, analyze a funnel, design an A/B test, explain a metric tradeoff. Strong answers go past the query or formula and explain what decision the analysis supports.

This guide adapts PracHub's TikTok Data Scientist interview prep cheatsheet into a standalone study plan for developer-community readers.

What the interview is really testing

A TikTok-style Data Scientist interview is rarely about memorizing definitions. You are being tested on whether you can reason from messy event data to a product decision.

Expect questions across these areas:

  • SQL and Python data manipulation
  • Cohort, retention, funnel, and product metrics
  • A/B testing and experiment design
  • Power, diagnostics, and inference under noisy data
  • Causal inference methods like matching and difference-in-differences
  • Recommendation, ads ranking, and marketplace objectives
  • Classification thresholds and imbalanced learning
  • Communication with product and engineering partners

The onsite rounds often combine several of these. A question about DAU and ad revenue, for example, is also a question about metric decomposition, segmentation, causal inference, and launch tradeoffs.

Cohorts, retention, funnels, and product metrics

For product analytics questions, start by defining the unit and denominator. Many weak answers fail before the SQL starts because they count the wrong thing.

A cohort groups users by a shared starting point, such as signup date, first app open, first post, first purchase, or first experiment exposure. Always clarify which one applies.

A common cohort key is:

DATE(MIN(event_ts)) AS cohort_date
Enter fullscreen mode Exit fullscreen mode

partitioned by user_id, but the meaning depends on the product question.

For day-N retention, the basic definition is:

day-N retention =
users active on cohort_date + N / users in cohort
Enter fullscreen mode Exit fullscreen mode

You still need to define "active." It could mean opening the app, watching a video, posting, liking, purchasing, or some other qualifying event.

Also separate exact retention from rolling retention:

  • Day-7 exact retention: user was active exactly on day 7
  • 7-day rolling retention: user was active at least once from day 1 through day 7

These answer different questions. Exact retention is closer to a habit signal. Rolling retention captures less frequent usage.

Funnels have the same issue. A funnel such as:

video_view -> profile_visit -> follow
Enter fullscreen mode Exit fullscreen mode

can be measured at the user level, session level, or item level. The conversion rate can change a lot based on that choice.

Temporal order matters. If you count unordered events, you will overstate conversion. Require each step to happen after the previous one, often with window functions such as:

ROW_NUMBER() OVER (
  PARTITION BY user_id, product_id
  ORDER BY event_ts
)
Enter fullscreen mode Exit fullscreen mode

That lets you deduplicate repeated actions and enforce the sequence.

The DAU vs ad revenue question

A common interview prompt is some version of: "DAU increased, but ad revenue decreased. How would you analyze it?"

Do not jump straight to "optimize for growth" or "optimize for revenue." Break the metric apart.

A useful decomposition is:

Revenue =
DAU
x sessions per user
x impressions per session
x fill rate
x eCPM
Enter fullscreen mode Exit fullscreen mode

Now you can ask better questions:

  • Did traffic grow, but from lower-monetizing regions?
  • Did sessions per user fall?
  • Did ad impressions per session decrease?
  • Did auction pricing change?
  • Did fill rate drop?
  • Did new users retain worse than existing users?
  • Did ad load changes affect watch time or churn?

A strong answer includes both objective metrics and guardrails. Objective metrics might include DAU, ad revenue, ARPDAU, retention, watch time, and ad impressions per user. Guardrails might include day-7 retention, session length, ad fatigue signals, and creator-side metrics if the feature affects posting supply.

Segmentation is part of the core answer, not an optional add-on. Break results down by geography, acquisition source, user maturity, device, content vertical, and engagement level. A flat average can hide a traffic mix shift.

Also watch for censoring. If today is May 23, users who joined on May 20 cannot have day-7 retention yet. Exclude immature cohorts or mark them incomplete. Do not treat missing future activity as churn.

A/B testing: design before math

For experimentation questions, do not start with "randomize users 50/50." Start with the causal question.

A good structure is:

  1. Objective
  2. Hypothesis
  3. Unit of randomization
  4. Eligibility and exposure
  5. Primary metric
  6. Guardrail metrics
  7. Power and minimum detectable effect
  8. Validity risks
  9. Analysis plan
  10. Decision rule

The unit of randomization is a design choice. User-level randomization works when one user's treatment does not affect another user's outcome. That assumption can break in recommendation systems, creator ecosystems, and ad auctions.

If treatment affects shared inventory, creator exposure, feed composition, or advertiser competition, consider cluster, geo, advertiser-level, or switchback designs.

Eligibility and exposure rules also matter. For a For You feed experiment, assigned users are not the same as exposed users. A user may be assigned to treatment but never open the app or never see the new ranking behavior. Define both assignment and treatment exposure.

Your metric hierarchy should match the decision:

  • Recommendation experiments: watch time per user, retention, sessions, like rate, hide rate, content diversity
  • Monetization experiments: revenue per user, RPM, cost per conversion, advertiser ROAS
  • Guardrails: report rate, crash rate, latency, not-interested rate, retention, creator concentration

Power should be discussed before launch. A common two-sample approximation is:

n ≈ 2σ²(z(1-α/2) + z(1-β))² / δ²
Enter fullscreen mode Exit fullscreen mode

where δ is the minimum detectable effect. If you want to detect an effect half as large, you need roughly four times the sample size.

Ratio metrics need care. Metrics like cost per conversion or watch time per session have random denominators. Look at numerator and denominator separately, or use methods like the delta method or bootstrap.

CUPED can reduce variance by adjusting for pre-experiment behavior:

Y_adj = Y - θ(X - X_bar)
θ = Cov(Y, X) / Var(X)
Enter fullscreen mode Exit fullscreen mode

This works best when pre-period behavior predicts post-period outcomes, such as historical watch time predicting future watch time.

Interference, seasonality, and sequential peeking

TikTok-style experiments often have interference. One user's treatment may change what content creators make, how inventory is allocated, or what untreated users see. If that risk is present, say so directly.

Cluster randomization can reduce contamination, but it lowers power. The effective sample size depends on intra-cluster correlation. A common design effect is:

DE = 1 + (m - 1)ρ
Enter fullscreen mode Exit fullscreen mode

where m is average cluster size and ρ is intra-cluster correlation.

Seasonality also needs a real plan. Run treatment and control concurrently, cover full weekly cycles, and account for region, day of week, time zone, device, and traffic source when those affect the baseline.

Sequential monitoring is another common trap. If you check results every day and stop as soon as p < 0.05, your false positive rate is higher than 5%. Use a pre-planned monitoring rule, alpha spending, group sequential tests, or mark interim reads as exploratory.

Statistics that come up often

For binary outcomes like conversion, activation, or retention, the standard difference-in-proportions test is common:

SE = sqrt(
  pT(1 - pT) / nT +
  pC(1 - pC) / nC
)
Enter fullscreen mode Exit fullscreen mode

Then compare:

(pT - pC) / SE
Enter fullscreen mode Exit fullscreen mode

against a normal approximation.

For one-sample proportion tests, compare an observed rate against a benchmark. For example, if a campaign must exceed 60% conversion, test the observed conversion rate against p0 = 0.60.

With clustered randomization, do not pretend millions of events are millions of independent observations. The unit of analysis should line up with the unit of randomization. You may need cluster-level aggregation or cluster-robust standard errors. With too few clusters, be cautious and consider small-sample corrections or randomization inference.

How to answer in the interview

For metric questions, use this pattern:

Clarify the product setup.
Define the unit, denominator, and time window.
Write the metric logic.
Segment the result.
Check causality and bias.
Discuss decision and guardrails.
Enter fullscreen mode Exit fullscreen mode

For experiment questions, use this pattern:

Define the hypothesis.
Choose the randomization unit.
Define eligibility and exposure.
Pick primary and guardrail metrics.
Plan power and duration.
Call out interference and seasonality.
State the analysis and launch rule.
Enter fullscreen mode Exit fullscreen mode

If you want more targeted prompts, PracHub has a bank of data science interview practice questions that pairs well with this study plan.

Final prep advice

The best TikTok Data Scientist answers are precise. Define the metric before calculating it. Be explicit about correlation versus causation. Talk through tradeoffs without hand-waving. A statistically significant lift can still be a bad launch if guardrails move the wrong way.

For the full version of the cheatsheet, including the original topic map and interview framing, use PracHub's TikTok Data Scientist interview prep guide.

Top comments (0)