Random sampling from input distributions | Vose Software

# Random sampling from input distributions

Consider the distribution of an uncertain input variable x. The cumulative distribution function F(x) gives the probability P that the variable X will be less than or equal to x, i.e.

F(x) = P(X<=x)

F(x) obviously ranges from zero to one. Now, we can look at this equation in the reverse direction: what is the value of x for a given value of F(x)? This inverse function G(F(x)) is written as:

G(F(x)) = x

It is this concept of the inverse function G(F(x)) that is used in the generation of random samples from each distribution in a risk analysis model. The figure below provides a graphical representation of the relationship between F(x) and G(F(x)):

To generate a random sample for a probability distribution, a Uniform(0,1) random number (U) is generated. This value is then fed into the equation to determine the value to be generated for the distribution:

G(U) = x

The random number U is generated from a Uniform(0,1) distribution to provide equal opportunity of an x value being generated in any percentile range. The inverse function concept is employed in a number of sampling methods, discussed in the following sections. ModelRisk employs this method for all its univariate distributions via the optional U parameter, which then allows you to make maximal use of your Monte Carlo Excel add-in. There is no analogy to the inverse generation method for multivariate distributions.

ModelRisk Ribbon has the control that allows removing randomness from the spreadsheet: . Switching the randomness ON/OFF triggers between U being sampled from a Uniform(0,1) distribution and U being a constant = 0.5. Hence, if the switched off, recalculating the spreadsheet will not update any values in the model because the random element of the functions is replaced with a constant value of 0.5.