This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Christoph.Deil
Recipients Christoph.Deil, mark.dickinson, rhettinger, steven.daprano
Date 2019-08-21.16:36:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The Monte Carlo example here has completely unstable results:

If you run it multiple times, you will see that `mean` is relatively stable, but `stddev` varies from 10 to 50 to 100. The reason is that in the model there's a division by z, and the z distribution used has values arbitrarily close to zero:

>>> NormalDist(5, 1.25).cdf(0) * 100_000

Suggest to change to a MC sampling example that isn't as pathological, doesn't involve division by zero. E.g. change the mean of z to 50, or reduce the stddev to 0.125 or some such change in parameters.

Usually in stats or machine learning books and docs e.g. on statsmodels or scikit-learn etc., for methods where random numbers are involved, the seed is always set to a fixed value, to have reproducible results & docs. Suggest to make that change also here.
Date User Action Args
2019-08-21 16:36:38Christoph.Deilsetrecipients: + Christoph.Deil, rhettinger, mark.dickinson, steven.daprano
2019-08-21 16:36:38Christoph.Deilsetmessageid: <>
2019-08-21 16:36:38Christoph.Deillinkissue37905 messages
2019-08-21 16:36:38Christoph.Deilcreate