Max Dice Roll

Difficulty: Medium | Asked by: Spotify

Problem Statement

A fair die is rolled n times. What is the probability that the largest number rolled is r, for each r in 1..6?

Solution

First, let's note that when we're throwing a fair dice n times, we can have exactly \(6^n\) outcomes of this experiment. Now let's start with the simplest case: assuming that a fair dice was rolled n times, what's the probability that observed max value was exactly 1? There's only one scenario when it's possible - we should get 1 on each roll. The probability of such event is: $$P(max(X_{1},...,X_{n}) = 1) = (1/6)^n$$ Now let's imagine that after n rolls the max observed value was 2. It means that during n trials we saw either 1 or 2, and 2 appeared at least once. There're \(2^n\) various sequences of 1 and 2 that we can get after n trials, and from this list we need to exclude the sequence that consists of 1 only, so the probability we're looking for is: $$P(max(X_{1},...,X_{n}) = 2) = {2^n - 1 \over 6^n}$$ For r = 3 we can apply the same logic: there're \(3^n\) sequences consisting of 1,2,3 after n trials, but we need to exclude those that that consist of 1 and 2 only. $$P(max(X_{1},...,X_{n}) = 3) = {3^n - 2^n \over 6^n}$$ We can now generalize the answer: $$\pmb{P(max(X_{1},...,X_{n}) = r) = {r^n - (r - 1)^n \over 6^n}}$$ Not convinced? Try the simulation below!

Simulation

show / hide simulation code
Enter the number of experiments 
Enter the number of dice rolls (n) 
 
PREVIOUS NEXT