Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • $\begingroup$ Box-Muller generates two independent Normals. What difference does it make if you drop one of them? None. $\endgroup$ Commented Feb 2, 2019 at 12:49
  • 1
    $\begingroup$ @wolfies Well, the results of SeedRandom[1234]; RandomVariate[NormalDistribution[], 10] and SeedRandom[1234]; Table[RandomVariate[NormalDistribution[]], 10] are different. But one would not expect that. For example, SeedRandom[1234]; RandomVariate[ExponentialDistribution[1], 10] SeedRandom[1234]; Table[RandomVariate[ExponentialDistribution[1]], 10] return exactly the same result. $\endgroup$ Commented Feb 2, 2019 at 13:03
  • $\begingroup$ I don't agree that there is any guarantee or requirement that calling 10 pseudorandom numbers from a particular distribution all in one go is required to use the same generator as calling one pseudorandom number at a time. Indeed, if code is well-optimised, one might expect that different algorithms are used to generate multiple values all in one go, rather than single ones. The very same thing happens with the LogNormalDistribution and HalfNormalDistribution, possibly because they use the Normal generator. $\endgroup$ Commented Feb 2, 2019 at 13:43
  • $\begingroup$ At the same time, +1 on your very fine (!) sleuthing and explanation as the likely cause and the algorithms being used. $\endgroup$ Commented Feb 2, 2019 at 16:48