3 ms·
Well depends of what you mean by very close. It's the relative numbers that approaches the true distribution, not the absolute numbers. Do the experiment you d
by mungoman2 11y ago
Well depends of what you mean by very close.
It's the relative numbers that approaches the true distribution, not the absolute numbers.
Do the experiment you decribe and look at the numbers.
- martin-adams 11y agoThis is what I mean: var results = [0,0,0,0,0,0]; for (var i = 0; i < 6000000; i += 1) { results[Math.floor((Math.random() * 6))] += 1; } console.log(results); The results are: [1002140, 999355, 1000009, 1000401, 1000014, 998081] Basically, they are all within 1% tolerance of each number getting 1 million occurrences. So when you look at the clumping on random dots on a screen, given a large enough sample size, I would anticipate that the probability of keeping a clumped visual distribution would become quite improbable.
- ijager 11y agoI think the clumping is more about how many consecutive same numbers there are in the array. For example, a naive me would generate: [3,4,5,1,2,4,2,1,2,6] whereas a true random distribution might generate: [3,4,4,4,4,1,2,2,2]. When you generate 6 million samples you would indeed have about 1 million per number. However you would still have subsequences of the same number.
- gus_massa 11y agoThe problem is not when you have much more samples than slots, in that case you should get "almost" the same number of hits in each slot as you measured. The problem is when you get less samples than slots. For example if you roll 3 dices, you should get "1/2" hits for each result. So the question is: How probable is that one result is repeated? (i.e. you get two equal dices out of the three) [spoiler alert] All equal: 3% Two equal and one different: 42% Three different: 55% "Intuitively", it's expected that with a uniform distribution you get something like 1% + 9% + 90% instead (this numbers are completely made up). Most people don't expect that the probability of getting a repeated dice is so close to the probability of getting all of them different.