Generating your own distributions

MR-dice-icon.png Download a pdf copy of this help file  here


In writing ModelRisk we have attempted to provide you with all the distributions you might find being used in the insurance and finance world, but there are an enormous number available, and you may want to make use of one that ModelRisk does not offer. The section on creating distributions illustrates the four methods we use at Vose Software to generate our own distribution.

One way we can generate our own distribution is if one can determine an equation for x = G(F(x)).

The process for generating values from one's own distribution is as follows:

1.     determine the probability density function f(x);
2.     determine the distribution function F(x) by integrating f(x) or determine F(x) directly;
3.     determine the generating function G(F(x)) from F(x).

Example:

Let's say you wish to construct a distribution that followed the shape of a sine curve from 0 to a, where a is an input to the distribution. This distribution shape is shown below:

figure46.gif

The probability density function f(x) is given by:

                

where b is to be determined such that the area under the curve equals one.

The distribution function F(x) is then:

             image13.gif

For the area under the curve to equal one, b must be determined such that F(a) = 1, i.e.:

                

Therefore,

                

and F(x) becomes:

                

We now need to find the generating function G(F(x)):

                G(F(x)) = x

So, rearranging the equation above for x:

                

Now, to generate this distribution, we put a Uniform(0,1) distribution in cell A1 (say), the value for a in cell B1 (say) and, in the cell that generates values of x, we write:

                = B1/PI() * ACOS (1-2*A1)

Read on: How many iterations to run