Find the probability of getting 5 exactly twice in 7 throws of a die.
The repeated tossing of a die are Bernoulli trials. Let X represent the number of times of getting 5 in 7 throws of the die.
Probability of getting 5 in a single throw of the die, $p=\frac{1}{6}$
$\therefore q=1-p=1-\frac{1}{6}=\frac{5}{6}$
Clearly, $\mathrm{X}$ has the probability distribution with $n=7$ and $p=\frac{1}{6}$
$\therefore \mathrm{P}(\mathrm{X}=x)={ }^{9} \mathrm{C}_{x} q^{n-x} p^{x}={ }^{7} \mathrm{C}_{x}\left(\frac{5}{6}\right)^{7-x} \cdot\left(\frac{1}{6}\right)^{x}$
P (getting 5 exactly twice) = P(X = 2)
$={ }^{7} \mathrm{C}_{2}\left(\frac{5}{6}\right)^{5} \cdot\left(\frac{1}{6}\right)^{2}$
$=21 \cdot\left(\frac{5}{6}\right)^{3} \cdot \frac{1}{36}$
$=\left(\frac{7}{12}\right)\left(\frac{5}{6}\right)^{5}$