Something went wrong. Try again later

JaBBrwky

This user has not updated recently.

3 1 3 0
Forum Posts Wiki Points Following Followers

JaBBrwky's forum posts

Avatar image for jabbrwky
JaBBrwky

3

Forum Posts

1

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By JaBBrwky

CS guys, is there a way to calculate (exactly) the probability distribution that scales better than n^2 (n is number of dice)? I don't think so, but I do know there are extremely clever algorithm engineers out there.

It's worth pointing out that by the time you get to the number of dice where you have to worry about computer performance, you can easily analytically calculate the normal distribution to get the probability distribution within only very tiny errors. The Central Limit Theorem is nice like that!

Avatar image for jabbrwky
JaBBrwky

3

Forum Posts

1

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#2  Edited By JaBBrwky

I've been teaching myself java and had a class for dice-probability calculating all ready to go. Combine with a quick&dirty prime checker, and I got:

Probability of getting a prime number when rolling 1 6-sided dice is 0.6666667.
Probability of getting a prime number when rolling 2 6-sided dice is 0.41666666.
Probability of getting a prime number when rolling 3 6-sided dice is 0.33796296.
Probability of getting a prime number when rolling 4 6-sided dice is 0.33333334.
Probability of getting a prime number when rolling 5 6-sided dice is 0.31712964.
Probability of getting a prime number when rolling 6 6-sided dice is 0.27199075.
Probability of getting a prime number when rolling 7 6-sided dice is 0.24158378.
Probability of getting a prime number when rolling 8 6-sided dice is 0.23570625.
Probability of getting a prime number when rolling 9 6-sided dice is 0.23605664.
Probability of getting a prime number when rolling 10 6-sided dice is 0.24441415.
Probability of getting a prime number when rolling 11 6-sided dice is 0.2574141.
Probability of getting a prime number when rolling 12 6-sided dice is 0.25824347.
Probability of getting a prime number when rolling 13 6-sided dice is 0.24224402.
Probability of getting a prime number when rolling 14 6-sided dice is 0.22278926.

It shows some interesting ups and downs as the peak of the distribution of the number rolled passes over concentrations of primes. You're almost on 37, 41, and 43 with 10 dice, but adding an 11th helps a bit. As you go to a large number n of dice, the density of primes around your peak will be roughly 1/ln(3.5*n), so overall the probability of rolling a prime should slowly decrease as you add dice. Probabilities for 15-40 below the spoiler thingy.

Probability of getting a prime number when rolling 15 6-sided dice is 0.21331981.
Probability of getting a prime number when rolling 16 6-sided dice is 0.21552263.
Probability of getting a prime number when rolling 17 6-sided dice is 0.22379509.
Probability of getting a prime number when rolling 18 6-sided dice is 0.23270558.
Probability of getting a prime number when rolling 19 6-sided dice is 0.23859675.
Probability of getting a prime number when rolling 20 6-sided dice is 0.23890679.
Probability of getting a prime number when rolling 21 6-sided dice is 0.23263493.
Probability of getting a prime number when rolling 22 6-sided dice is 0.22089463.
Probability of getting a prime number when rolling 23 6-sided dice is 0.20677933.
Probability of getting a prime number when rolling 24 6-sided dice is 0.19492872.
Probability of getting a prime number when rolling 25 6-sided dice is 0.19035602.
Probability of getting a prime number when rolling 26 6-sided dice is 0.19603851.
Probability of getting a prime number when rolling 27 6-sided dice is 0.21047686.
Probability of getting a prime number when rolling 28 6-sided dice is 0.22738528.
Probability of getting a prime number when rolling 29 6-sided dice is 0.23837127.
Probability of getting a prime number when rolling 30 6-sided dice is 0.23720594.
Probability of getting a prime number when rolling 31 6-sided dice is 0.22307776.
Probability of getting a prime number when rolling 32 6-sided dice is 0.20086832.
Probability of getting a prime number when rolling 33 6-sided dice is 0.17841189.
Probability of getting a prime number when rolling 34 6-sided dice is 0.16254617.
Probability of getting a prime number when rolling 35 6-sided dice is 0.15628628.
Probability of getting a prime number when rolling 36 6-sided dice is 0.15843984.
Probability of getting a prime number when rolling 37 6-sided dice is 0.1653193.
Probability of getting a prime number when rolling 38 6-sided dice is 0.17310192.
Probability of getting a prime number when rolling 39 6-sided dice is 0.1794245.
Probability of getting a prime number when rolling 40 6-sided dice is 0.18366864.