# Conditional Expectation of a random variable

If I have a random variable $X$ and I need to compute where $a$ is a certain fixed number $$E[X|X>a]$$ Is ok to compute it as $$E[X\mathbb{1}_{\{X>a\}}]$$

but after that I dont have clear the next step, I mean. if $E[X]=\int_{\mathbb{R}}xf(x)$ Then the integral for the conditional expression is $$\int_{a}^{\infty} xf(x)dx$$?

One correction: The conditional expectation you are seeking is properly computed as $$E[X\mid X>a]=\frac{E[X\mathbb{1}_{\{X>a\}}]}{P(X>a)}.$$ As for the numerator, your calculation is correct, since $$E[X\mathbb{1}_{\{X>a\}}] =E[X\mathbb{1}_{(a,\infty)}(X)]\stackrel{(1)}= \int x\mathbb{1}_{(a,\infty)}(x)f(x)\,dx=\int_a^\infty xf(x)\,dx$$ where step (1) uses the rule $E[h(X)]=\int h(x)f(x)\,dx$.
• For the first part, which property did you use? $E[X|X>a]=\frac{X1_{\{X>a\}}}{P(X>a)}$?? – Boris May 11 '18 at 17:08
• @Boris That's the definition of conditional expectation given an event. (I'm assuming you are not familiar with measure theoretic conditional expectation.) If we define $E[Y\mid A]$ as $E[Y{\mathbb 1}_ A]/P(A)$, then this is consistent with conditional probability given an event, since when $Y={\mathbb 1}_B$ is the indicator of event $B$, then $E[Y{\mathbb 1}_ A]=E[{\mathbb 1}_B{\mathbb 1}_ A]=E[{\mathbb 1}_{B\cap A}]=P(B\cap A)$ and so this definition of $E[Y\mid A]$ agrees with $P(B\mid A)$. – grand_chat May 11 '18 at 18:02