# Calculating the probability that one distribution is greater than another

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.

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)$$
(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.)