HomeTechniques and Tips@RISK: General QuestionsDifferent Results with Multiple Workbook Copies

2.20. Different Results with Multiple Workbook Copies

Applies to: @RISK 5.x–7.x

I'm simulating multiple copies of a workbook in one @RISK session. There are no links between the workbooks, so I'd expect every workbook to get the identical results that it gets when it's simulated alone. Why doesn't that happen?

All open workbooks are part of an @RISK simulation, and @RISK draws all the random numbers for iteration 1, then all the random numbers for iteration 2, and so on. These numbers all come from a single stream, which you can specify as a fixed seed on the Sampling tab of Simulation Settings. (It's more complicated if any inputs are correlated, but the principle is the same.)

Suppose you have 100 distribution functions in your workbook. When you simulate that workbook by itself, iteration 1 gets the first 100 random numbers from the stream, iteration 2 gets random numbers 101–200, iteration 3 gets random numbers 201–300, and so in. But when you simulate two copies in the same run, those two copies together consume the first 200 random numbers in iteration 1, random numbers 201–400 in iteration 2, and so on. Thus the results will be different, though still within expected statistical variability for your number of iterations.

You can overcome this by putting RiskSeed( ) property functions in the distributions. RiskSeed( ) gives that input its own random-number sequence, separate from the single stream for the simulation. Two identical distributions with identical seeds will produce the same identical sequence of data, iteration by iteration. For instance,


will always produce the same sequence of random numbers, no matter what other formulas the workbook may contain. If you have two open workbooks that contain that same function, both copies will produce an identical sequence of iterations.

RiskSeed( ) is not effective with correlated inputs.

See also: Random Number Generation, Seed Values, and Reproducibility

Last edited: 2015-03-18

This page was: Helpful | Not Helpful