Here is a simulation of a one-dimensional diffusion (e.g. a stock price) with given constant drift and volatility, which uses a Monte Carlo algorithm (repeated simulation) to estimate the mean of the maximum value.
[Oops, your browser will not display java applets.]