HomeTechniques and Tips@RISK DistributionsGenerating Values from a Distribution

3.4. 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:

  • Click the x-subscript-i icon to open the Simulation Data window. Right-click anywhere in the data column, and select Copy, then paste the values into your Excel sheet.
  • Click Excel Reports » Simulation Data (Inputs) or Simulation Data. @RISK will create a new sheet with your data.
  • Click Browse Results, click on the cell, and use the drop-down arrow at upper right to change Statistics grid to Data Grid. Right-click on the column heading and select Copy, then paste the values into your Excel sheet.

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

This page was: Helpful | Not Helpful