Simulation (Probability)
A simulation uses random processes to model and estimate the probability of events that are complex to calculate analytically.
Definition
A simulation is when you use a random process (like flipping coins, rolling dice, or using a computer) to model a real situation and estimate probabilities that are complex to calculate analytically. Random number generators, dice, spinners, or random number tables can serve as simulation tools; by running many trials, the experimental probability from the simulation estimates the true theoretical probability. Formally, Monte Carlo simulation is a computational method that uses random sampling to estimate mathematical quantities, including probabilities, integrals, and optimization solutions: if $X$ is a random variable with $E[f(X)] = \mu$, then $(1/n)\sum f(X_i) \to \mu$ by the LLN, providing an estimator with standard error $\sigma_f/\sqrt{n}$.
Example
To estimate the probability of getting at least $3$ heads in $5$ flips, you can flip a coin $5$ times, record the result, and repeat $100$ times, using the fraction of trials with $3$ or more heads to estimate the probability. Simulating the birthday problem, whether at least $2$ of $23$ people share a birthday, by assigning random birthdays and checking for matches over $10{,}000$ repetitions gives an experimental probability close to the theoretical $0.507$. Estimating $\pi$ via Monte Carlo: generate $n$ random points $(x,y)$ uniformly in $[0,1]^2$, count hits where $x^2+y^2 \le 1$, and estimate $\pi/4$ by the fraction of hits; for $n=10{,}000$, the standard error is about $0.01$, so $\pi$ is estimated to about $2$ decimal places.
Key Insight
Simulations are especially useful when the math is too complicated: you can always get an approximate answer by running the experiment many times, and the more trials you run, the closer the result is to the true probability (the law of large numbers). Markov chain Monte Carlo (MCMC) methods (Metropolis-Hastings, Gibbs sampling) extend simulation to high-dimensional distributions where direct sampling is impossible, constructing a Markov chain whose stationary distribution is the target distribution and enabling Bayesian posterior sampling and integration.