An introduction to stochastic modeling