Computer Dice rollers

Pinotage said:
Good on average, yes. But take a look at the last few lines and see how often 7, 7 comes up. It comes up far too frequently to make a truly random generator. Good RNGs just don't do that. Instances of 3 numbers in a row seem very common as well, when really, they shouldn't be. The last ten lines has 8,8,8, 10,10,10 and even a very improbably 4,4,4,4. A quick scan through the numbers revealed four in a row of the same number on at least 3 occasions, which is too likely.

Pinotage

You can almost always tell the difference between numbers generated randomly and numbers chosen to appear random by the fact that truly random numbers will have more and longer runs of the same number. Good random-number generators definitely "do that".

Note that this is true regardless of the technique used to generate random or pseudo-random numbers. FWIW, the best available electronic random-number generators use atmospheric static for either the numbers or for the seeds to get those numbers.

A further point: RNGs use algorithms that are chaotic; that is, the output depends strongly, and unpredictably, on the precise details of the input. Non-random changes to the input have effectively random changes on the output. For example, incrementing the LSB of the time will not have a predictable effect on the generator's output. (Also, the time-based seed has a granularity much finer than "seconds".)

Finally, dice have no memory. While the probability of rolling (for example) at least one "1" in 50 rolls of a d6 is much greater than rolling at least one "1" in a single roll of a d6, if you have already observed 49 consecutive rolls without a "1", the probability that the 50th roll will be a "1" (using an honest die) is still 1 in 6.
 

log in or register to remove this ad

Pinotage said:
Good on average, yes. But take a look at the last few lines and see how often 7, 7 comes up. It comes up far too frequently to make a truly random generator. Good RNGs just don't do that. Instances of 3 numbers in a row seem very common as well, when really, they shouldn't be. The last ten lines has 8,8,8, 10,10,10 and even a very improbably 4,4,4,4. A quick scan through the numbers revealed four in a row of the same number on at least 3 occasions, which is too likely.

Pinotage

This is exactly what I was talking about when I said people object to streaks in their RNGs.

Sorry, statistically, there SHOULD be streaks. Probably more streaks than were actually generated, as pointed out shortly above this post.
 

Zurai said:
I think you're suffering a misconception about how RNGs work.

Yea, I very much was. Wich has been made appearant ;)

One question though, if the seed of a RNG is the time, wouldn't that make the outcome somewhat more predictable, or at least calculatable, as the time is a calculated, constantly evolving source? Where as somthing like "waving the mouse around wildly" is a more choatic action that is very scarcley duplicated? (Assuming that the movement, time, distance, and speed of the mouse movement are measured and taken into account with precision.)


But now I have a diffent, most likely very less contraversial question. How does rolling 4d6 and taking the top three increase the chances of rolling better scores than simply rolling three? I know it's most likely an obvious question for most, but I just wonder what the equasion would look like.
 

Asmor said:
The chances of rolling the same number 3 times in a row is 1/100. The chance of rolling a number 4 times in a row is 1/1000. So theoretically, assuming "perfect" randomness, there should be 100 triplets and 10 quadruplets. Actually, for that matter, there should be 1 quintuplet.

The probability for 2 in a row is 0.01, for 3 in a row 0.001 and for 4 in a row 0.0001 or 1 in 10000. You'd expect to probably see 1 or 2 in there, but not as many as observed.

Pinotage
 

Zurai said:
This is exactly what I was talking about when I said people object to streaks in their RNGs.

Sorry, statistically, there SHOULD be streaks. Probably more streaks than were actually generated, as pointed out shortly above this post.

Why? The odds of getting 3 numbers in a row is 0.001, irrespective of the number of rolls. Why would that probability come up more often than statistics says it should? Does the fact that it generates extremely rare events more frequently make it more random. Or is there something I'm missing.

Pinotage
 

palleomortis said:
Yea, I very much was. Wich has been made appearant ;)

8-) Probability theory is non-trivial. Most people don't understand it and don't even know what it is that they misunderstand.

palleomortis said:
One question though, if the seed of a RNG is the time, wouldn't that make the outcome somewhat more predictable, or at least calculatable, as the time is a calculated, constantly evolving source? Where as somthing like "waving the mouse around wildly" is a more choatic action that is very scarcley duplicated? (Assuming that the movement, time, distance, and speed of the mouse movement are measured and taken into account with precision.)

Not necessarily. If the trigger is "when the user hits enter" and the seed is the last 10 digits of the time in microseconds at which the trigger fires, the seed is effectively a random number already. Since the algorithm is chaotically influenced by the seed, the number is random enough for all but encryption purposes. To see how this works, if you have access to a random number generator that allows explicit assignment of seeds, you can try seeding the generator with consecutive numbers. (This sort of random number function is available in many programming languages, for instance.) With consecutive seeds, you'll see no obvious relationship between the generated random numbers.

palleomortis said:
But now I have a diffent, most likely very less contraversial question. How does rolling 4d6 and taking the top three increase the chances of rolling better scores than simply rolling three? I know it's most likely an obvious question for most, but I just wonder what the equasion would look like.

You're taking a pool of random numbers, then throwing out (most of) the lowest numbers. The mean of the pool as a whole will vary about the mean of a large enough number of trials of an individual die. The mean of the pool culled of low numbers will vary about a higher number. The equation to determine the mean and distribution of an arbitrary number of dice with an arbitrary number of sides, throwing out an arbitrary number of dice from each trial is beyond my mathematical talent, I'm afraid. When I want to know, I just brute-force it.
 

Pinotage said:
The probability for 2 in a row is 0.01, for 3 in a row 0.001 and for 4 in a row 0.0001 or 1 in 10000. You'd expect to probably see 1 or 2 in there, but not as many as observed.

Pinotage

The probability of getting two consecutive numbers that are the same, using d10s, is 1 in 10 for each pair of rolls. The first number is arbitrary, and there is a 1 in 10 chance that the second number will be the same as the arbitrarily chosen first number.

In 100 rolls, you have 99 pairs. (The last number of each pair is the first number of the subsequent pair.) In 100 rolls, you would expect 9.9 such pairs.

The same analysis applies for longer runs of the same number.
 

Pinotage said:
The probability for 2 in a row is 0.01, for 3 in a row 0.001 and for 4 in a row 0.0001 or 1 in 10000. You'd expect to probably see 1 or 2 in there, but not as many as observed.

Pinotage

The probability of 2 in a row is .1, not .01. The probability of, for example, two 10s in a row is .01. If you're just looking for any random pair, the probability is .1. For the same reason, all the other probabilities you state are 10 times more likely.

Simple example: There's a 1 in 6 chance of rolling doubles on a pair of d6. There are 36 possible rolls overall, and there are 6 pairs. 6/36=1/6.

A pair, in a string of rolls of d10s, is the event that any given number is the same as the number before it. There's a 1 in 10 chance that any given number matches the number before it.

Likewise, a triple is the event that both a given die rolled the same as the die before it, AND that the die before it rolled the same as the die before that. Thus, a triplet is 1/10*1/10=1/100.
 

Pinotage said:
Why? The odds of getting 3 numbers in a row is 0.001, irrespective of the number of rolls.

Incorrect, as stated above.

Why would that probability come up more often than statistics says it should?

This is where I lose you. .01 is 100 in 10,000. I doubt there was a statistically signifigant deviation from 100 triplets in that 10,000 number sample. I'm not about to go through 10,000 numbers and count them by hand to prove it, though. If you want to do so, please feel free to post your results.

Does the fact that it generates extremely rare events more frequently make it more random. Or is there something I'm missing.

You're missing that it doesn't generate extremely rare events (which even 1 in 1000 is NOT) statistically more frequently than just rolling the same die 10,000 times would.
 
Last edited:

Doug Sundseth said:
The probability of getting two consecutive numbers that are the same, using d10s, is 1 in 10 for each pair of rolls. The first number is arbitrary, and there is a 1 in 10 chance that the second number will be the same as the arbitrarily chosen first number.

In 100 rolls, you have 99 pairs. (The last number of each pair is the first number of the subsequent pair.) In 100 rolls, you would expect 9.9 such pairs.

The same analysis applies for longer runs of the same number.

Sorry, yes, that's right. I was thinking about getting a specific pair or triplet rather than just any one.

Pinotage
 

Remove ads

Top