Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How do I calculate the probability of x result occurring y times in z rolls?
Let's suppose that I'm looking for a result that has a 3.5 percent chance of occurring on any given attempt - so, for the sake of illustration, I'm rolling a D20 and D10 together, hoping to get a 20 on the D20, and a 7 or less on the D10.
Calculating the probability of getting zero target results out of a fixed number of rolls is easy, as is the inverse probability of getting one or more.
But what if I want to know the probability of getting a different specific number? If I'm rolling the dice 168 times, what are the specific odds of getting the target result 6 times? 10 times? How do I calculate that?
1 Answer
- NickLv 65 years ago
Well let's take your example of a 20 on the D20 and 7 or less on the D10, the probability of that event (call it E) on one roll is p=(1/20)*(7/10)=7/200.
To calculate the probability of E occurring a specific number of times let's define the complement event E' which is *not* rolling 20 on the D20 and 7 or less on the D10, this event has the probability q= 1 - 7/200 = 193/200.
So now we want to calculate the probability of E occurring on 6 of the rolls out of 168 rolls, say. This means that E' must occur on the other 168-6=162 rolls.
So we could get a string of results
|--- 6 Es, 162 E's -------|
E' E' E' E E E' E' .... E E'
the probability of this *particular* result is p^6*q^162.
Unfortunately this is not the whole story because the 6 successful events E can occur anywhere in the 168 rolls, we must add the above probability for each possible arrangement of 6 Es and 162 E's. So all we need to know is how many arrangements there are. Well lucky for us this is trivial and given by the binomial coefficient C(168,6)=168!/(6!162!) hence the required probability is
prob(6 Es) = C(168,6)*p^6*q^162 = 0.16 (approx.)
similarly for 10 Es we get
prob(10 Es) = C(168,10)*p^10*q^158 = 0.04 (approx.)
This is referred to as a binomial distribution, we can also use it to calculate ranges of occurrences of E by adding up probabilities E.g.
prob(6, 7, 8, 9 or 10 Es) = prob(6 Es) + prob(7 Es) + prob(8 Es) + prob(9 Es) + prob(10 Es)
-----------------
Note carefully that these are *probabilities* which are the *fraction* of successes to total outcomes (prob = (successes)/(total outcomes)).
*Odds* are related but expressed differently, the odds of an event are the ratio of successes to failures ((successes):(failures)), note also that (successes) + (failures) = (total outcomes).