Shifted PDF and mean value I was reading an article and I found this equivalence:
$$
\int_0^\infty\,dy\int_0^\infty dx\,p(x+y)\  =\  \langle  X \rangle 
$$
where $p(x)$ is a p.d.f of a positive random variable $X$ and $\langle  X \rangle  = \int_0^\infty xp(x)\,dx$.
Is it true? Changing the variables I have only that the l.h.s is equal to
$$
\int_0^\infty dy\int_y^\infty p(x)\,dx = \int_0^\infty P(X\geq y)\,dy
$$
 A: Yes, this is true, and your transformation is already a first step in showing it (and a useful result in its own right). Now integrate $1\cdot P$ by parts, or alternatively integrate $x\cdot p$ by parts (using $P-1$ as the antiderivative).
A: One should be careful to note that this identity holds only when $X$ is a nonnegative random variables, i.e. $\Pr(X\ge0) = 1.$
You have
$$
\iint\limits_{x\,\ge\,0 \\ y\,\ge\, 0} p(x+y) \, d(x,y) 
$$
Let
\begin{align}
u & = x+y \\
v & = x/(x+y) \\[10pt]
\text{So that } x & = uv \\
y & = u(1-v) \\[10pt]
d(x,y) & = \left| \frac{\partial(x,y)}{\partial(u,v)} \right| \, d(u,v) = u \, d(u,v)
\end{align}
As $u$ remains constant while $x$ goes from $0$ to $u,$ then $v$ goes from $0$ to $1$, and we have
$$
\iint\limits_{x\,\ge\,0 \\ y\,\ge\, 0} p(x+y) \, d(x,y) = \int_0^\infty \left(\int_0^1 p(u) \cdot u \, dv\right) \, du = \int_0^\infty up(u)\,du.
$$
A: Here's a slightly different approach, maybe simpler than my earlier posting.
\begin{align}
u & = x+y \\
v & = x-y \\[10pt]
\text{Therefore } x & = (u+v)/2 \\
y & = (u-v)/2 \\[10pt]
d(x,y) & = \left| \frac{\partial(x,y)}{\partial(u,v)} \right| \, d(u,v) = \frac 1 2 \, d(x,y)
\end{align}
As $x$ goes from $0$ up to $u$ with $u$ fixed, $y$ goes from $u$ to $0$ with $u$ fixed, and $v=x-y$ goes from $-u$ to $u.$ Thus we have
$$
\iint\limits_{x\,\ge\,0 \\ y\,\ge\,0} p(x+y) \, d(x,y) = \frac 1 2 \int_0^\infty \left( \int_{-u}^u p(u) \, dv \right) \, du = \frac 1 2 \int_0^\infty 2u p(u) \, du.
$$
