TITLE: Conditional Expectation of Continuous Random Variable
QUESTION [3 upvotes]: Let $Y$ be a random variable of density g. How could I compute the expectation
$E[Y|Y<a]$ ? Thank you in advance!

REPLY [0 votes]: I know that it's been over 2 years, but I suggest this answer
$$
E(Y|Y<a) = \frac{E(Y \times (Y < a))}{P(Y<a)}
= \frac{ \int_{-\infty}^{+\infty} (t \times c(t)) f_{Y}(t) dt  }{ \int_{-\infty}^{a}{ f_{Y}(y) dy } }
$$
where
$$
c(t) = \left\{\begin{array}{cc}
1, & t < a \\
0, & {\rm otherwise}
\end{array}\right.
$$
Hence, we have
$$
E(Y|Y<a) = \frac{ \int_{-\infty}^{a} t f_{Y}(t) dt  }{ \int_{-\infty}^{a}{ f_{Y}(y) dy } }.
$$
{"set_name": "stack_exchange", "score": 3, "question_id": 3193428}