Problem with indicator in $\mathbb E[|X|\unicode{x1D7D9}_E]$ 
Suppose $\mathbb E\:|X|<\infty$. Show that for all $\epsilon>0$, there exists a $p>0$ such that if a set $E\subseteq \Omega$ satisfies $\mathbb P(E)<p$ then $\mathbb E[|X|\unicode{x1D7D9}_{E}]<\epsilon$.

Hint: For any set E and $n>0$, recall $\mathbb E[|X|\unicode{x1D7D9}_E]=\mathbb E[|X|\unicode{x1D7D9}_E\unicode{x1D7D9}_{\{|X|>n\}}]+\mathbb E[|X|\unicode{x1D7D9}_E\unicode{x1D7D9}_{\{|X|\leq n\}}]$

To be honest I don't understand their hint. Like

*

*why $\mathbb E[|X|\unicode{x1D7D9}_E]$ equal to $\mathbb E[|X|\unicode{x1D7D9}_E\unicode{x1D7D9}_{\{|X|>n\}}]+\mathbb E[|X|\unicode{x1D7D9}_E\unicode{x1D7D9}_{\{|X|\leq n\}}]$.

*why did they bring such an indicator?

*And is $\mathbb E[|X|\unicode{x1D7D9}_E]$ means expectation of $|X(\omega)|$ when $\omega\in E?$
I managed to get the solution:

Fix $\epsilon>0$. Recall that since $|X(\omega)|<\infty$ for all $\omega$, $|X|\unicode{x1D7D9}_{\{|X|>n\}}\rightarrow0\textrm{ a.s.}$ Also, $|X|\unicode{x1D7D9}_{\{|X|>n\}}\leq |X|$ which is integrable, so by Dominated Convergence Theorem(DCT) it follows that $\mathbb E[|X|\unicode{x1D7D9}_{\{|X|>n\}}]\rightarrow0$
Thus, we can choose $n$ such that $\mathbb E[|X|\unicode{x1D7D9}_{\{|X|>n\}}]<\frac{\epsilon}{2}$. Now, consider any set $E$. Observe that,
$$
\begin{align}
\mathbb E[|X|\unicode{x1D7D9}_E] &= \mathbb E[|X|\unicode{x1D7D9}_{\{|X|>n\}}]+E[|X|\unicode{x1D7D9}_{\{|X|\leq n\}}] \\
& \color{red}{\stackrel{?}{\leq}}  \mathbb E[|X|\unicode{x1D7D9}_{\{|X|>n\}}]+n\mathbb E[\unicode{x1D7D9}_E] \\
& \color{red}{\stackrel{?}{\leq}} \frac{\epsilon}{2}+n\mathbb P(E)
\end{align}  
$$
From this, if $\mathbb P(E)< \frac{\epsilon}{2n}$, $\mathbb E[|X|\unicode{x1D7D9}_E]<\epsilon$, so the claim is shown for $p=\frac{\epsilon}{2n}$, where $n$ is
specified above.

From the solution, I am also some questions like

*

*Why $|X|\unicode{x1D7D9}_{\{|X|>n\}}\leq |X|?$

*How they come up with those red marked inequalities? explicitly why $E[|X|\unicode{x1D7D9}_{\{|X|\leq n\}}] \leq n\mathbb E[\unicode{x1D7D9}_E] \leq n\mathbb P(E)?$
I think all of that confusion arises because of that indicator. Maybe I am not understanding its role here.
 A: Recall definition of indicator function
$$1_{A}\left(\omega\right)=\begin{cases}1&\text{if }\omega\in A\\0 &\text{if }\omega\not\in A \end{cases}.$$
Therefore, $X1_{A}$ can be seen as another random variable taking value
$$X1_{A}\left(\omega\right)=\begin{cases}X\left(\omega\right)&\text{if }\omega\in A\\0 &\text{if }\omega\not\in A \end{cases}. \tag{1}$$
To answer your questions

why $\mathbb{E}\left[\left|X\right|\mathbb{1}_{E}\right]$ equal to $\mathbb{E}\left[\left|X\right|\mathbb{1}_{E}\mathbb{1}_{\left\{\left|X\right|>n\right\}}\right]+\mathbb{E}\left[\left|X\right|\mathbb{1}_{E}\mathbb{1}_{\left\{\left|X\right|\leq n\right\}}\right]$.


