# Question on marginal probability density function

Consider $$\zeta \sim U[-2; 2]$$, $$\eta \sim U[0; 1]$$, $$Z = \zeta + \eta\zeta$$, $$\zeta$$ and $$\eta$$ are independent.

First of all, I need to find the conditional density of $$Z \vert\zeta=x$$. Let $$\zeta = x$$, then $$Z = x(1+\eta) =$$ $$\begin{cases} U[x; 2x], \hspace{0.2cm} x \ge 0, \\ U[2x; x], \hspace{0.2cm}x <0 \end{cases}$$

Writing this in one line, $$\rho_{Z\vert\zeta}(z\vert x) = \frac{1}{x}\mathbb{1}_{x\le z\le 2x}\mathbb{1}_{x\ge0}-\frac{1}{x}\mathbb{1}_{2x\le z\le x}\mathbb{1}_{x<0}.$$

My first concern is whether this density is correct? What happens at $$x=0$$? I mean, is $$\rho$$ finite at this point. I think should be, but I do not understand it properly

Secondly, I need to find conditional expectation $$\mathbb{E}[Z\vert \eta =x]$$

$$$$\mathbb{E}[Z\vert \eta =x] = \int_\mathbb R z\cdot\rho_{Z\vert\zeta}(z\vert x)dz = \int_\mathbb Rz(\frac{1}{x}\mathbb{1}_{x\le z\le 2x}\mathbb{1}_{x\ge0}-\frac{1}{x}\mathbb{1}_{2x\le z\le x}\mathbb{1}_{x<0})dz =\\= \int_x^{2x}\frac{z}{x}\mathbb{1}_{x\ge0}dz-\int_{2x}^x \frac{z}{x}\mathbb{1}_{x<0}dz = \frac{3x}{2}$$$$

Finally, I need to compute marginal density $$\rho_Z(z)$$.

$$$$\rho_Z(z) = \int_\mathbb R \rho_{(\zeta, Z)}(x, z)dx = \int_\mathbb R \rho_\zeta(x) \cdot \rho_{Z\vert\zeta}(z\vert x)dx = \\ = \int_\mathbb R \left(\frac{1}{4x}\mathbb{1}_{-2\le x\le2}\mathbb{1}_{x\le z\le 2x}\mathbb{1}_{x\ge0} - \frac{1}{4x}\mathbb{1}_{-2\le x\le2}\mathbb{1}_{2x\le z\le 2}\mathbb{1}_{x<0}\right)dx = \\ =\int_0^2\frac{1}{4x}\mathbb 1_{x\le z \le 2x}dx - \int_{-2}^0\frac{1}{4x}\mathbb 1_{2x\le z \le x}dx$$$$

In the last line I have troubles with integration of indicator function depending on the variable with respect to I have integrate.

Thanks for the help and for correcting me in case of mistakes.

• $\rho_{Z \mid \zeta = x}(z)$ is correct for $x \neq 0$ (we're considering only the values of $x$ inside the support of $\eta$). We need to introduce a different measure for the case $x = 0$, since $\rho_{Z \mid \zeta = 0}(z) = \delta(z)$. $\mathbb E(Z \mid \eta = x)$ is also correct. For $\rho_Z(z)$, we're integrating over $[0, 2] \cap [z/2, z]$. Consider the cases $0 < z < 2$ and $2 < z < 4$. – Maxim Jan 18 at 22:37

Using the definition of CDF and indicating ($$X,Y$$ are a simple notation rather than you Greek letters IMHO)

$$X\sim U[-2;2]$$

$$Y\sim U[0;1]$$

$$Z=X+XY$$

with $$X\perp\!\!\!\!\!\!\perp Y$$

To calculate Z law you can do

$$F_Z(z)=\mathbb{P}[Z\leq z]=\mathbb{P}[XY\leq z-X]$$

It is only a matter of evaluating the areas involved by the parametric function $$XY\leq z-X$$ in the rectangle of the two uniforms...The function is parametric in $$z \in [-4;4]$$ which is your Z-Support

The requested CDF is this area multiplied by the reciprocal of the rectangle area: $$1/4$$

Deriving F you get $$f_Z(z)$$