5 ms·
I do wonder if that is down to sample size. For example, I wrote a program to simulate the roll of a dice. There is a one in 6 chance of getting any one numbe
by martin-adams 11y ago
I do wonder if that is down to sample size. For example, I wrote a program to simulate the roll of a dice. There is a one in 6 chance of getting any one number. But roll it 6 million times, you'll be very close to have each number 1 million times.
So I would anticipate the clumping to even out as the sample size increases. Or maybe the evening out is a large collection of clumps. Anyone know if this is the correct way to think about it?
- mungoman2 11y agoWell 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.
- Osmium 11y ago> So I would anticipate the clumping to even out as the sample size increases. Clumping won't even out. A useful way of thinking about it is in terms of the distance between samples (e.g. a radial distribution function). If you don't have clumping, that distribution of distances is decidedly non-random and has peaks. Additionally, there's no specific length-scale for the clumping to happen on, it's essentially fractal in nature. (Happy to be corrected if I'm wrong on this.)
- eru 11y agoI think in order to pass any judgement on the correctness, you'd have to make your remarks more precise. Are you talking about a random distribution of points on a line / square, or about rolling dice?
- Osmium 11y ago> Are you talking about a random distribution of points on a line / square, or about rolling dice? Right, exactly. I made my comment in reply to the grandparent problem talking about dots on a screen. For a discrete distribution like a dice roll in the parent post it'd be a different matter. (I was going to edit my comment to clarify, but the edit window had expired.) Which serves to illustrate why it's important to be precise when talking about what distribution you're sampling. Also, trying to run this experiment in practice is also problem even for dots on a screen, because eventually the finite display size of your dots will become an issue, as will floating point arithmetic (since you only really have a finite number of floats in a given range).
- eru 11y agoThanks for clarifying. > Also, trying to run this experiment in practice is also problem even for dots on a screen, because eventually the finite display size of your dots will become an issue, as will floating point arithmetic (since you only really have a finite number of floats in a given range). Yes, but that's not a problem for the theoretical analysis of fractal dimension. Uniformly placed dots do have a characteristic density and a relatively simple distribution of nearest neighbour distances. Even the clumpiness doesn't lead to scale invariant lumps. The lumps get absolutely bigger on bigger scales, but relatively smaller and smoother. It would be useful to do the analysis properly, though.
- mfenniak 11y ago> So I would anticipate the clumping to even out as the sample size increases. Are you saying we need to crash more planes? That seems a little harsh just to get crashes coming at a consistent rate. ;-)
- martin-adams 11y agoI'd prefer to simulate this with dots on a screen rather than with planes ;-)
- vmarsy 11y agoWhat you're describing for the dice is called the law of large numbers : https://en.m.wikipedia.org/wiki/Law_of_large_numbers https://en.m.wikipedia.org/wiki/Law_of_large_numbers It would probably true for that too but as another comment says, we don't want to have an increased sample size here!
- deleted 11y ago[deleted]