probability question needs some help

52 Views Asked by At

suppose $X$ and $Y$ are independent and identically distributed random variables that are uniformly distributed on $[0,1]$

What is the PDF of $ W=Y-X $

i tried to draw a picture to illustrated it but it seems very difficult, can anyone guide me a bit?

2

There are 2 best solutions below

0
On

Although this is not your question, perhaps it is easiest to do the discrete case first: You want to find $P(W=n) = P(Y-X=n)$:

Note that the possibilities are that $(X=0, Y=n), (X=1,Y=n+1), (X=-1,Y=n-1), \ldots, (X=k, Y=n+k),\ldots$ so we get $$ P(W=n) = \sum_{i=-\infty}^{\infty} P(X=i, Y=n+i) $$ Since they are independent, this is $$ \sum_{i=-\infty}^{\infty} P(X=i)P(Y=n+i) = \sum_{i=-\infty}^{\infty} p_X(i)p_Y(n+i) $$ Can you now guess the formula for the general/continuous case?

0
On

If you imagine the joint PDF of X and Y, you'll get a unit square of unit height. A simple way to get your answer will be to first construct the CDF of W then differentiate to get the pdf:

$CDF(W)=P(W\leq w)=P(Y-X \leq w)$

What you need to do is find the total joint density contained in the portion of the domain bounded by $Y=0,Y=1,X=0,X=1$, and the line $Y=w+X$ and write this in terms of $w$. The line will have a positive slop that shifts upwars with grater differences, and downwards with smaller differences. You'll want the area below this line (i.e., towards lesser w-values).

This will be your CDF(w), now you take the derivative wrt w to get your pdf.