# Thread: finding cdf of standard uniform

1. ## finding cdf of standard uniform

If $\displaystyle X \;and\; Y$ are independent $\displaystyle standard \;uniform$ random variables. and we want to find the cumulative distribution of $\displaystyle X-2Y$

to find the cdf here, can I suppose that $\displaystyle W=X-2Y,0<w<1$ and then find $\displaystyle P(W \leq w)$

so, I have $\displaystyle P(W \leq w) = P(X-2Y \leq W) = P(Y \geq \frac{W-X}{2}) = 1 - P(Y < \frac{W-X}{2})$

and integrate $\displaystyle 1 - \displaystyle \int _0^w\;\int_0^{\frac{w-x}{2}}\;dy\;dx$

is this right or am I wrong?

2. Originally Posted by chutiya

If $\displaystyle X \;and\; Y$ are independent $\displaystyle standard \;uniform$ random variables. and we want to find the cumulative distribution of $\displaystyle X-2Y$

to find the cdf here, can I suppose that $\displaystyle W=X-2Y,0<w<1$ and then find $\displaystyle P(W \leq w)$

so, I have $\displaystyle P(W \leq w) = P(X-2Y \leq W) = P(Y \geq \frac{W-X}{2}) = 1 - P(Y < \frac{W-X}{2})$

and integrate $\displaystyle 1 - \displaystyle \int _0^w\;\int_0^{\frac{w-x}{2}}\;dy\;dx$

is this right or am I wrong?
Wrong.

For starters it should be $\displaystyle y < \frac{x - w}{2}$. Note also that the support of W is $\displaystyle -2 \leq w \leq 1$ so you will probably have to consider separate cases, that is, the cdf will be a hybrid function.

3. Thank you. I always struggle with drawing the support. Since $\displaystyle -2 \leq w \leq 1$, we have to calculate the cdf for $\displaystyle X-2Y=W,\;-2 \leq w < -1$ and$\displaystyle -1 \leq w < 0$, $\displaystyle 0\leq w< 1$ and then integrate, right?

4. correct!