← TikTok Interview Insights

TikTok·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

First round screen for a Data Scientist role at TikTok. Pretty quick, just a probability warm-up to see if you know your distributions.

Questions Asked (1)

Q1

If X follows a Uniform(0,1) distribution, what is the expected number of independent draws needed before you get a value greater than 0.8?

Product Analytics & Metrics
Author's notes

The answer is 5, geometric distribution with p=0.2.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize this as a geometric distribution problem where each draw is a Bernoulli trial with success probability p = 0.2 (since P(X > 0.8) = 0.2). The expected number of trials until the first success is 1/p = 5. Explain the reasoning clearly, including the memorylessness property and the formula for the mean of a geometric distribution.

Pro tip: Connect this to product analytics by mentioning how such calculations inform experiment design, e.g., estimating the number of user actions needed to observe a rare event, and note that the result is independent of the specific threshold as long as the probability is correctly computed.

1. Define success and identify distribution

Define a 'success' as drawing a value greater than 0.8. Since each draw is independent and has constant success probability, the number of draws until the first success follows a geometric distribution.

2. Compute success probability

For X ~ Uniform(0,1), P(X > 0.8) = 1 - 0.8 = 0.2. So p = 0.2.

3. Apply expected value formula

The expected number of trials for the first success in a geometric distribution is E[N] = 1/p. Thus, E[N] = 1/0.2 = 5.

4. Interpret and validate

Interpret the result: on average, it takes 5 draws to get a value > 0.8. Validate by considering that each draw has a 20% chance, so intuitively about 1 in 5 draws should succeed.

Key Points to Mention

  • Geometric distribution models the number of independent trials until the first success.
  • Success probability p = P(X > 0.8) = 0.2 for Uniform(0,1).
  • Expected value of geometric distribution is 1/p.
  • Memorylessness property: past failures do not affect future probabilities.
  • The result is independent of the specific threshold as long as p is correctly computed.
  • Application to product analytics: estimating sample sizes or time-to-event in experiments.

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