linear combination of random variables Let $X$ and $Y$ be $iid$ uniformly distributed random variables over the interval $[0,1]$. We know by convolution that the distribution of $Z=X+Y$ is given by: 
$$f(z) = \left \{ \begin{array}{ccc}
z & \text{if} & 0\leq z \leq 1 \\
2-z & \text{if} & 1 \leq z \leq 2  
\end{array} \right. $$
What would happen if the transformation were a linear combination? $Z=c_1 X+ c_2 Y$. Can I still use convolution to find this transformation? 
$$f(z) = \int_{-\infty}^{+\infty}f_X\left (\frac{z - c_2 y}{c_1} \right)f_Y(y)dy$$
But $f_Y(y) = 1$ since it is uniform, 
$$f(z) = \int_0^1f_X\left (\frac{z - c_2 y}{c_1} \right)dy$$
I am stuck. Are the bounds correct? What should I do after? Thanks
 A: w.l.o.g. (justified by $X$ and $Y$ being identically distributed) there are three distinct cases
i) $c_1, c_2 > 0$;
ii) $c_1>0 , c_2 < 0$;
iii) $c_1 , c_2 < 0$.
I will solve case (i), leaving the other two for you to develop analogously. As you suspect, we can solve each of these cases using convolution. For case (i) assume, again w.l.o.g., that $c_1 > c_2$. Note that $c_1X$ is uniformly distributed, independently of $c_2Y$, on the interval $[0,c_1]$, and analogously for $c_2Y$. This means that the respective pdfs are
$$
f_{c_1X}(x){}={}\dfrac{1}{c_1}{\bf{1}}_{\left\{0<x<c_1\right\}}\,\,\,\,\mbox{ and }\,\,\,\,f_{c_1Y}(y){}={}\dfrac{1}{c_2}{\bf{1}}_{\left\{0<y<c_2\right\}}\,.
$$
Using this, observe that the non-zero range of the random variable $Z=c_1X+c_2Y$ is the interval 
$$
0<Z<c_1+c_2\,,
$$
within which we have 3 disjoint sub-intervals (and, therefore, three convolutions to solve). You can show that:
(i) for $0\le z \le c_2$,
$$
\int\limits{\bf{1}}_{\left\{0<y<z\right\}}\,f_{c_1X}\left(z-y\right)f_{c_2Y}\left(y\right)\,\mathrm{d}y{}={}\int\limits_{0}^{z}\,f_{c_1X}\left(z-y\right)f_{c_2Y}\left(y\right)\,\mathrm{d}y{}={}\dfrac{z}{c_1c_2}\,;
$$
(ii) for $c_2 < z \le c_1$,
$$
\int\limits{\bf{1}}_{\left\{z-c_2<x<z\right\}}\,f_{c_2Y}\left(z-x\right)f_{c_1X}\left(x\right)\,\mathrm{d}x{}={}\int\limits_{z-c_2}^{z}\,f_{c_2Y}\left(z-x\right)f_{c_1X}\left(x\right)\,\mathrm{d}x{}={}\dfrac{c_2}{c_1c_2}\,;
$$     
(iii) for $c_1 < z \le c_1+c_2$,
$$
\int\limits{\bf{1}}_{\left\{z-c_2<x<c_1\right\}}\,f_{c_2Y}\left(z-x\right)f_{c_1X}\left(x\right)\,\mathrm{d}x{}={}\int\limits_{z-c_2}^{c_1}\,f_{c_2Y}\left(z-x\right)f_{c_1X}\left(x\right)\,\mathrm{d}x{}={}\dfrac{c_1-z+c_2}{c_1c_2}\,.
$$     
This shows that


$$
f_{Z}(z){}={\bf{1}}_{\left\{0\le z \le c_2\right\}}\dfrac{z}{c_1c_2} {}+{}{\bf{1}}_{\left\{c_2 < z \le c_1\right\}}\dfrac{c_2}{c_1c_2} {}+{}{\bf{1}}_{\left\{c_1 < z \le c_1+c_2\right\}}\dfrac{c_1-z+c_2}{c_1c_2}\,.
$$


A: The formulas for $f(z)$ appear to be correct. 
But in the general case $c_1X + c_2Y$, 
the result will not be two piecewise linear segments like the case for $X + Y$. 
In general (unless $c_1 = c_2$) you will have three segments.
Try to evaluate $f(z)$ at a few different values of $z$ to see what the shape
of that density is.  The tricky part is to determine, for each value of $z$,
which subrange of $y$ within $[0,1]$ will make $f_X\left(\frac{z-c_2y}{c_1}\right) = 1$.
You might want to consider the case $c_1 < c_2$ separately from
the case $c_1 > c_2.$
