A simple transformation (confusion) from standard uniform distribution to Triangular distribution

1.3k Views Asked by At

I am trying to do (myself) the very basic uniform distribution to triangular distribution conversion. But I am not getting success. if $u,v$ are two standard uniform distributed random variable (R.V.) such that $u,v \in [0,1]$, then $w = |u-v|$ is the R.V. I have to find pdf for $w$ which is of course $f_W(w) = 2(1-w)$. Now following is my solution


$f_U(u) = f_V(v) = 1$ are standard uniform R.V. with range $[0,1]$. Then

$$P[W<w] = P[|U-V| < w] = P[(U-V) < w] + P[(V-U) < w] $$ first, $$E_V[P[U < w + v]] = E_V[w+v] = w +\frac{1}{2} $$ where $E_V[]$ is expectation w.r.t R.V. $V$ and $E_V[.] = \frac{1}{2}$ for std. unifrom R.V $V \in [0,1]$

Similarly, $$E_U[P[V < w + u]] = E_V[w+u] = w +\frac{1}{2} $$

So $$P[W < w] = w +\frac{1}{2} + w +\frac{1}{2} = 2w + 1$$ Now, if I differentiate w.r.t $w$, then I will get

$$f_W(w) = 2$$

where am I going wrong?

1

There are 1 best solutions below

5
On BEST ANSWER

I think you mean Uniform distribution, not Normal. The first mistake is in the first line, which should be

$$P[W<w] = P[|U-V| < w] = P[\color{red}{-w<(U-V) < w}] . $$

[Obs: OP already edited the question to fix these issues.]


I'm not sure how to follow your logic, but here is an alternative. Notice that

$$f_U(x)=f_V(x)=\begin{cases}1&x\in[0,1]\\0&\text{otherwise}\end{cases},$$

and, letting $Z\equiv U-V$ we have

$$f_Z(z)=\int_{-\infty}^{\infty} f_U(z+v)f_V(v)dv=\int_{0}^{1} f_U(z+v)dv=\begin{cases}1-z &z\in[0,1]\\1+z&z\in[-1,0)\\0&\text{otherwise}\end{cases}.$$

Therefore,

$$ P[-w<(U-V) < w] = \int_{-w}^w f_Z(z)dz= \begin{cases}w(2-w)&w\in[0,1]\\0&\text{otherwise}\end{cases},$$

and, finally, taking derivative with respect to $w$,

$$ f_W(w)= \begin{cases}2(1-w)&w\in[0,1]\\0&\text{otherwise}\end{cases}.$$