4

There are several ways to find the CDF of $Z=X+Y$ with $X$ and $Y$ independent RVs. I want to use the general answer included in this question CDF of two variable to find the CDF when $X$ and $Y$ are continuous and uniform distributed over $[0,1]$.

In this case, I use the two densities to the be $1$. The result is $z^2/2$ when $0\le z\le1$ and this I know is correct. The result is $z-\frac{1}{2}$ when $1\le z \le2$ that is not correct, it should be: $1- \frac{1}{2}(2-z)^2$. Where is the mistake, in the cited solution or when I use it? Can you elaborate?

Ang
  • 61
  • Asked and answered many times before. Did you search the site? – StubbornAtom Aug 03 '18 at 14:18
  • I have got the same result like you. – callculus42 Aug 03 '18 at 14:22
  • @StubbornAtom: Thanks, however I would expect the author of the solution, Graham Kemp to answer here or a pointer to the site where the exact same question as mine is answered already. – Ang Aug 03 '18 at 14:42
  • A simple approach to find the CDF is by drawing a picture of the unit square and finding the area that matters (can be done without integration). Anyway, here are a couple of our popular posts of essentially the same question: https://math.stackexchange.com/questions/357672/density-of-sum-of-two-uniform-random-variables-0-1?noredirect=1&lq=1, https://math.stackexchange.com/questions/220201/sum-of-two-uniform-random-variables?noredirect=1&lq=1. – StubbornAtom Aug 03 '18 at 15:26
  • @StubbornAtom The question if the linked answer is probably wrong. Why do the OP´s calculation doesn´t match? – callculus42 Aug 03 '18 at 15:32
  • @Ang I get $z-\frac12$-not $z-1$. But this is still not right. $\text{"however I would expect the author of the solution, Graham Kemp to answer here or a pointer}$ $\text{to the site where the exact same question as mine is answered already"}$ You can leave a comment below the answer. He will notice your comment. – callculus42 Aug 03 '18 at 16:07
  • @callculus: yes, typo now have edited the question. The first thing I wanted to do, but I'm new and to comment under an answer you need to have 50 of reputation :-) The only way out was to create an actual question. Also, the call-out to the author of the answer does not seem to work... – Ang Aug 03 '18 at 16:17
  • @ang I have left a comment for you. – callculus42 Aug 03 '18 at 16:21
  • @callculus many thanks, you are really helpful !! – Ang Aug 03 '18 at 16:25
  • @Ang You´re welcome. The concept of providing services is my top priority-even though it is very hot (in Germany). – callculus42 Aug 03 '18 at 16:27
  • Eventually you are looking for something like

    \begin{align} P(X+Y\le z)&=\iint_{x+y,\le, z}\mathbf1_{0<x<1,0<y<1},dy,dx \&=\int_0^{\min(z,1)}\int_0^{\min(z-x,1)},dy,dx \&=\int_0^{\min(z,1)}\min(z-x,1),dx \&=\begin{cases}\int_0^z\min(z-x,1),dx&,\text{ if }0\le z<1\\int_0^1\min(z-x,1),dx&,\text{ if }1\le z<2\end{cases} \end{align}

    – StubbornAtom Aug 03 '18 at 16:54
  • 1
    @StubbornAtom I think your hint is correct, that shows that the answer https://math.stackexchange.com/a/1231110/144421 that triggered this question was incorrect. It seems the author has edited and corrected it now. I will write a formal answer to this question soon as a summary. Thanks everyone for your help! – Ang Aug 06 '18 at 06:54

1 Answers1

2

The answer included in CDF of two variable has been now edited and corrected by the author. The following is valid for a sum of two uniformly distributed continuous random variables:

$$\mathsf P(X+Y\leq z) = \begin{cases} 0 & : z< 0 \\[2ex] \int\limits_{0}^{z}\;\int\limits_{0}^{z-x} f_{X,Y}(x,y)\operatorname d y\operatorname d x & : 0 \leq z \leq 1 \\[2ex] \int\limits_{0}^{z-1}\;\int\limits_{0}^{1} f_{X,Y}(x,y)\operatorname d y\operatorname d x + \int\limits_{z-1}^{1}\;\int\limits_0^{z-x} f_{X,Y}(x,y)\operatorname d y\operatorname d x & : 1 < z \leq 2 \\[1ex] 1 & : 2 < z\end{cases}$$

where the outer integral is over $x$ variable. Let's explain the integration domain. It can be represented by $E\times F$ where both $E$ and $F$ are subsets of $[0,1]$. $F=[0,\min(z-x,1)]$ because $y\leq z-x\,\, \forall z$ and x.

To find $E$, it is suitable to split the unit interval depending on the value of z.

$0 \leq z \leq 1$:

$E=[0,z]\cup [z,1]$. However $x\in[z,1]$ does not fulfill the main $y\leq z-x$. Therefore $E=[0,z]$.

$1 < z \leq 2$:

$E=[0,z-1]\cup [z-1,1]$.

$x \in[0,z-1]\implies \min(z-x,1)=1 \implies F=[0,1]$

$x \in [z-1,1] \implies \min(z-x,1)=z-x \implies F=[0,z-x]$

Example picture for the sum of two integrals in the region $1 < z \leq 2$ (for $z =1.4$):

enter image description here

garej
  • 137
Ang
  • 61