# Finding P(X-Y=0)

#### julep

##### New Member
Hi,

I have several distributions which I want to compare. They include the Burr distribution, Johnson SB, logistic and a few others. They are all independent. And the range for all data is between 0 and 20

I want to find the probability that the difference in the distributions is 0. What is the best way to go about doing this? I realise I have to double integrate the functions but am not sure how to get the probability for the difference distribution.

Hope this is clear. Thanks

#### BGM

##### TS Contributor
Technically speaking if $$X, Y$$ are independent continuous random variables, then

$$\Pr\{X - Y = 0\} = \iint_{x - y = 0} f_{X, Y}(x,y)dxdy = \int_{-\infty}^{+\infty} \int_y^y f_X(x)dx f_Y(y)dy = 0$$

And it holds even when $$X, Y$$ have the identical distribution.

There are some measures for the differences between distributions. See e.g.

http://en.wikipedia.org/wiki/Divergence_(statistics)

#### julep

##### New Member
Technically speaking if $$X, Y$$ are independent continuous random variables, then

$$\Pr\{X - Y = 0\} = \iint_{x - y = 0} f_{X, Y}(x,y)dxdy = \int_{-\infty}^{+\infty} \int_y^y f_X(x)dx f_Y(y)dy = 0$$

And it holds even when $$X, Y$$ have the identical distribution.

There are some measures for the differences between distributions. See e.g.

http://en.wikipedia.org/wiki/Divergence_(statistics)
Thanks very much for your response.

Just to clarify, all the scores lie between 0 and 20. So we integrate f(X) over 0 to 20 but what do we integrate f(Y) over? I don't understand how Pr(X-Y=0) = 0 when Pr(X-Y=0) is what we want to find. How do we then go about the case where Pr(X>=Y)?

To give you some background I am looking a competitor scores in a game. I have mapped each competitors data to some distribution and want to find the probability of competitor A having a greater score than competitor B.

How do we go about the case if there are three competitors competing at once? ie: Pr(X>=Y, X>=Z), X has a greater score than both Y and Z.