← Yahoo Interview Insights

Yahoo·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Yahoo data science interview with a gaming analytics team that threw a probability puzzle at me I genuinely was not expecting. The question was more math-heavy than I anticipated for a DS role, felt like it belonged in a combinatorics class.

Questions Asked (1)

Q1

You have two standard six-sided dice. Is it possible to relabel the faces so that when you roll both, every sum from 1 to 12 comes up with equal probability? Either show how you'd do it, or prove it's impossible.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I stared at this for way too long before saying anything useful.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify that 'relabel' means assigning arbitrary integers to the faces, not necessarily 1-6. Then, use a generating function or probability argument to show that equal probability for sums 1-12 is impossible, because the sum of two dice has a triangular distribution and relabeling cannot flatten it to uniform.

Pro tip: A quick sanity check: the sum of two dice has 36 equally likely outcomes, so each sum 1-12 would need exactly 3 outcomes. But the minimum sum is the sum of the two smallest face values, and the maximum is the sum of the two largest; the number of ways to achieve these extremes is always 1, not 3, unless faces are duplicated—which still fails. This simple counting argument often impresses interviewers.

1. Clarify the problem

Confirm that relabeling means assigning any integers to the faces, and that the dice are fair and independent. State that we need each sum from 1 to 12 to have probability 1/12.

2. Count outcomes

There are 36 equally likely outcomes when rolling two dice. For each sum to have probability 1/12, each sum must occur exactly 3 times.

3. Analyze extremes

The minimum possible sum is the sum of the two smallest face values (one from each die). This sum can occur in only one way (both dice show their minimum). Similarly, the maximum sum occurs in only one way. Thus, the minimum and maximum sums each occur exactly once, contradicting the requirement of 3 occurrences.

4. Conclude impossibility

Since the minimum and maximum sums cannot occur 3 times, it is impossible to have a uniform distribution over sums 1-12. Therefore, no relabeling can achieve the goal.

Key Points to Mention

  • There are 36 equally likely outcomes for two dice.
  • Uniform distribution over 12 sums requires each sum to appear exactly 3 times.
  • The minimum sum (sum of the two smallest faces) occurs only once.
  • The maximum sum (sum of the two largest faces) occurs only once.
  • This contradicts the requirement of 3 occurrences for each sum.
  • Relabeling with arbitrary integers does not change the fundamental counting argument.

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