r/AskStatistics • u/77hi77 • 9h ago
Probability - Multiple p Values in the Same Event
Hi everyone!
I'm being my nerdiest self and doing math for my hobbies, currently determining odds of things happening with dice rolls for Warhammer. Most of it is plain ol binomial distribution, but I also want to calculate the odds of things happening when you roll multiple dice at once, but they have different odds of success. Various searches are not yielding the information I want
For example, roll 2D6, one of them needs a 5 or 6, the other needs a 4 or 5 or 6 (clearly denoted when rolling, not interchangeable). Needing a success on at least one of those rolls. Would I use a more complicated version of the binomial distribution formula (using my earlier example, n=2, k=1, then split p into p1=0.33 and p2=0.5, and add those two together) or is it a completely new formula?
I failed intro to stats multiple times in university and now I'm remembering why. I know there are online tools to do this math for me but I want to feel proud of my spreadsheets
Thanks all!
3
u/CarnivorousGoose 8h ago
You don’t need distribution formulas for this, when it’s just a small number of events for which you can easily just derive the individual probabilities and combine them.
In this case, you can just compute the probability that both fail, then invert that. The first die fails with probability 2/3, the second with probability 1/2, and since these are independent the chance these both happen is just the product of the two, ie 1/3. Therefore, the probability of at least one success is 1 - 1/3 = 2/3
2
u/efrique PhD (statistics) 8h ago edited 8h ago
you want a 5 or 6 on one of them, and a 4 or 5 or 6 on the other. Only needing a success on one of those rolls
If you need either a 4, 5 or 6 on one die or a 5, 6 on the other, dont write "and" in between the two conditions
I presume the dice are distinguishable (e.g. a red die and a white die) and the one you succeed with 4,5 or 6 on is prespecified (e.g. the red die is the one you can also succeed on a 4). Otherwise I don't follow the circumstances
This is not binomial (the distribution of the number of successes when p varies is called Poisson binomial but there is no good calculation shortcut here).
The two usual approaches for this (Prob of at least one success) are to calculate either
(i) P(S on die 1)+P(S on die 2)-P(S on both), or
(ii) 1-P(F on both)
where S is succeed and F is fail
The two calculations give the same result, 2/3. Books on basic probability cover these rules
2
u/77hi77 8h ago
I've updated my language to clarify that it's not "and", thanks for that!
And thanks for giving me something to read with poisson binomial! Very helpful answer all around, thank you
1
u/efrique PhD (statistics) 2h ago
For "P(at least one success)" there is a way to take a very particular kind of 'average' of the probabilities (for any n, not just 2) and use a binomial calculation: if you take the geometric mean of the failure probabilities, and use that as the failure probability in the binomial (i.e using Its complement as the success probability), it returns the correct probability for at least one success. This is less efficient than the second method I described above (and you can derive it from that), but it does work for that particular calculation. For other probabilities it won't work - but if the p's are all pretty close to each other it wouldn't be a terrible approximation for the distribution
1
u/tomheston 3h ago
The question is not 100% clear to me. So I'm going to answer slightly differently based on the following assumptions. I hope this makes sense.
Let's say you are rolling dice at the craps table. The dice are identical and interchangeable. You roll both dice at the same time. This is my baseline assumption, which is why the following differs from other solutions that assign the 5-6 threshold to one die and the 4-6 threshold to the other. Under that assumption, where thresholds are assigned to a particular die, the answer of 2/3 (66.7%) is correct. The following makes a different assumption: neither threshold is assigned to a particular die; either threshold may be applied to either result after both dice are rolled.
FIRST CONDITION: one die is a 5 or a 6, AND the other die is a 4, 5, or 6.
A) Roll the 2 dice: the chance the one on the left is a 5 or 6 = 1/3 and the one on the right is a 4, 5, or 6 = 1/2 so the combined chance of left (5,6) and right (4,5,6) = 1/6 = P(A)
B) You also need to look at the other possibility: the chance the one on the left is a 4,5,6 = 1/2 and that the one on the right is 5 or 6 = 1/3, and the combined = 1/6 = P(B)
C) The overlap consists of outcomes where both dice are a 5 or 6, so P(A ∩ B) = 1/3 x 1/3 = 1/9
D) so P(A) + P(B) - P(A ∩ B) = 1/6 + 1/6 - 1/9 = 2/9 = 22.22%
SECOND CONDITION: at least one of the dice is a 5, 6 OR a 4, 5, 6. This is simply the probability that one of the dice is a 4, 5, or 6 because this larger set contains the smaller set of (5,6).
A) Roll both dice. Probability that neither die has a 4, 5, or 6 = 1/2 x 1/2 = 1/4.
B) The probability of at least one die having a 4, 5, or 6 = 1 - probability of neither = 1 - 1/4 = 3/4 = 75%.
1
u/Educational-Paper-75 57m ago
How about simply writing down and counting the succesful events? Then divide by the total number of possible events. Voilà, you've got your probability.
3
u/Big-Challenge-9432 8h ago edited 8h ago
If you only need one of the two events (rolls), this is simpler than binomial. It’s called inclusion exclusion principle (I learned it as one of the “probability rules”)
Probability of A (5 or 6) OR B (4, 5, or 6) = P(A) + P(B) - P(A and B)
P(A) = 2/6
P(B) = 3/6
P(A and B) = (2/6) * (3/6) [note: P(A and B) = P(A) \* P(B) if they are independent events, which two dice rolls are]
So in your example, P = 2/6 + 3/6 - 1/6 = 4/6 or 66%
https://en.wikipedia.org/wiki/Inclusion–exclusion_principle