Home → Techniques and Tips → @RISK Distributions → Generating Values from a Distribution
Applies to: @RISK 4.x and newer
I'd like to generate 10,000 sample values from a particular distribution, for example RiskLogLogistic(-0.0044898, 0.045333, 2.5862). Is there some way to do it?
Here is a choice of five methods.
Simulation methods:
Create an empty workbook and put that distribution in a cell. Set iterations to the desired number of values, and run a simulation. Then, do one of the following:
Since you are running an actual simulation, these methods use the Sampling Type you have set in Simulation Settings. By default, that is Latin Hypercube, which is better than traditional Monte Carlo sampling at matching all percentiles to the theoretical cumulative probability of a distribution. Also, correlations are honored in a simulation.
Non-simulation methods:
You can also sample a distribution without running a simulation. In this case, the Sampling Type is always Monte Carlo, regardless of your Simulation Settings, and any correlations are disregarded.
Here are two methods that don't involve running a simulation:
If you have @RISK Industrial or Professional, you can write a simple loop in Visual Basic to perform the sampling and save the random numbers. The Risk.Sample method is explained in Sampling @RISK Distributions in VBA Code.
Click the Random/Static "rolling dice" icon to make it active. Insert your distribution function in a cell, and then click and drag to create as many duplicates as you need random numbers. Highlight those values, and press Ctrl+C to copy, then Paste Special » Values. (You can either paste the values in the same cells to overwrite the formulas, or paste them in other cells if you want to keep the formulas.)
Last edited: 2015-11-09