Consider a random variable $X$ following the so-called folded normal distribution. That is, $X$ has density function
$$ f_X(x) = \sqrt{\frac{2}{\pi\tau}}e^{-\frac{x^2}{2\tau}}, x>0. $$
Question: Find $\mathbb E(X|X<M)$, where $M>0$ is a constant.
I do not know how to start this. Like what exactly does this thing mean. Could anyone help me, please? Thank you!
Since the support of the folded normal is $[0;\infty)$ the conditional expectation is:
$$\begin{align} \mathsf E(X\mid X<m) & = \int_0^\infty x f_X(x\mid X<m)\operatorname d x \\[1ex] & = \int_0^\infty x \frac{f_X(x)\mathbf 1_{[0;m]}(x)}{F_X(m)}\operatorname d x \\[1ex] & = \int_{0}^m x f_X(x)\operatorname d x \;\Big/\; \int_{0}^m f_X(x)\operatorname d x \\[1ex] & { = \int_{0}^m x f_X(x)\operatorname d x \;\Big/\; \int_{0}^m \sqrt{{2}/{\pi\tau}\;}\;e^{-{x^2/2\tau}}\operatorname d x } \\[1ex] & { = \int_{0}^m x f_X(x)\operatorname d x \;\Big/ \operatorname{erf}(m/\sqrt{2\tau}) } \\[1ex] & \vdots \end{align}$$
Where $\operatorname {erf}(\bullet)$ is the Error function