Question on identical event probabilities returned by repeated MonteCarloExperiment


I am running probability of failure calculations using a ThresholdEvent and MonteCarloExperiment, set to take a total of 1e7 Monte Carlo samples (specified by 5e5 iterations and 20 samples per iteration). The Monte Carlo maximum CV error is set to 0.01. For several results, the probabilities of failure are exactly 1E-6 or 0.0000010001, even for repetitions of the experiment, which seems odd since Monte Carlo should be random. What is happening behind the scenes in these cases?

Thank you,


Could you give us more details on how you perform your computations? Do you run your script several times, in which case you should get the exact same result if you don’t set the initial state of the pseudo-random numbers generator to something depending on your process? Are you talking about the the partial estimations per block?
Waiting for more input from your side, I can mention the following situation where Monte Carlo looks very quantified. It is when your number of samples is close to the inverse of the probability you want to estimate. In this case, the number of success is 0, 1, 2 or 3 so the probability estimate looks like 0.0, 1e-6, 2e-6, 3e-6, but you never get the bunch of decimals which looks more like a “random” result. I don’t know if it is the case here but it could.
We are currently freezing the code for the next release, so don’t waste time if you want us to fix the bug for this release (the next one is planed for next Spring).



1 Like

also be aware that openturns uses the same rng seed each time it is imported so to if you want a different seed each time your script is run you’ll want to do something like