# Thread: Rolling the dice! - A question of probability

1. Originally Posted by Wilmer
This picks 10 numbers at random from 1 to 100, adds 6 to the numbers picked,
and returns the highest of the 10 resulting numbers.
Actually it picks numbers in the range 0 to 99, I didn't bother to do the offset since we're just comparing the two groups.

Originally Posted by Wilmer
NOTE: if above returned number > 100, this may be skipped:
Good point! (Although the condition will be > 99 because of the above comment.)

And everything else is as you say; your reading of the code is correct.

Originally Posted by Wilmer
I agree with your results.
Ran 10 million cases each for add = 3 to 7; rounded (add: [ties], 15group, 10group):
3: [49],434,566
4: [44],387,613
5: [40],346,654*
6: [36],308,692*
7: [33],275,725
* quite close to yours!!
Thanks for taking the time to do this!

Added note: After googling UBASIC, I'm surprised and interested to read that it has specialized use for number theory topics. I've done a bit of QBASIC so I'm familiar with some syntax, but somehow I never thought BASIC and things like integer factorization would get paired up. Pretty cool..

2. Originally Posted by Zipperz
The simulation should be fine. So basically if you have to add around +5 to a 20 sided die you would have to add 25 to the 100 sided correct?
No. Forget about my "scenario" dividing by 5; I jumped the gun!
See Undefined's and my last post: 5 (or 6) instead of your initially mentionned 10 is the answer.

Page 2 of 2 First 12