Let $X_1, ..., X_n$ be iid with a distribution F.

Let $\theta$ be the median of F.

What is the value of $E(X_i \cdot I(X_j>\theta))$?

If $i\neq j$, then $E(X_i \cdot I(X_j>\theta))= 1/2 \cdot \mu$, right?

When $i=j$, I don't seem to find it...I'm looking for an expression in function of $\mu$ if possible, or something similarly friendly.

Any help would be appreciated.

Edit: This question came up as I was trying to find the $Cov\left(\sum^n_{i=1}X_i,\sum^n_{i=1}sgn(X_i-\theta)\right)$, where $sgn(u)=1$ if $u>0$, $sgn(u)=-1$ if $u<0$, and zero otherwise. If you know the answer, please feel free to share your knowledge with me. :)

  • $\begingroup$ @user603 , any thoughts on this? :) $\endgroup$ Jul 28, 2014 at 11:31

1 Answer 1


If $i\neq j$, you are right. Formally, the expected value here is taken with respect to the joint distribution of $X_i$ and $X_j$,

$$ E[X_i \cdot I(X_j>\theta)] = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{ij}(x_i,x_j)x_i\cdot I(x_j>\theta)dx_idx_j$$ where due to independence

$$=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{i}(x_i)f_{j}(x_j)x_i\cdot I(x_j>\theta)dx_idx_j$$

$$=\int_{-\infty}^{\infty}f_{j}(x_j) I(x_j>\theta)\int_{-\infty}^{\infty}f_{i}(x_i)x_idx_idx_j$$ $$=\int_{-\infty}^{\infty}f_{j}(x_j) I(x_j>\theta)E(X_i)dx_j$$

$$=E(X_i)\int_{-\infty}^{\infty}f_{j}(x_j) I(x_j>\theta)dx_j = E(X_i)\int_{\theta}^{\infty}f_{j}(x_j) dx_j$$

$$=E(X_i)\cdot[1-F_X(\theta)] = \frac 12E(X_i)$$

If $i=j$, by the Law of Total Expectation $$E[X_i \cdot I(X_i>\theta)] = E[X_i \cdot I(X_i>\theta)\mid X_i>\theta]P( X_i>\theta) + E[X_i \cdot I(X_i>\theta)\mid X_i\leq \theta]P( X_i\leq\theta)$$

$$=E(X_i \cdot 1\mid X_i>\theta)\frac 12 + E(X_i \cdot 0\mid X_i\leq \theta)\frac 12$$

$$=\frac 12E(X_i \mid X_i>\theta)=\frac 12\int_{\theta}^{\infty}\frac {x f_X(x)}{1-F_X(\theta)}dx = \int_{\theta}^{\infty}x f_X(x)dx$$

i.e. here we have "half the value of the truncated from below at $\theta$" distribution, or, the expected value of the "restricted from below at $\theta$" distribution.

One could also obtain this immediately by using the so-called "Law of the Unconscious Statistician",

$$E[X_i \cdot I(X_i>\theta)] = \int_{-\infty}^{\infty}f_X(x)[x I(x>\theta)]dx = \int_{\theta}^{\infty}x f_X(x)dx$$

  • 2
    $\begingroup$ Many thanks for your interest in this question. The last equality, by the law of the unconscious statistician I already had... I was hoping for something as a function of $\mu$. This question came up as I was trying to find the $Cov\left(\sum^n_{i=1}X_i,\sum^n_{i=1}sgn(X_i-\theta)\right)$, where $sgn(u)=1$ if $u>0$, $sgn(u)=-1$ if $u<0$, and zero otherwise. $\endgroup$ Jul 28, 2014 at 12:33
  • 1
    $\begingroup$ Once you truncate the support, you cannot avoiding dealing with the expected value of the truncated distribution. Obviously, $$E[X_i \cdot I(X_i>\theta)] = \mu-E[X_i \cdot I(X_i\leq\theta)]$$ $\endgroup$ Jul 28, 2014 at 12:41
  • 1
    $\begingroup$ I like the last part of this answer best because it most clearly reveals the basic ideas. The first part is a little too restrictive IMHO because it implicitly assumes $F$ is continuous, which is unnecessary (and was not assumed by the OP). Finally, for the case $i=j$ you can obtain the value $\int_0^\infty(1-F(x))dx$. $\endgroup$
    – whuber
    Jul 28, 2014 at 13:43
  • 1
    $\begingroup$ @whuber I was under the impression that this specific expression related to non-negative random variables, no? $\endgroup$ Jul 28, 2014 at 15:20
  • $\begingroup$ And that's exactly the case when a variable is truncated below at zero :-). $\endgroup$
    – whuber
    Jul 28, 2014 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.