# Expectation of $X$ given $X < c$

Let $X$ be a random variable with PDF $f(\cdot)$ and CDF $\Phi(\cdot)$. I want to compute $E(X \mid X < c)$, where $c$ is some constant.

Using definition of the expected value

$$E(X \mid X < c) = \int_{-\infty}^{+\infty}xf(x\mid x<c)dx.$$

I know that conditional density should simplify to

$$f(x\mid x<c) = \frac{f(x)}{\Phi(c)},$$ but I can't derive it. I found that question similar, but I am still confused.

Using (Kolmogorov) definition of conditional probability I get $$P(X=x \mid X<c) = \frac{P\left(\{X = x\}\cap\{X<c\}\right)}{P(X<c)}.$$

But I don't see how $P\left(\{X = x\}\cap\{X<c\}\right)$ simplifies to $P(X=x)$.

• Do you have a specific density $f$ given to you, or is this a general question for any $f$? Commented Oct 16, 2017 at 14:32
• @Greenparker, now I work with a case where $X$ is normally distributed, but I also would like to know an answer to the general case. Commented Oct 16, 2017 at 14:40
• What definition of conditional probability are you working with?
– whuber
Commented Oct 16, 2017 at 15:05
• @whuber, I guess with Kolmogorov definition. Commented Oct 16, 2017 at 15:10
• What happens when you apply it to your situation? This definition writes every conditional probability as a quotient, so by inspecting the intended answer you should easily be able to identify the events that are involved. For instance, the presence of $\Phi(c)$ in the denominator is a strong hint that the conditioning event is $X\le c$.
– whuber
Commented Oct 16, 2017 at 15:17

A general solution: let $X$ be a random vector with density $f$ and $A=\{X\in B_0\}$, for some $n$-dimensional Borel set $B_0$, with $\Pr(A)>0$. The conditional density denoted by $f(x\mid A)$ must be such that $$\Pr\{X\in B\mid A\} = \int_B f(x\mid A)\,dx \, \qquad (*)$$ for every $n$-dimensional Borel set $B$. From this it's clear that $$f(x\mid A) = \frac{f(x)}{\Pr(A)}\,I_{B_0}(x) \,$$ almost everywhere, in which $I_{B_0}$ is the indicator function of $B_0$: $I_{B_0}(x)=1$ if $x\in B_0$, and $I_{B_0}(x)=0$ if $x\notin B_0$.

Here is why: the left hand side of $(*)$ is just $$\Pr\{X\in B\mid X\in B_0\} = \frac{\Pr\{X\in B\cap B_0\}}{\Pr\{X\in B_0\}},$$ and integrating the right hand side of $(*)$ we have $$\int_B \frac{f(x)}{\Pr(A)}\,I_{B_0}(x)\, dx = \frac{1}{\Pr(A)} \int_{B\cap B_0} f(x)\,dx = \frac{\Pr\{X\in B\cap B_0\}}{\Pr\{X\in B_0\}}.$$

In your specific case $$f(x\mid X \leq c) = \frac{f(x)}{\Phi(c)}\,I_{(-\infty,c]}(x).$$

• Sorry, but it is not really clear for me how you get an expression for $f(x\mid A)$. Also, what $I_{B_0}(x)$ stands for? Commented Oct 16, 2017 at 14:52
• Details added. To do Probability properly it's important that you get comfortable with the use of indicators. An excellent book is Basic Probability Theory by Robert Ash.
– Zen
Commented Oct 16, 2017 at 15:53
• @DeltaIV: In this case you can, of course. But if you think about it, this reverse order has the merit of giving a little flavor of the general descriptive definition of conditional probability/expectation given a $\sigma$-field. In the general case there is no universal constructive recipe/procedure, but to verify that the integral equation holds for your candidate (which you may have to guess). With that said, your one-liner is probably much more adequate as an explanation to a beginner than my answer. Maybe this is why the OP didn't accept the answer... Thank you very much for your comment!
– Zen
Commented Oct 17, 2017 at 10:31
• Ash is kind of unique. He was a brilliant expositor. His "trio" Basic Prob + Measure Theoretic Prob + Stochastic Processes is amazing. For more recent books, I like Grimmett and Stirzaker. David Williams "Weighing the Odds" is also amazing, because Williams is such a brilliant guy.
– Zen
Commented Oct 17, 2017 at 11:44
– Zen
Commented Oct 17, 2017 at 16:46

Here is another approach for a continuous random variable, less rigorous than Zen's beautiful solution.

Fix $$x:x< c$$, then $$P(X\leq x|X

Fix $$x:x>c$$, then $$P(X\leq x|Xc}{=} \frac{P(X

Then, the conditional pmf is $$f_{X|X

Therefore, the conditional expectation is

$$E(X|X