Random Value Generation and Distribution Order
Overview
A risk analysis draws one set of random values per input distribution (risk probabilities, risk impacts, schedule uncertainty, cost values and variables). All draws come from a single pseudo-random number stream created from the analysis seed. When a seed is specified, the analysis is reproducible. This holds only if the model produces the same distributions in the same order.
How values are assigned
Random values are given to the input distributions in a fixed, sorted order. Risks in use are sorted by RiskId, and their implementations by element sort index. Activity risks are sorted by activity id plus RiskId. Cost values are sorted by cost element id, and variables by name.
If correlations are defined, they are sorted by distribution position. The values are then re-ordered to match the target correlation, which also consumes random numbers.
Why changes affect results
A distribution does not own a fixed random sequence. Its values depend on how many numbers were drawn before it.
- Changing a
RiskIdcan change the sort order of the risks if the risk moves relative to other risks. Risks then receive different slices of the random stream, so the values assigned to each risk change. The risk's definition has not changed. - Deleting a risk removes its distributions, so every later distribution shifts forward in the stream and receives different values. Correlation groups and the number of draws also change.
- Adding a risk, activity assignment, cost value or variable has the same effect.
None of this indicates an error. With enough iterations the results are statistically equivalent, and only the sampling noise differs. Exact repeatability requires the same seed and an unchanged model structure and ordering.
Recommendation
For exactly reproducible results, use the same seed and keep the model's structure and Risk IDs unchanged. When comparing two analyses of a modified model, expect small differences that come from the random sampling and not from the change itself.