Probability that sum of two random variables is $1$

82 Views Asked by At

Let $X$ and $Y$ be two independent random variables with density functions $f_x(x) = x\exp\left(-\frac{1}{2}x^2\right) \mathbb{}$ where $x \in \mathbb{R}^+$ and $f_y(y) = \frac{1}{2}$ with $y \in [-1,1]$ .

I'm trying to approximate the probability $P(1-\epsilon<Z<1+\epsilon)$ where $Z=X+Y$ . my first idea was about calculating $Z$ for a number of values $N$ and then extract $P$ those where the $1-\epsilon<Z<1+\epsilon$ then $P(1-\epsilon<Z<1+\epsilon)$ will be $\frac{P}{N}$ . $ \epsilon > 0 $

I'm using $R$ to implement this algorithm

1

There are 1 best solutions below

0
On BEST ANSWER

The common region over $(X,Y)$ for which $|Z - 1| < \epsilon$ is given by the double integrals $$\Pr[|Z - 1| < \epsilon] = \int_{y=-1}^{1-\epsilon} \int_{x=1-y-\epsilon}^{1-y+\epsilon} f_{X,Y}(x,y) \, dx \, dy + \int_{y=1-\epsilon}^1 \int_{x=0}^{1-y+\epsilon} f_{X,Y}(x,y) \, dx \, dy.$$ When $\epsilon$ is very close to zero, the second term is much smaller than the first, and we could ignore it in an approximation. Since $X$ and $Y$ are independent and the antiderivative of the density of $X$ is $$\int xe^{-x^2/2} \, dx = -e^{-x^2/2},$$ we get $$\Pr[|Z - 1| < \epsilon] \approx \frac{1}{2} \int_{y=-1}^{1-\epsilon} e^{-(1-y-\epsilon)^2/2} - e^{-(1-y+\epsilon)^2/2} \, dy.$$ Now we recognize that these are akin to integrating a normal density, so our result will be expressible in terms of standard normal CDFs: $$\begin{align*} \Pr[|Z - 1| < \epsilon] &\approx \frac{\sqrt{2\pi}}{2} \left(\int_{u=0}^{2-\epsilon} \frac{e^{-u^2/2}}{\sqrt{2\pi}} \, du - \int_{v=2\epsilon}^{2+\epsilon} \frac{e^{-v^2/2}}{\sqrt{2\pi}} \, dv \right) \\ &= \frac{\sqrt{2\pi}}{2} \left( \Phi(2-\epsilon) - \Phi(0) + \Phi(2\epsilon) - \Phi(2+\epsilon) \right).\end{align*}$$ And as expected, as $\epsilon \to 0^+$ we find this expression tends to $0$.


The second integral whose value we ignored in the approximation is also amenable to the method of integration that we used above, so it is possible to get an exact expression, which I leave to you as an exercise. But as claimed, it is very tiny. To prove this, you can take the limit of the approximation above to show that $$\lim_{\epsilon \to 0^+} \frac{\Pr[|Z-1|<\epsilon]}{\epsilon} = 1 - e^{-2},$$ but the limit of the second term divided by $\epsilon$ is zero.