Probability Both Drinks from One Coffee Shop Outscore Both Drinks from Another
MercorSoftware Engineer · Technical ScreenLast updated
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.
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?
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?
Hints
Hint 1
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.
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?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.