*

*It follows from the fact that $\omega\not\in A\iff\omega\in A^{c}$. Therefore, $1_{\left\{\left|X\right|\leq n\right\}}+1_{\left\{\left|X\right|>n\right\}}=1$ hence $\left|X\right|1_{E}1_{\left\{\left|X\right|\leq n\right\}}+\left|X\right|1_{E}1_{\left\{\left|X\right|> n\right\}}$.


why did they bring such an indicator?


*

*Random variables like $\left|X\right|1_{\left\{\left|X\right|\leq n\right\}}$ are useful because 1) they are bounded by $n$, 2) normally we have some restriction about the tail distribution of $X$: $\mathbb{P}\left(\left|X\right|>n\right)$ may not be too large, so the left part $\left|X\right|1_{\left\{\left|X\right|> n\right\}}$ is easy to handle.


And is $\mathbb{E}\left[\left|X\right|\mathbb{1}_{E}\right]$ means expectation of $X\left(\omega\right)$ when $\omega\in E$?


*

*No, it's not a conditional expectation of $X$ on the set $E$. It's just the normal definition of expectation of random variable $X\left(\omega\right)1_{E}\left(\omega\right)$ as defined in (1).


Why $\left|X\right|\mathbb{1}_{\left\{\left|X\right|>n\right\}}\leq\left|X\right|$?


*

*Note that indicator function is always bounded above by 1.


How they come up with those red marked inequalities? explicitly why $\mathbb{E}\left[\left|X\right|\mathbb{1}_{\left\{|X|\leq n\right\}}\right] \leq n\mathbb{E}\left[\mathbb{1}_{E}\right] \leq n\mathbb{P}\left(E\right)$?


*

*I think there's a typo, should be $\mathbb{E}\left[\left|X\right|1_{E}1_{\left\{|X|\leq n\right\}}\right] \leq n\mathbb{E}\left[1_{E}\right] \leq n\mathbb{P}\left(E\right)$. For the first step, note that $\left|X\right|1_{\left\{\left|X\right|\leq n\right\}}\leq n$ by definition, hence $\left|X\right|1_{E}1_{\left\{\left|X\right|\leq n\right\}}\leq n 1_{E}$ and $n$ is nonrandom. For the second step, by definition of expectation $\mathbb{E}\left[1_{E}\right]=1\cdot\mathbb{P}\left(\omega\in E\right)+0\cdot\mathbb{P}\left(\omega\not\in E\right)=\mathbb{P}\left(E\right)$.

A: Let $\Omega$ be the sample space over which $X$ is defined:

*

*let $A := \{|X|>n\}\subset\Omega$, $|X|1_A$ is equal to $|X|$ inside $A$, and is 0 (so $\leq |X|$) outside $A$, so $|X|1_A \leq |X|$ over the entire sample space.


*let $B := \{|X|\leq n\}\subset\Omega$, for any $\omega\in\Omega$, either

*

*$\omega\in B$, but then $|X(\omega)|\leq n$ and $1_B(\omega)=1$ so $|X(\omega)|1_B(\omega)\leq n$

*or $\omega\not\in B$ and then $|X(\omega)|1_B(\omega) = 0 \leq n$
Now I think there is an issue with the argument as presented, I think it should go this way
$$
E[|X|1_E]=E[|X|1_{\{|X|>n\}}1_E] + E[|X|1_{\{|X|\leq n\}}1_E] \leq
E[|X|1_{\{|X|>n\}}] + n E[1_E]\leq \frac \epsilon 2 + n P[E]
$$
A: When $|X|(\omega) \leq n$, $|X|\mathbb{1}_{|X| > n}(\omega) = 0$ by the definition of the indicator function. Otherwise, $|X|\mathbb{1}_{|X| > n}(\omega) = |X|(\omega)$. Either way, it can be no larger than $|X|(\omega)$, which explains the inequality.
For the second question, note that $|X| \mathbb{1}_{|X| \leq n}(\omega) \leq n$ for any $\omega$ because $\mathbb{1}_{|X| \leq n}(\omega) = 0$ whenever $|X|(\omega) > n$.
Taking expectations does not change any of the inequalities, since $X \leq Y$ implies $\mathbb{E}X \leq \mathbb{E}Y$.
