Deriving the exponential distribution from a shift property of its expectation (equivalent to memorylessness). Suppose $X$ is a continuous, nonnegative random variable with distribution function $F$ and probability density function $f$. If for $a>0,\ E(X|X>a)=a+E(X)$, find the distribution $F$ of $X$.
 A: 
About the necessary hypotheses (and in relation to a discussion somewhat buried in the comments to @bgins's answer), here is a solution which does not assume that the distribution of $X$ has a density, but only that $X$ is integrable and unbounded (otherwise, the identity in the post makes no sense).

A useful tool here is the complementary PDF $G$ of $X$, defined by $G(a)=\mathrm P(X\gt a)$. For every $a\geqslant0$, let $m=\mathrm E(X)$. The identity in the post is equivalent to $\mathrm E(X-a\mid X\gt a)=m$, which is itself equivalent to $\mathrm E((X-a)^+)=m\mathrm P(X\gt a)=mG(a)$. Note that $m\gt0$ by hypothesis. Now, for every $x$ and $a$,
$$
(x-a)^+=\int_a^{+\infty}[x\gt z]\,\mathrm dz.
$$
Integrating this with respect to the distribution of $X$ yields
$$
\mathrm E((X-a)^+)=\int_a^{+\infty}\mathrm P(X\gt z)\,\mathrm dz,
$$
hence, for every $a\gt0$,
$$
mG(a)=\int_a^{+\infty}G(z)\,\mathrm dz.
$$
This proves ${}^{(\ast)}$ that $G$ is infinitely differentiable on $(0,+\infty)$ and that $mG'(a)=-G(a)$ for every $a\gt0$. Since the derivative of the function $a\mapsto G(a)\mathrm e^{ma}$ is zero on $a\gt0$ and $G$ is continuous from the right on $(0,+\infty)$, one gets $G(a)=G(0)\mathrm e^{-ma}$ for every $a\geqslant0$.
Two cases arise: either $G(0)=1$, then the distribution of $X$ is exponential with parameter $1/m$; or $G(0)\lt1$, then the distribution of $X$ is a barycenter of a Dirac mass at $0$ and an exponential distribution. If the distribution of $X$ is continuous, the former case occurs.
${}^{(\ast)}$ By the usual seesaw technique: the RHS converges hence the RHS is a continuous function of $a$, hence the LHS is also a continuous function of $a$, hence the RHS integrates a continuous function of $a$, hence the RHS is a $C^1$ function of $a$, hence the LHS is also a $C^1$ function of $a$... and so on.
A: Hopefully there is a more elegant solution,
but let us say $\mu=\mathbb{E}[X]$, and start
with the definition of conditional expectation:
$$
\eqalign{
\mathbb{E}[X|X>a] &=& \int_0^{\infty}x\,\mathbb{P}[X|X>a]\,dx \\
\mu + a &=& \int_{a}^{\infty}x\,\frac{f(x)}{1-F(a)}\,dx \\
\left(\mu+a\right)\,\left(1-F(a)\right) &=& \int_{a}^{\infty}x\,f(x)\,dx \,.
}
$$
Differentiating with respect to $a$, we find
$$
\eqalign{
1-F(a)-\left(\mu+a\right)f(a) &=& -a\,f(a) \\\\
1-F(a)-\mu f(a) &=& 0 \\\\
F(a) + \mu F\,'(a) &=& 1
}
$$
which is an ordinary differential equation,
solvable by standard methods, e.g.,
by multiplying by the integrating factor:
$$
\eqalign{
F(x) + \mu F\,'(x) &=& 1
\qquad\text{for}\qquad x\ge0 \\\\
F\,e^{x/\mu} + \mu F\,'\,e^{x/\mu} &=& e^{x/\mu} \\\\
\left( \mu\,F\,e^{x/\mu} \right)' &=& e^{x/\mu} \\\\
\mu\,F(x)\,e^{x/\mu} &=& \int e^{x/\mu} dx = \mu \, e^{x/\mu} + c \\\\
\mu\,F(x) &=& \mu + c \, e^{-x/\mu}
}
$$
At $x=0$, since $X$ is continuous and nonnegative,
it must be the case that $F(0)=0$, from which it
follows that $c=\mu F(0)-\mu=-\mu$, giving us the CDF
$$
F(x) = 1 - e^{-x/\mu} = 1 - e^{-\lambda x}
$$
and the exponential density
$$
f(x) = \frac1\mu\,e^{-\mu x} = \lambda \, e^{-\lambda x}
$$
where the location parameter $\mu$ and (decay) rate parameter $\lambda$
are reciprocally related, i.e., $\lambda\mu=1$.
EDIT: There is indeed now a more elegant solution, thanks to Didier.
A: Yes, the exponential distribution is the ONLY continuous distribution satisfying the property, because the above differential equation has a unique solution. For the proof of this fact you can also have a look at the page on the exponential distribution at Statlect (the rate parameter and its interpretation - proof).
