top | item 35954931

(no title)

awegio | 2 years ago

In more formal terms, since it is a uniform distribution you can write

  random(x) = random()*x
then you can easily see that

  random(random(random())) = random()*random()*random()
The resulting distribution is not equal to random()^3, because e.g. the probability that all 3 random calls give you a number <0.5 is only 0.125.

discuss

order

IIAOPSW|2 years ago

Took me a moment to understand that by random()^3 you meant the output of the random function to the power of 3, not some temporary function which we name "random^3" since that's also how we build it.