Upstart Interview Question

3 dice, probability of strictly decreasing

Interview Answer

Anonymous

Nov 17, 2020

The total probability space is all combinations of three dice: d1 = [1,2,3,4,5,6] d2 = [1,2,3,4,5,6] d3 = [1,2,3,4,5,6] The total possibilities are 6^3, or 216. If you inspect the decreasing possibilities, it is possible to quickly enumerate them, as they are relatively few: - 6,5,4 - 6,5,3 - 6,5,2 - 6,5,1 - 6,4,3 - 6,4,2 - 6,4,1 - 6,3,2 - 6,3,1 - 6,2,1 - 5,4,3 - 5,4,2 - 5,4,1 - 5,3,2 - 5,3,1 - 5,2,1 - 4,3,2 - 4,3,1 - 4,2,1 - 3,2,1 20 in total. Therefore the probability is 20/216, or 0.093. I wrote a script in python to verify. Be aware of the procedure in case of the interviewer asking follow up questions regarding if the number of dice or the number of faces were different. How might it affect the answer?

1