I see results like the below when running Random.nextInt(3)
81 times:
200010202002112102222211012021020111220022001021101222222022210222220100000100010
Notice the large contiguous blocks: 000
, 22222
, 111
, 222222
, 222
, 22222
, 00000
, 000
.
Intuitively, the sequence doesn't seem naturally / "real-world coin flip" random.
For example, to achieve 6x
contiguous 2
s there's only a 0.4%
chance (AFAIK) and for 5x
contiguous values there's a 1.2%
chance ... so it seems unlikely I should keep seeing patterns like this in the output.
Would this happen in the real-world with a 3-sided coin? Or is this an expected deviation from "true random" when using Java's Random.nextInt(exclusiveMax)
method?
Aucun commentaire:
Enregistrer un commentaire