Calculate factorials and understand their significance in combinatorial probability.
The factorial of a non-negative integer n is denoted by n! and is defined as:
Special cases:
For large values of n, Stirling's approximation can be used:
Calculate probabilities for various scenarios.
Generate random numbers from various distributions.
Calculate expected values for random variables.