Posted to microsoft.public.excel.programming
|
|
Random Number Generation
Colors don't conform to even and odd since that is a different bet.
--
Regards,
Tom Ogilvy
"Gary L Brown" wrote in message
...
=INT((RAND()*38)-0.00001)
where 37 = "00"
If the above formula is in A1 then...
=IF(MOD(A2,2)=0,"Black","Red")
Since I don't know roulette, I am 'assuming' even is blank and odd is red.
If it's the other way around just switch the descriptions in the formula.
Hope "00" is Red :O
HTH,
--
Gary Brown
If this post was helpful, please click the ''Yes'' button next to ''Was
this
Post Helpfull to you?''.
"MB06" wrote:
I am trying to simulate the results of 120 consecutive roulette wheel
spins.
There are 36 numbers on a roulette table, plus a "0" and a "00". So,
inherently, a 1/38 chance that any given number will be the result of a
spin.
I set the Random Number Generator to "Bernoulli" and a p-value of ".5"
to
get the odds of a black v. red result, but this is not accurate because
of
the "0" and "00" on the wheel. If anyone knows how to ask excel to
randomly
generate 38 different potential results, please email me back. Also, I
would
need a formula to translate each number to its corresponding color. I
don't
know if an "IF" statement would work here, or what is best, but I am
interested to hear the thoughts of experts.
|