Problem :
Let $X$, $Y$ two uniform independant r.v, find the law of $X+Y$.
Solution :
Let $f$ be any bounded measurable function, we look for the law of $X+Y$. $\mathbb{E}[f(X+Y)]=\int_0^1 \int_0^1 f(X+Y)dxdy$
with a change of variable $(u,v)=(x,x+y)$ so $(x,y)=(u,v-u)$ , the Jacobian of the change of variable takes the value of $1$
$\mathbb{E}[f(X+Y)]=\int_0^2 f(v)\int_{max(0,v-1)}^{min(1,v)} dudv $ $=\int_0^2 f(v)\min(2-v,v)dv$
We conclude the density of $X+Y$ is $min(2-v,v)\mathbb{1}_{v \in [0,2]}$
My question:
- Why can we use the min/max integral bounds this way? I mean I can get myself to have an idea what it is about using cases, but I could not make perfect sense of it in integral bounds, I think there are some skipped steps
We have $0\leq x \leq y+x \leq 2$ that is $0\leq u \leq v \leq 2$
I then get the bounds : $\int_0^2 \int_{0}^{v}$
What I get by my calculations is: After change of variables and setting the bounds :
$\mathbb{E}[f(X+Y)]=\int_0^1 \int_0^1 f(X+Y)dxdy$
$=\int_0^2 \int_{0}^{v} f(v) dudv $
$=\int_0^2 \int_{0}^{2} f(v) \mathbb{1}_{[0,v]} dudv $
$=\int_0^2 f(v)\int_{0}^{2} \mathbb{1}_{[0,v]}(u) dudv $
(I may have done something that is not legit but it did not lead me anywhere anyways)
It is much easier to compute the density of $X+Y$ using convolution. Let $Z=X+Y$, then the density of $Z$ is given by $$ f_Z(t) = f_X\star f_Y(t) = \int_{\mathbb R}f_X(\tau)f_Y(t-\tau)\ \mathsf d\tau. $$ Now, $f_X(\tau) = \mathsf 1_{(0,1)}(\tau)$ and $f_Y(t-\tau)=\mathsf 1_{(0,1)}(t-\tau)$, so from the bounds $0<\tau<1$, $0<t-\tau<1$, and knowledge that $X+Y$ takes values in $(0,2)$, we see that there are two cases. If $0<t<1$ then $$ f_Z(t) = \int_0^t \ \mathsf d\tau = t, $$ and if $1<t<2$ then $$ f_Z(t) = \int_{t-1}^1\ \mathsf d\tau = 2-t. $$ Hence $$ f_Z(t) = t\mathsf 1_{(0,1)}(t) + (2-t)\mathsf 1_{(1,2)}(t). $$