Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to obtain the conditional expectation

$$E[X\mid Z]$$

where $Z= \max(X,Y)$ and $X,Y$ are independent Gaussian random variables.

share|cite|improve this question

This is an interesting question, more involved than it may look at first sight. Here are the explicit formulae which answer it.

Let us first assume that $X$ and $Y$ follow the same distribution with cumulative distribution function $F$, hence $F(x)=\mathrm P(X\leqslant x)=\mathrm P(Y\leqslant x)$ for every real number $x$. Then, $\mathrm E(X\mid Z)=g(Z)$ almost surely, with $$ g(z)=z-\frac1{2F(z)}\int_{-\infty}^zF(x)\mathrm dx. $$ When the common distribution of $X$ and $Y$ is standard Gaussian, $F=\Phi$ and an integration by parts yields $$ g(z)=\frac12\left(z-\frac{\mathrm e^{-z^2/2}}{\sqrt{2\pi}\Phi(z)}\right). $$

In somewhat more generality now, assume that the distribution of $X$ has density $f_X$ and cumulative distribution function $F_X$ and the distribution of $Y$ has density $f_Y$ and cumulative distribution function $F_Y$. Then $\color{red}{\mathrm E(X\mid Z)=g(Z)}$ almost surely, with $$ g(z)=\frac{zf_X(z)F_Y(z)+f_Y(z)\,\mathrm E(X;X\leqslant z)}{f_X(z)F_Y(z)+f_Y(z)F_X(z)}. $$ The only term in $g(z)$ which is not $z$, $f_X(z)$, $f_Y(z)$, $F_X(z)$ or $F_Y(z)$ is $$ \mathrm E(X;X\leqslant z)=\int_{-\infty}^zxf_X(x)\mathrm dx=zF_X(z)-\int_{-\infty}^zF_X(x)\mathrm dx, $$ which yields the definitive expression $$ \color{red}{g(z)=z-\frac{f_Y(z)}{f_X(z)F_Y(z)+f_Y(z)F_X(z)}\int_{-\infty}^zF_X(x)\mathrm dx}. $$ This holds for any independent random variables $X$ and $Y$ with continuous distributions. Two remarks. First, when $X$ and $Y$ are identically distributed, one recognizes the expression written in the first part of this answer. Second, I call this expression definitive because I do not think there exists a much simpler expression for general Gaussian random variables.

share|cite|improve this answer
Please let me know what you know, what you tried and why this failed, and I might add some details. – Did Jan 27 '12 at 15:23
Thank you for your quick response. Could you please add some more details to your explanation? I don't fully understand it. I'm a researcher (not an student :) ). In my research, the above expected value appears as a consequence of the following relationship: $Z= \max(X,Y)$ where $X \sim N_X( \mu_X, \sigma_X^2)$ and $Y \sim N_Y(\mu_Y, \sigma_Y^2)$. I've already computed the pdf $P(Z)$: $P(Z=z)= P(X=z) \Phi_Y( Y \leq z) + P(Y=z) \Phi_X( X \leq z)$ Then, I also need to obtain $E[X|Z=z]$. Thank you for your time. – Jose Jan 27 '12 at 15:54
@DidierPiau : The question didn't say there was a common distribution. – Michael Hardy Jan 27 '12 at 16:55
Yes, the distributions of $X$ and $Y$ are different. I've been thinking in the following. If $\Phi_Y(Y\leq z)= 1$, then $P(X|Z)= 1$ and the expectation should be $E[X|Z=z]=z$. On the other hand, $P(X|Z)= P(X)$ if $\Phi_X(X \leq z)= 1$. – Jose Jan 27 '12 at 17:17
Jose: The revised version deals with the general case. – Did Jan 28 '12 at 7:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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