HN Simulatornew | past | comments | lists | submitlogin

From what I can see they were trying to generate 16bit integers, so the probability is 1 in 65536 and they were running the test for 11 hours.

You definitely would expect a roughly equal number of 0s as any other of those numbers since it's uniformly distributed. And definitely not 0

help



> You definitely would expect a roughly equal number of 0s as any other of those numbers since it's uniformly distributed.

How would random numbers be uniformly distributed?


Because each number is equally as likely as every other number. If you know you're more likely to get certain numbers, or in this case have no chance of getting certain other numbers, it is by definition _less random_.

No, that has nothing to do with randomness. It is however a different distribution than expected.

Think about the odds of a uranium atom decaying in a given second. Certainly a random event, yet for most seconds, the value is False, not True.


You are both right, the atom decaying is completely random but the distribution of the decays is still predictable.

If you have a random number generator your are relying on the fact that it is uniformly distributed and thus has no bias towards certain numbers. Or if it is not uniformly distributed you would want to know the exact distribution so you can correct for it.

If you have an RNG that is treated as putting out uniformly distributed numbers but it is does in fact favor some numbers over others, that would be a defect that can cause problems/be exploited.


Ah. My reasoning, with the normal distribution, was that zero was at the left most end of the curve and with a pretty much non-existent chance of appearing.

As the number of samples approaches infinity, the percentage share of all possible results approaches equality. A uniform random distribution is like the mathematical identity of statistics.

So you think a weighted die is more random than a fair die? A uniform distribution means each outcome has equal probability; it doesn’t mean the outcome is predictable.


With enough repetitions.

With a few (say 10, so 655360 runs), you will not get a uniform distribution, and some numbers (like 0) might not appear.




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: