Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You're quite right. When you use a single dice (twelve sided) the probability of getting any number (1 to 12 inclusive) is just 1/12. When you use two dices of 6 sides each the probability of each number is markedly different.
Of course, if you're not using a truely random or very, very convincing pseudo-random generator you probably won't quite get these probabilities. Considering that 7 is a bad number to get in Craps, it'd be nicer to use just a 12 sided dice, but then the Casinos would have to rig the game another way to get their money. ;) It's good to know that for this kind of example rand() is as good as Math::Random. jarich In reply to Re: Re: Re: check my logic & a random number issue
by jarich
|
|