1

Consider the product distribution $Z = X_1\cdot X_2$ for

$$ \begin{aligned} X_1 &\sim \textrm{Uniform}[1 - a, 1 + a] \quad, \quad 0 < a < 1 \\ X_2 &\sim \textrm{Uniform}[1 - b, 1 + b] \quad, \quad 0 < b < 1 \\ \end{aligned} $$

I derived the CDF as follows (similar to this answer) but I'm having doubts that it is correct since a comparison with random sampling shows quite some deviation.

$$ \begin{aligned} F_Z(z) &= \textrm{Pr}[Z \leq z] \\ &= \int_{1-a}^{1+a} \textrm{Pr}[X_2 \leq z/x] \, f_{X_1}(x) \; dx \\ &= \int_{1-a}^{1+a} F_{X_2}(z/x) \, f_{X_1}(x) \; dx \\ &= \int_{1-a}^{1+a} \frac{\frac{z}{x} + b - 1}{2b} \, f_{X_1}(x) \; dx \\ &= \frac{b - 1}{2b} + z\cdot\frac{\tanh^{-1}(a)}{2ab} \end{aligned} $$

I estimate this CDF using the following Python snippet:

import numpy as np

np.random.seed(0)

def F(z, , a, b): return (b - 1) / (2b) + z * np.arctanh(a) / (2ab)

def estimate(z, , a, b, N=107): x1 = np.random.uniform(1 - a, 1 + a, size=N) x2 = np.random.uniform(1 - b, 1 + b, size=N) return np.mean(x1x2 <= z)

def compare(z, *, a, b): e = [estimate(z, a=a, b=b) for _ in range(7)] diff = F(z, a=a, b=b) - np.mean(e) print(f'[{z=}, {a=}, {b=}] {diff} vs. {np.std(e)}')

for ab in [0.1, 0.2, 0.3, 0.4, 0.5]: compare(1.0, a=ab, b=ab)

which gives:

[z=1.0, a=0.1, b=0.1] 0.0011786436966352287 vs. 9.239367413632735e-05
[z=1.0, a=0.2, b=0.2] 0.005161311390312617 vs. 0.00016954833637446384
[z=1.0, a=0.3, b=0.3] 0.012021147160144685 vs. 0.00013443702569435986
[z=1.0, a=0.4, b=0.4] 0.02242172114071983 vs. 0.0001156793157035264
[z=1.0, a=0.5, b=0.5] 0.037655831525252426 vs. 0.00018787333770497807

So the deviation grows quite big compared to the standard deviation of the estimates. However I can't spot what's wrong with the above formula. I'm glad for your help.

a_guest
  • 201

1 Answers1

0

The CDF of $X_2$ is piecewise depending on the value of $z/x$. Specifically, we have $$\Pr[X_2 \le z/x] = \begin{cases} 0, & z/x \le 1-b \\ \frac{z/x - (1-b)}{2b} & 1-b < z/x \le 1+b \\ 1 & 1+b < z/x. \end{cases}$$ Therefore, your integration must consider the separate outcomes where the interval of integration $x \in [1-a, 1+a]$ is intersected/partitioned by these different cases. Since the density of $X_1$ is uniform, we obtain $$F_Z(z) = \frac{1}{2a} \left(\int_{x=c}^{d} \frac{z/x - (1-b)}{2b} \, dx + \int_{x=d}^{1+a} 1 \, dx \right),$$ where $$c = \max\left(1-a, \frac{z}{1+b}\right) , \\ d = \min\left(1+a, \frac{z}{1-b}\right).$$

heropup
  • 135,869
  • I understand the reasoning behind the piecewise definition of $F_{X_2}$. But doesn't that place an upper bound on the $x$ integral? That is the boundaries of the right integral should be $\int_{1-a}^{c}$? – a_guest Jul 16 '20 at 07:39