2
$\begingroup$

I have a problem which I think should actually be really simple, but I can't see the solution and either it's more complicated than I realize or I just cannot figure out how to word it for Google.

I have two distributions, both generated by rolling some dice. For the sake of example, let's suppose that distribution A is created by rolling 2d20 and distribution B is created by rolling 3d10.

I have calculated the mean and standard deviation of both distributions.

My question is: how do I efficiently calculate and express the probability that a result from distribution A will be bigger than a result from distribution B?

To put that another way, if A and B are playing a game where their score comes from their die roll, what is the percentage chance that A will win?

I am aware that I could do this very easily by experiment (i.e. test it a million times and check how often it happens), but since I am doing this in Excel, I would prefer not to do that much computing if at all possible.

$\endgroup$

2 Answers 2

1
$\begingroup$

A way to think about it in your case is to consider each possible dice combination for player $A$. Then, for each roll, consider the probability that a roll from player $B$ loses to that. Then sum each of those probabilities times the probability that A makes that roll, and you have your answer for how likely $A$ is to win in general.

Put mathematically, Let $r_i^A$ be a roll from player $A$, $P(r_i^A)$ the probability that the roll happens, and let $F_y(r_i^A)$ be the probability that $B$ rolls a values less than $r_i^A$.

And so, the probability that $A$ wins is $\sum P(r_i^A)\cdot F_y(r_i^A)$

However, calculating these probabilities for each combination of the dice you gave is pretty tedious to do by hand (unless I'm missing an obvious trick), not sure how viable it is in Excel either. So if you need an exact closed form solution, you're probably going to need to write a program to calculate those probabilities.

(Went ahead and wrote a short Python program for your example, it's about a $65.6\%$ chance that A wins. That wasn't by calculating the probabilities - just by doing a bunch of simulations - the experiment approach, as you said.)

$\endgroup$
0
$\begingroup$

Previous answer did it but just to add a perspective I created a little python code that should calculate the theoretical probability and it is around 30.7915% for A stricly greater than B.

Pa = [a+b+c for a in range(1, 11) for b in range(1, 11) for c in range(1, 11)]
Pb = [a+b for a in range(1, 21) for b in range(1, 21)]
P_A_wins = 0
for a in Pa:
    for b in Pb:
        if a>b:
            P_A_wins += (1 / len(Pa))*(1 / len(Pb))

print(P_A_wins)

0.30791499999990035

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.