# How to show that $\mathbb{E}[X\mathbb{1}_{\lbrace X\le a \rbrace}]=\mathbb{P}(X\le a)$?

Let $$X$$ be a positive countinuous random variable. How do I show that $$\mathbb{E}[X\mathbb{1}_{\lbrace X\le a \rbrace}]=\mathbb{P}(X\le a)$$? It seems that I have missed something important.
$$\mathbb{E}[X\mathbb{1}_{\lbrace X\le a \rbrace}]=\int\limits_{-\infty}^{\infty}x\cdot f_{X\mathbb{1}_{\lbrace X\le a \rbrace}}(x)dx$$ and i want to justify it equals to $$\int\limits_{-\infty}^{a}x\cdot f_X(x)dx$$.

• No, this equation is false. It must be $$E[1_{\lbrace X\le a \rbrace}] = P(X\le a)$$
– NN2
Mar 18, 2021 at 23:37
• @NN2 then what does it equal? can I say something about P(X≤a) ? the question arise from this comment, where I don't get the transition of (2): math.stackexchange.com/a/4065150/696493 Mar 18, 2021 at 23:47
• Do you mean $$\mathbb E[X1_{\lbrace X\le a \rbrace}] = a\mathbb{P}(X\le a)$$ maybe? Mar 18, 2021 at 23:52
• @peacefulbreeze thanks for the support. I think I got it finally :) Mar 19, 2021 at 0:33

The equation is false because $$E(X\mathbb{I}_{\{X \le a \}}) \ne P(X \le a )$$. In fact, we have rather $$P(X \le a ) = E(\mathbb{I}_{\{X \le a \}})$$.

For your second question: why we have $$E[X \mathbb{1}_{\{X>a\}}]\le \sqrt{E[X^2]}\sqrt{P\{X>a\}}$$ ?

In fact, we apply the Cauchy-Schwarz inequality here, for $$A,B$$ two random variable $$E(AB) \le \sqrt{E(A^2)}\sqrt{E(B^2)} \tag{1}$$ Just replacing $$A = X$$ and $$B = \mathbb{I}_{\{X \le a \}}$$ in $$(1)$$ and noticing 2 things below: $$B^2 = B = \mathbb{I}_{\{X \le a \}}$$ and $$E(\mathbb{I}_{\{X \le a \}})= P(X \le a )$$

• that was very helpful. sometimes the trivial things are not trivial at all to others. thank you very much :) Mar 18, 2021 at 23:58
• @Benny you're welcome
– NN2
Mar 18, 2021 at 23:59

The equation you provided is false. The correct one is $$\mathbb{E}[\mathbb{1}_{X\leq a}] = \mathbb{P}(X ≤ a) .$$

In fact, $$\mathbb{E}[\mathbb{1}_{X ≤ a}] = \int_{-\infty}^{\infty} \mathbb{1}_{X ≤ a} f_X(x) dx = \int_{-\infty}^a f_X(x) dx = \mathbb{P}(A) .$$

Thie is very very false. Take $$X$$ to be an exponetial r.v. with parameter $$1$$. Then LHS is $$\int_0^{a} xe^{-x}dx$$ and RHS is $$\int_0^{a} e^{-x}dx$$. You can compute these integrals and see that these two are not equal for any $$a \in (0,\infty)$$.

$$EX1_{X\leq a}=\int_0^{a}xf_X(x)dx$$ is the correct formula.

• then what does it equal? can I say something about $P(X\le a)$ ? the question arise from this comment, where I don't get the transition of (2): math.stackexchange.com/a/4065150/696493 Mar 18, 2021 at 23:45

That is not quite correct. It is that : $$\mathsf E(\mathbf 1_{X\leqslant a})=\mathsf P(X\leqslant a)$$

What $$\mathsf E(X\,\mathbf 1_{X\leqslant a})$$ equals is $$\int\limits_0^a\mathsf P(y\lt X\leqslant a)\,\mathrm d y$$

The key is that $$X$$ is a positive continuous random variable; meaning that what ever the support for $$f$$ may be, it does not intercept the negative reals. So for any positive $$a$$...

\begin{align}\mathsf E(X\,\mathbf 1_{X\leqslant a})&=\int_0^a x~f(x)\,\mathrm d x\\&=\int_0^a \left(\int_0^x \mathrm d y\right)~f(x)~\mathrm d x\\&=\int_0^a\int_y^a f(x)\,\mathrm d x\,\mathrm d y\\&=\int_0^a\mathsf P(y\lt X\leqslant a)~\mathrm d y\end{align}