1

I have what I hope is a simple question:

Say $Z = XY$ where $X, Y \sim \text{Uniform}\,[-1, 1]$ and independent. What is the cdf and pdf of $Z$?

I found this answer for the case of when $X, Y \sim \text{Uniform}\,[0, 1]$ very helpful, and I can follow it. But I think that allowing $Z$ to take negative values makes this one trickier.

bswag
  • 13
  • Hint $$\mathbb P{Z\leq z}=\int_{-1}^0\mathbb P{Xy\leq z\mid Y=y}\mathbb P{Y\in ,\mathrm d y}+\int_0^1\mathbb P{Xy\leq z\mid Y=y}\mathbb P{Y\in ,\mathrm d y}$$ – Surb Aug 07 '24 at 19:59
  • Thank you for the hint! What I am confused about now is that $z$ can be either negative or positive. Based on the sign of $z$ the value of $\Pr[X \leq z/y | Y=y]$ changes, I think. – bswag Aug 07 '24 at 20:10
  • Are you assuming $X$ and $Y$ are independent? If so, you should say so. – Robert Israel Aug 07 '24 at 20:25
  • @RobertIsrael yes! sry - fixed. – bswag Aug 07 '24 at 21:01
  • Generally, if $X,Y$ have pdfs $f_X,f_Y$ and are independent, then the pdf of the product can be represented as a sort of multiplicative convolution. More explicitly, $$ f_{XY}(z) = \int_{\operatorname{supp} X} f_X(x) , f_Y! \left( \frac z x \right) , \frac{\mathrm{d}x}{|x|} $$ This result is discussed and proved on Wikipedia here. – PrincessEev Aug 07 '24 at 22:14

2 Answers2

2

If $X$ is uniform on $[-1,1]$ then $Xy \sim U(-y,y)$. Hence if $y \geq 0$ and $|z| \leq |y|$,

$$P(Xy \leq z) = \frac{1}{2y}\int_{-y}^zdx = (1+z/y)/2, $$

Overall for $y \geq 0$,

$$ P(Xy \leq z) = \begin{cases} (1+z/y)/2 & y \geq |z|\\ 0 & z \leq -y \\ 1 & z \geq y \end{cases} $$

A similar calculation shows that for $y < 0$

$$ P(Xy \leq z) = \begin{cases} (1-z/y)/2 & |y| \geq |z|\\ 0 & z \leq y \\ 1 & z \geq -y \end{cases} $$

Integrating this against the distribution of $Y$ for $z >0$,

\begin{align} \int_{-1}^0 P(Xy \leq z | Y=y)dy + \int_{0}^1 P(Xy \leq z | Y=y)dy &= \frac{1}{4}\int_z^1(1+z/y) dy + \frac{1}{2}\int_0^zdy \\ &+ \frac{1}{4}\int_{-1}^{-z} (1-z/y)dy + \frac{1}{2}\int_{-z}^0dy \\ &= 1/2 + z/2 -(z\log |z|)/2, \end{align}

You can carry out the integral for $z < 0$ to find that in fact

$$P(Z \leq z) = 1/2 + z/2 - (z\log |z|)/2,$$

holds for all $z \in [-1,1]$. This is not differentiable at $z = 0$, but you can differentiate it elsewhere to find,

$$f(z) = \frac{1}{2}\begin{cases} - \log z & 0<z\leq 1\\ -\log (-z) & -1 \leq z <0 \end{cases} $$

Enforce
  • 1,003
  • For those interested in computer algebra, the solution is given directly (in Mathematica) from PDF@TransformedDistribution[x y, {x \[Distributed] UniformDistribution[{-1, 1}], y \[Distributed] UniformDistribution[{-1, 1}]}] // FullSimplify – David G. Stork Aug 08 '24 at 02:37
  • You should include the restrictions $z \leq 1$ and $z \geq -1$ in the appropriate lines of your last displayed equation, – Dilip Sarwate Aug 08 '24 at 14:02
  • @DilipSarwate Yes. Thanks for pointing it out. – Enforce Aug 08 '24 at 18:03
2

Using the linked answer:

We can write $X= |X| \, \rm{sign}(X) = A S$ where $A$ is uniform over $[0,1]$ and $S$ takes values $1,-1$ with equal probability, with $A,S$ independent. Similarly, $Y=B T$

Then $Z = X Y = A S B T = W R $

where $W=AB$ has the density given in the other answer ($-\log w$ ) and $R$ again takes values $1,-1$ with equal probability, independent of $W$.

That is

$$Z = \begin{cases} W & \text{with probability } \frac12\\ -W & \text{with probability }\frac12 \end{cases} $$

Then

$$f(z) = \begin{cases} - \frac12 \log z & 0<z\le 1\\ - \frac12 \log (-z) & -1\le z <0 \end{cases} $$

or $f(z) = -\frac12 \log(|z|)$

leonbloy
  • 66,202