# Find density function $Z=2X+Y$

Let $X$ and $Y$ be identically distributed independent random variables with density function

\begin{align} f(t) = \begin{cases}\frac{1}{4} & 0 \leq t \leq 4\\0 & \text{otherwise}\end{cases} \end{align}

Find the density function of $Z=2X+Y$.

I am trying to solve this question as follow: $U=2X$ \begin{align} f_U(u) = \frac{1}{2}f_X(\frac {u}{2})=\begin{cases}\frac{1}{8} & 0 \leq u \leq 8\\0 & \text{otherwise}\end{cases} \end{align}

and

\begin{align} f_Y(y) = \begin{cases}\frac{1}{4} & 0 \leq y \leq 4\\0 & \text{otherwise}\end{cases} \end{align}

and now I am trying to solve $Z=U+Y$

\begin{align} f_Z(z) = \int_{-\infty}^{\infty} f_U(z-y)f_Y(y)dy \end{align}

$f_Y(y)=\frac{1}{4}$ if $0\leq y\leq4$ and $0$ otherwise, then this become:

\begin{align} f_Z(z) = \int_{0}^{8} f_U(z-y)dy \end{align}

now the integrated is $0$ unless $0 \leq z-y \leq 8 (i.e, z-8 \leq y \leq z)$ and then it is $\frac{1}{8}$

if $0 \leq z \leq 4$ then

\begin{align} f_Z(z) = \frac{1}{4}\int_{0}^{z} \frac {1}{8}dy = \frac{z}{32} \end{align}

if $4 < z \leq 12$ then

\begin{align} f_Z(z) = \frac{1}{4}\int_{z-8}^{8} \frac {1}{8}dy = \frac{16-z}{32} \end{align}

and $f_Z(z) = 0$ for values $z < 0$ and $z > 12$

\begin{align} f_Z(z) = \begin{cases} \frac{z}{32} & 0 \leq z \leq 4\\ \frac{16-z}{32} & 4 < z \leq 12\\ 0 & otherwise \end{cases} \end{align}

• your "density" does not integrate to 1... – Momo Oct 31 '16 at 4:08
• @Momo updated the density function – Masoud Oct 31 '16 at 12:51
• Firstly, think about the density od $2 X$ — investigate its cdf and derive it. Secondly, as $X$ and $Y$ are independent, then $2 X$ and $Y$ are independent as well. Thirdly use the formula of convolution. – Denis Korzhenkov Oct 31 '16 at 12:59
• Tip: $f_U(u) = \tfrac 12 f_X(\tfrac u2)=\begin{cases}\tfrac 18&:& 0\leq u\leq 8\\0&:&\text{elsewhere}\end{cases}$ . Intuitively, consider: if you stretch the support, then you decrease the density. – Graham Kemp Oct 31 '16 at 23:52
• Then $\int f_U(z-y)\cdot f_Y(y)\operatorname d y ~=~ \int\limits_{\max(z-8,0)}^{\min(z, 4)} \tfrac 18\cdotp\tfrac 14\mathbf 1_{0\leq z\leq 12}\operatorname d y ~=~ \frac 1 {32}\begin{cases}\bbox[cornsilk]{\qquad?}&:&0\leq z< 4 \\ \bbox[cornsilk]{\qquad?} &:& 4\leq z < 8\\ \bbox[cornsilk]{\qquad?} &:& 8\leq z< 12 \\ 0 &:& \text{elsewhere}\end{cases}$ – Graham Kemp Nov 1 '16 at 1:44