← Zoox Interview Insights

Zoox·Machine Learning Engineer·Technical Phone Screen·Senior

Senior
May 2026

Summary

Zoox ML engineer interview with a probability question that looks deceptively simple but has three parts that build on each other. The Bayesian twist in part (b) is where things get interesting, and part (c) catches you if you're not careful about what you're conditioning on.

Questions Asked (1)

Q1

You have a 6-sided die and an 8-sided die. You pick one uniformly at random and roll it. What is the probability of rolling a 3? Then, given you rolled a 3, what is the posterior probability that you picked the 6-sided die? Finally, using that posterior, what is the expected value of the next roll on that same die?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Three-part question that flows into itself.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Break the problem into three parts: first compute the marginal probability of rolling a 3 using the law of total probability, then apply Bayes' theorem to find the posterior probability of the 6-sided die given a 3, and finally compute the expected value of the next roll using that posterior. Clearly state assumptions (fair dice, independent rolls) and show calculations step-by-step.

Pro tip: After computing the posterior, explicitly state that the next roll is independent of the first roll given the die, so the posterior is used as the mixing weight for the expected values of each die. This demonstrates understanding of conditional independence and avoids the common mistake of thinking the first roll affects the next roll beyond updating the die identity.

1. Define events and probabilities

Let D6 be the event of picking the 6-sided die and D8 the 8-sided die. Since the die is picked uniformly, P(D6)=P(D8)=1/2. Define R3 as rolling a 3.

2. Compute marginal probability of rolling a 3

Use the law of total probability: P(R3) = P(R3|D6)P(D6) + P(R3|D8)P(D8) = (1/6)(1/2) + (1/8)(1/2) = 1/12 + 1/16 = 7/48.

3. Apply Bayes' theorem for posterior

Compute P(D6|R3) = P(R3|D6)P(D6) / P(R3) = (1/6 * 1/2) / (7/48) = (1/12) / (7/48) = 4/7.

4. Compute expected value of next roll

The expected value of a fair 6-sided die is 3.5, and of a fair 8-sided die is 4.5. Using the posterior as weights: E[next roll] = P(D6|R3)*3.5 + P(D8|R3)*4.5 = (4/7)*3.5 + (3/7)*4.5 = 2 + 27/14 = 55/14 ≈ 3.9286.

Key Points to Mention

  • Law of total probability for marginal probability
  • Bayes' theorem for posterior probability
  • Conditional independence of rolls given the die
  • Expected value of a uniform die: (n+1)/2
  • Weighted average using posterior probabilities
  • Assumption of fair dice and uniform selection

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