Open Side Menu Go to the Top
Register
Pr(X>=Y) Pr(X>=Y)

02-01-2012 , 08:50 PM
How would we go about finding the probability that one distribution is greater than the other ie: Pr(X>Y)? And suppose there was a third distribution how would we find Pr(X>Y,X>Z)?

The reason I ask this is because I am currently examining a game. In this game participants get a score ranging from 0-20 based on skill and some luck, there are 2 or 3 players at one time, and scores are independent.

I have mapped historical data for each player to their own unique distributions. The distributions are of all types eg: logistic, gumbel etc.

So I want to find the probability that one player will have greater score than the other player. How do we go about this?

Thanks
Pr(X>=Y) Quote
02-01-2012 , 09:30 PM
Let's take 2 very simple distributions:

Player A:
scores 0 pts 1/4 of the time
scores 5 pts 1/4 of the time
scores 10 pts 1/2 of the time

Player B:
scores 10 pts 1/2 the time
scores 2 pts 1/2 the time

So, what are ALL the possible outcomes? Basically the cross product of the 2 distributions. I'll list the outcomes like A's Score : B's score : chance

0 : 2 : 1/4*1/2 B wins
0 : 10 : 1/4*1/2 B wins
5 : 2 : 1/4*1/2 A wins
5 : 10 : 1/3*1/2 B wins
10 : 2 : 1/2*1/2 A wins
10 : 10 : 1/2*1/2 tie

So if you want to know how often A wins (ignoring ties) then it'd be
1/4*1/2 + 1/2*1/2 = 1/8+1/4 = 3/8
Pr(X>=Y) Quote
02-01-2012 , 10:48 PM
Hi,

Thanks for replying.

So for the continuous case does that mean it is

double integral f(X)*f(Y)dxdy? If this is true then what would you define as the integral limits since integral over entire range for both functions is 1
Pr(X>=Y) Quote
02-01-2012 , 11:30 PM
Well, think of it this way. Let's say you had players a and b and their distributions are a(x) and b(x) where the x axis is score and the y axis is the chance of having that score.

Consider that if you fix a point for a(x), such as x0, then the chance of B beating A's score is the integral of b(x) from x0 to infinity. So I think you'd have

so if you consider f(z) = integral from z to inf b(x) dx
then what you're looking for is
integral from -inf to inf of f(z)

I am not actually sure how easy such a thing is to do in practice - I haven't done any calculus in about 15 years. I'm not even really entirely sure if the above makes sense. I'll think about it some more.
Pr(X>=Y) Quote
02-01-2012 , 11:51 PM
Quote:
Originally Posted by julep
How would we go about finding the probability that one distribution is greater than the other ie: Pr(X>Y)? And suppose there was a third distribution how would we find Pr(X>Y,X>Z)?

The reason I ask this is because I am currently examining a game. In this game participants get a score ranging from 0-20 based on skill and some luck, there are 2 or 3 players at one time, and scores are independent.

I have mapped historical data for each player to their own unique distributions. The distributions are of all types eg: logistic, gumbel etc.

So I want to find the probability that one player will have greater score than the other player. How do we go about this?.
Since the players are independent, the cumulative distribution of the maximum score of the all the opponents Fmax(k) is the product of the cumulative distributions for each opponent. That's because if we let max be the maximum of the scores of all the players besides X, then

Fmax(k) = P(max ≤ k)

= P(Y ≤ k) * P(Z ≤ k) * ...

= FX(k) * FY(k) * ...

Now for P(X>Y,Z,...) you need to sum over each possible score k the probability that X takes on that score AND the maximum of all the other player's scores is less than or equal to k-1. So you compute



were fX(k) is the probability function for X. Note that if you want P(X≥Y,Z,...) instead of P(X>Y,Z,...), simply change k-1 to k in above sum. I'm assuming that the scores take on only integer values. If they are continuous, then the sum becomes an integral.


For 2 players, we can also do this in terms of the underlying probability functions rather than the cumulative distributions:

P(X>Y) = P(X-Y > 0)

and the probability distribution (not cumulative) of X-Y is the convolution of the distribution of X with the distribution of -Y (or the cross-correlation of the distribution of X with the distribution of Y) which we would then sum from 1 to 20 for P(X>Y) or from 0 to 20 for P(X≥Y).


In answer to your other question, yes, for 2 independent players

f(x,y) = fX(x)*fY(y)

and you could double integrate this for x from 0 to 1 and for y from 0 to x in the continuous case. Or double sum if it is discrete, and only go to x-1 for X>Y. For multiple players, you'd need multiple sums or multiple integrals to do it that way. The first method should be simpler.

Last edited by BruceZ; 02-02-2012 at 09:14 AM.
Pr(X>=Y) Quote

      
m