ModelRisk needs to be installed in order for the model to work.
An example of a Monte Carlo simulation risk analysis model for forecasting
Technical difficulty: 2
Many things we are concerned about occur randomly in time: people arriving at a queue (customers, emergency patients, telephone calls into a centre, etc); accidents, natural disasters, shocks to a market, terrorist attacks, etc. Naturally we may want to model these over time, perhaps to figure out whether we will have enough stock vaccine, storage space, etc. The natural contender for modelling random events is the Poisson distribution which takes one parameter λ and models the number of random events occurring in a unit of time given that, on average, there should be λ events in a unit of time. Often, this expected (mean) number of events λ will increase or decrease over time so we make λ a function of time. For example, we could use the following equation: S(t)=Poisson(m*t+c) The example model Poisson_random_walk 1 illustrates this idea: This model can be used, for example, to describe vehicle accident claims made to an insurance company, or cases of a disease for a health authority: as the number of cars increases, the number of car crashes increases correspondingly according to some function; as the pollution level in a city increases, the number of people with respiratory disease increases. The fractional variation of the series is much bigger in the top panel than that in the bottom panel. This is because the standard deviation of Poisson(λ) counts equals √λ. Thus, the coefficient of variance (std.dev./mean) is 1/√λ. which gets smaller as λ gets bigger, meaning that the larger the expected number of events, the smaller the fractional variation one would observe. This property of a Poisson process is very useful to insurance companies: the more people they cover, the more stable their liabilities become, and the less margin they need to cover themselves at a certain risk level... an example of when big is actually better. The equation S(t)=Poisson(m*t+c) has some limitations in that if m is negative then after time t = -c/m the equation will produce negative (i.e. impossible) values for the Poisson mean. If one is approaching such a situation it is worth considering the following equation, which is the basis of Poisson regression techniques: S(t)=Poisson(EXP(m*t+c)) i.e. LN(λ)=m*t+c A variation of this model is to take account of seasonality by multiplying the expected number of events by seasonal indices (which should average to 1).