I have a random variable $X$ and a constant $c\geq 0$. I define the r.v. $Y = \min(X, c)$ and I want to calculate $E[Y]$.
I have seen different posts on similar topics, so I am trying to pull all together from the point of view of someone that has only basic math and probability notions.
I know that
$ Y= \min(X, c)= \begin{cases} X & X \leq c \\ c & X > c \end{cases} $
By the Law of Total Expectation I can write
\begin{equation} \begin{split} E[Y] & = & E[Y|X\leq c]\cdot P(X\leq c)+ E[Y|X > c]\cdot P(X > c) \\ & = & E[X|X\leq c]\cdot P(X\leq c)+ E[c|X > c]\cdot P(X > c) \\ & = & \int_{-\infty}^{c}\frac{x\cdot f(x) dx}{P(X\leq c)}\cdot P(X\leq c)+c\cdot[{1-F(c)}] \\ & = & E_{-\infty}^{c}[X]+c\cdot[{1-F(c)}] \end{split} \end{equation}
where $E_{-\infty}^{c}[X]$ is the patial moment of $X$.
I am not sure about the correctness of the formula above, so my questions are:
- Is my reasoning correct?
- If correct, how do I calculate $E_{-\infty}^{c}[X]$?
- If $X$ is truncated on the left (that is, $X\geq d$ and $d < c$) should I change the limit of integration from $-\infty$ to $d$ or it is enough to know that $f(X) = 0$ for $X<d$?
Thanks