Prove $\mathbb E(X|X>0)=\mathbb E(X)/\mathbb P(X>0)$

The following is a lemma I read $$\mathbb E(X|X>0)=\frac{\mathbb E(X)}{\mathbb P(X>0)}.$$ Could anyone tell me how to prove it, please? Thank you!

Update

Using the conditional expectation formula I got the following

$$\mathbb E(X|X>0)=\sum_x x\mathbb P(X=x|X>0)=\sum_x x \frac{\mathbb P(X=x, X>0)}{\mathbb P(X>0)}.$$

What is $\mathbb P(X=x, X>0)$, please?

• This reads like regulation bookwork. Is this work for some subject? – Glen_b May 2 '14 at 7:11
• @Glen_b I am not sure what you are saying. This is a formula given for an exercise I did. There is no reasoning for it. – LaTeXFan May 2 '14 at 7:14
• The statement is false in general, the correct statement is $E[X\mid A] = E[X \chi _A]/P(A),$ where $\chi_A$ is the characteristic function, or indicator function, of the event A. Do you have the restriction that X is positive? – ekvall May 2 '14 at 7:31
• Another less trival counter example is any distribution with mean less than $0$. Conditional expectation must be positive, but RHS is negative. – probabilityislogic May 2 '14 at 10:17

Glen_b's answer shows clearly the case of non-negative, discrete random variables, so I thought I'd give a more general result and point to some intuition. First though, as pointed out in the comment, you should note that the Lemma as it stands is not true in general because you need to impose non-negativity of $X$.

Suppose we are working on a probability space $(\Omega, \mathcal M, \mathbb P)$, then we have the following common definition, viz.

Definition
Let $\chi_A$ be the characteristic function, or indicator, of event $A$ - it takes the value 1 on $A$ and 0 elsewhere - then the conditional expectation of a random variable $X$ given the event $A$ is defined as $$E(X\mid A):=\frac{\int_A Xd\mathbb P}{\mathbb P(A)}=\frac{\int X \chi _Ad\mathbb P}{\mathbb P(A)}=\frac{E(X \chi _A)}{\mathbb P(A)}$$ whenever $\mathbb P(A)>0$ and is undefined otherwise.

Your Lemma follows directly from this definition if $X$ is a non-negative random variable (of course, it also holds for an almost surely non-negative r.v. but let's leave that technicality). If $X$ is strictly positive, the result is trivial. To see this, note that you then have $A=\{\omega \in \Omega:X>0\}=\Omega$ so that $\chi_A=1$ everywhere and your expression becomes the same as the last ratio in the definition.

The intuition is that if you already know that $X>0$ then the expectation of $X$ given that $X>0$ is of course the same as the (unconditional) expectation of $X$; you condition on an event which gives you no additional information about $X$. Moreover, if you already know that $X>0$ then $\mathbb P(X>0)=1$.

If the distribution of $X$ has some mass at 0, but is still non-negative, the result is not as trivial but still straight-forward from the given definition and by noting that $$EX=E[X\mid X>0]\mathbb P (X>0) + E[X\mid X= 0]\mathbb P (X = 0)=E[X\mid X>0]\mathbb P (X>0)$$

Taking $X$ to be on the non-negative integers, it pretty much follows immediately from the definition of conditional expectation.

But let's start with just the definition of conditional probability:

$P(X|Y) = \frac{P(X \cap Y)}{P(Y)}$

and expectation for a discrete random variable on the non-negative integers:

$\operatorname{E}[Z] = \sum_{z=0}^\infty z\, p(z),$

so

$E(X|Y) = \sum_{x=0}^\infty x\, p(x|Y),$ (which is the conditional expectation result we need)

So

$E(X|X>0)= \sum_{x=0}^\infty x\, p(X=x|X>0),$

$\quad= \sum_{x=0}^\infty x\, p(X=x\,\&\,X>0)/p(X>0),$

Note that when $X=0$, both terms in $x\, p(X=x\,\&\,X>0)$ are 0.

Hence $x\, p(X=x\,\&\,X>0)|_{x=0} = 0 = x\, p(X=x)|_{x=0}$, so

$E(X|X>0)= \sum_{x=0}^\infty x\, p(X=x)/p(X>0),$

$\quad= E(X)/p(X>0).$

To respond to the new question

What is $\mathbb P(X=x, X>0)$, please?

The joint probability of the two events is the probability that both are true, at the given value of $x$

At $X=0$ that joint is zero (as in my work above), and when it's any higher integer value, it reduces to $P(X=x)$

• Thank you for your response. I know the formula. But what is $P(X, X>0)$? – LaTeXFan May 2 '14 at 7:23
• When X=0 the second part is always false so it's zero, when X is any higher value, the second part is always true, so it's P(X). See the updated answer. – Glen_b May 2 '14 at 7:32
• Made a few additional tweaks to improve it. – Glen_b May 2 '14 at 7:38

A modified version of the last line of @KarlOskar's answer says it all. The conditional mean formula gives

\begin{align} E[X]&=E[X\mid X>0]P(X>0) + E[X\mid X= 0]P(X = 0)+E[X\mid X<0]P(X<0)\\ &=E[X\mid X>0]P(X>0) +E[X\mid X<0]P(X<0)\\ &\leq E[X\mid X>0]P(X>0) \end{align} where we have used the facts that $E[X\mid X= 0]$ is $0$ and that $E[X\mid X<0] \leq 0$. Thus, assuming that $P(X>0) > 0$, we have that $$E[X \mid X > 0] \geq \frac{E[X]}{P(X>0)}$$ with equality holding (as the OP wants) only when $P(X < 0) = 0$, that is, $X$ is nonnegative with probability $1$, as has already been pointed out by @Glen_b and Karl Oskar. Note that there is no need to assume that $X$ is an integer variable; all that is needed is that $E[X]$ be defined.

By the Law of Total Expectation, we have

$$\mathbb E(X) = \mathbb E(X|X>0)\cdot P(X>0) + \mathbb E(X|X\leq 0)\cdot P(X\leq 0)$$

This is the general result so we see that the relation the OP states will be true if

a) $P(X\leq 0)=0$ i.e. if $X$ is almost surely a strictly positive random variable

b) if $P(X\leq 0)>0$, then we need $\mathbb E(X|X\leq 0) = 0$ which can only be possible if $X$ is a discrete (or mixed) random variabe, and if it takes non-negative values only, so that all the $P(X\leq 0)$ is concentrated at the value $0$, giving us a zero value for the truncated expected value.