# Problem with probability theory and random variables

1. May 8, 2013

### trenekas

Hello. I have a problem with probability theory task.
X and Y is independent random variables with same density function fx=fy=f. What will be probability of P(X>Y).

This P(X>Y) reminds me a cdf: P(X>Y)=1-P(X<Y)=1-cdf of X.

Cdf of x is equal to integral ∫f dx from -inf to y.
But dont know how to continue because Y depends on its dencity. Maybe some one will be able to help me?

2. May 8, 2013

### HallsofIvy

It should be clear that if x and y have the same probability distribution, then the probability x< y is the same as the probability y< x. And since this is a is a continuous distribution, the probability that x= y is 0.

3. May 8, 2013

### trenekas

So the answer is 1/2. hm :) ok

4. May 8, 2013

### Ray Vickson

You can also get it using integration:
$$P(X>Y) = \int_{-\infty}^{\infty} G(y) f(y)\, dy,$$
where $G(y) = P(X>y)$. We have $f(y) \, dy = -dG(y),$ so
$$P(X>Y) = -\frac{1}{2} \left. G(y)^2 \right|_{-\infty}^{\infty} = 1/2.$$

5. May 8, 2013

### trenekas

Also i have very similar question. Suppose that X,Y,Z are independent random variables and uniformly distributed in the interval [0;1]. What will be P(XY<Z^2)
From that i know that density of all thre r.v. is 1 if xε[0,1] and 0 otherwise.
So fx*fy=1 when x[0;1] and 0 otherwise. cdf of this would be F=x when x[0;1] and 0 otherwise...

6. May 8, 2013

### Ray Vickson

Start by writing down the integrations you need to perform.

7. May 8, 2013

### trenekas

I want to ask, from where you get this:
$$P(X>Y) = \int_{-\infty}^{\infty} G(y) f(y)\, dy,$$
G(y) is cdf and f(y) density?

8. May 8, 2013

### haruspex

P[X>Y] = ƩP[X>Y|Y$\in$I]P[Y$\in$I], where the sum is over a partition of the range of Y. In the limit of vanishingly small intervals I, that produces the integral.