Probability Both Drinks from One Coffee Shop Outscore Both Drinks from Another
Company: Mercor
Role: Software Engineer
Category: Statistics & Math
Difficulty: medium
Interview Round: Technical Screen
You visit two coffee shops, A and B, and order two drinks at each. Each of the four drinks receives a quality score. What is the probability that both drinks from shop A have higher scores than both drinks from shop B?
```hint Only the order matters
If all four scores come from the same continuous distribution, think about which features of the four scores the event actually depends on.
```
### Clarifying Questions
- Are the four scores independent draws from the same distribution, that is, are the two shops equally good?
- Are the scores continuous, so that ties have probability zero, or can two drinks receive the same score?
- Does "higher" mean strictly higher?
### What a Strong Answer Covers
- The assumptions that make the question answerable (independence, identical distributions, no ties), stated explicitly
- A symmetry argument over rankings of the four drinks, with a correct count of favorable rankings
- A check of the result by a second method
- Why multiplying pairwise or per-drink probabilities gives a wrong answer
- How the answer changes with ties, unequal shops, or other numbers of drinks
### Follow-up Questions
- Generalize: m drinks from A and n drinks from B. What is the probability that every A drink outscores every B drink?
- What is the probability that the single best of the four drinks comes from shop A?
- If scores are whole numbers from 1 to 10, so that ties are possible, how does the calculation change?
- If shop A's drinks tend to be better, is the probability above or below the symmetric answer, and how would you compute it?
Overview: A probability brainteaser: two drinks are ordered at each of two coffee shops and every drink receives a quality score, and you must find the probability that both drinks from the first shop outscore both drinks from the second. It tests symmetry arguments, counting rankings, and stating independence and tie assumptions.
Read the full Mercor Software Engineer interview experience this question came from