What is the derivation for "Partial Expectation"?

It is written that

$$E[X|X>k]Pr(X>k)=\int_{k}^{\infty}xf_{X}(x)dx$$

I know it is probably simple, but I am still wondering the derivation. Since I know that

$$E[X|Y=y]=\int_{\mathbb{R}}xf_{X|Y}(x|y)dx$$

But I don't know why the first integral is always true.

One way is to think about the conditional density. The density of $$X|X>k$$ is zero when $$X\leq k$$, so it's proportional to $$f_X(x)I(X>k)$$. The constant of proportionality is given by the fact that a density has to integrate to 1, so the conditional density is $$g_X(x)=\frac{f_X(x)I(X>k)}{P(X>k)}$$ So, $$E[X|X>k]=\int_{-\infty}^\infty x\frac{f_X(x)I(X>k)}{P(X>k)}\,dx=\int_k^\infty x\frac{f_X(x)}{P(X>k)}\,dx$$ where the last step is based on noticing that the integral up to $$k$$ has to be zero. This then rearranges to give what you want.

• Thank you, that makes sense. Just to be sure, When you write$g_{X}(x)=\frac{f_{X}(x)I(X \gt k)}{P(X>k)}$ is this using the same logic/formula as $f_{X|Y}=\frac{f_{X,Y}(x,y)}{f_{Y}(y)}$, with Y being the condition $X>k$ and hence $f_{Y}$ being represented by $Pr(X>K)$ and the joint density just multiplying by the indicator? Aug 1, 2022 at 15:41

The first equation can be derived using two fundamental formulas:

• The formula for the expectation of a random variable $$X$$ given event $$A$$: $$E(X\mid A)=\frac{E(XI(A))}{P(A)}\tag1$$

• The formula for the expectation of a function $$h$$ of a random variable $$X$$ (often described as the law of the unconscious statistician): If $$X$$ has density $$f_X$$, then $$E [h(X)] = \int h(x) f_X(x)\, dx.\tag2$$

In your situation, apply formula (1) with $$A:=\{X>k\}$$, obtaining $$E(X\mid X>k)=\frac{E [XI(X>k)]}{P(X>k)}.$$ Now apply (2), noting that $$XI(X>k)$$ can be written $$h(X)$$, where $$h$$ has the form $$h(x):=\begin{cases} x&\text{if x>k}\\ 0&\text{if x\le k} \end{cases}.$$ This gives $$E [XI(X>k)]=\int_k^\infty xf_X(x)\,dx.$$