I'm trying to work out how to get the probability of rolling a certain specific number on a minimum number of dice when rolling a pool of dice larger than that number.
For example, if you need to roll at least three "1's" when rolling 6d6; or roll 10d10 and get at least four "7+'s"
I could do it with brute force, write up a program to roll 10,000 times and average or something, but I would prefer a general equation / mathematical method.
I'm reasonably capable of probability maths. Give me a percentage chance over a day, and I can tell you the chance per second or per week, for example, but this has me stumped.
Probability problem
Moderator: Alyrium Denryle
Probability problem
“I am the King of Rome, and above grammar”
Sigismund, Holy Roman Emperor
Sigismund, Holy Roman Emperor
-
- Jedi Council Member
- Posts: 1725
- Joined: 2004-12-16 04:01am
Re: Probability problem
This page goes over a similar example and goes into detail about it afterwards. The basic idea is to find what results wouldn't achieve your results (in your first case, exactly 0, 1, or 2 threes; in your second, exactly 0, 1, 2, or 3 rolls of seven or above) and then subtract all the probabilities from one.
Assuming I did it correctly, for 6d6, 3+ ones, the probability is 1 minus (5/6)^6, (5/6)^5*6(1/6), and (5/6)^4*(6*5/1*2)*1/6^2, or 1-(.335+.402+.201)= 6.2%. For your second example, it would be 1 minus (6/10)^10, (6/10)^9*10(4/10), (6/10)^8*(10*9/1*2)*(4/10)^2, and (6/10)^7*(10*9*8/1*2*3)*(4/10)^3, or 61.8%.
Assuming I did it correctly, for 6d6, 3+ ones, the probability is 1 minus (5/6)^6, (5/6)^5*6(1/6), and (5/6)^4*(6*5/1*2)*1/6^2, or 1-(.335+.402+.201)= 6.2%. For your second example, it would be 1 minus (6/10)^10, (6/10)^9*10(4/10), (6/10)^8*(10*9/1*2)*(4/10)^2, and (6/10)^7*(10*9*8/1*2*3)*(4/10)^3, or 61.8%.
Re: Probability problem
I asked the same type of question a long time ago and got linked to an excellent pdf.
*goes digging*
Here is the topic
http://bbs.stardestroyer.net/viewtopic. ... 0#p3626800
and the pdf link works.
It covers everything and is continuously updated - it i s simply fantastic.
*goes digging*
Here is the topic
http://bbs.stardestroyer.net/viewtopic. ... 0#p3626800
and the pdf link works.
It covers everything and is continuously updated - it i s simply fantastic.
Re: Probability problem
Thanks for that. The method seems to work well.
And same kind of reason, Spoonist; role-playing game mechanics. Working on an idea for a magic system.
And same kind of reason, Spoonist; role-playing game mechanics. Working on an idea for a magic system.
“I am the King of Rome, and above grammar”
Sigismund, Holy Roman Emperor
Sigismund, Holy Roman Emperor
Re: Probability problem
You could treat it as a Bernoulli process. This is an experiment with two outcomes (success, probability p, and failure, probability q = 1 - p) repeated n times. The probability of a total of exactly k successes over those n experiments (without any notion of order) is
C(n,k) * p^{k} * q^{n-k}
that is
C( total experiments, number of successes ) * (probability of success)^{number of successes} * (probability of failure)^{number of failures}
So in your case, for example, if you want to roll at least three 1s out of 6d6, then you want to treat this as 6 6-sided dice rolled in a row, that is, a Bernoulli process with 6 trials, where success is rolling a 1 and failure is rolling anything else. The probability of success is 1/6, the probability of failure is 5/6, so the probability of at least three 1s out of 6 rolls is the sum of the probabilities of three 1s, four 1s, five 1s, and six 1s. Alternatively, it's 1 - (prob. no 1s + prob. one 1s + prob. two 1s).
C(n,k) * p^{k} * q^{n-k}
that is
C( total experiments, number of successes ) * (probability of success)^{number of successes} * (probability of failure)^{number of failures}
So in your case, for example, if you want to roll at least three 1s out of 6d6, then you want to treat this as 6 6-sided dice rolled in a row, that is, a Bernoulli process with 6 trials, where success is rolling a 1 and failure is rolling anything else. The probability of success is 1/6, the probability of failure is 5/6, so the probability of at least three 1s out of 6 rolls is the sum of the probabilities of three 1s, four 1s, five 1s, and six 1s. Alternatively, it's 1 - (prob. no 1s + prob. one 1s + prob. two 1s).
A Government founded upon justice, and recognizing the equal rights of all men; claiming higher authority for existence, or sanction for its laws, that nature, reason, and the regularly ascertained will of the people; steadily refusing to put its sword and purse in the service of any religious creed or family is a standing offense to most of the Governments of the world, and to some narrow and bigoted people among ourselves.
F. Douglass