Example 2.5.3 Rolling a die once, the probabilities of the outcomes being $1,2, \cdots, 6$ are all $\frac{1}{6}$. If the die is rolled 10 times consecutively, what is the probability that the sum of the outcomes is 30?
Solution: The generating function $f(x)=\left(x+x^{2}+x^{3}+x^{4}+x^{5}+x^{6}\right)^{10}=x^{10}\left(\frac{1-x^{6}}{1-x}\right)^{10}$
$$
=x^{10} \cdot \sum_{i=0}^{10}(-1)^{i} \mathrm{C}_{10}^{i} x^{6 i} \cdot \sum_{i=0}^{\infty} \mathrm{C}_{10+i-1}^{9} x^{i} \text {, }
$$
The coefficient of $x^{30}$, $f_{30}=\mathrm{C}_{29}^{9}-\mathrm{C}_{23}^{9} \cdot \mathrm{C}_{10}^{1}+\mathrm{C}_{17}^{9} \cdot \mathrm{C}_{10}^{2}-\mathrm{C}_{11}^{9} \cdot \mathrm{C}_{10}^{3}=2930455$, so the probability is $P=\frac{2930455}{6^{10}} \approx 0.0485$.