It is given that a die is thrown 7 times.
Let the number of times of getting 5 in 7 throws of a die be represented by X.
The probability of getting 5 in a single throw of die is,
So,
Then, X has a binomial distribution with
The probability of
Where
The probability of getting 5 exactly twice is,
Therefore, the probability of getting 5 exactly twice is