# Math Help - Expected Value given dominance

1. ## Expected Value given dominance

Hi,

If I take two values (A and B) at random from the same normal distribution (mean 0, sd 1), and I know only that A>B. What is the expected value of A?
My simulations suggest it is the mean + 0.56 * sd, but if anyone can help with a closed form solution I would be very grateful.

Thanks

2. ## Re: Expected Value given dominance

Originally Posted by GeoMath
Hi,

If I take two values (A and B) at random from the same normal distribution (mean 0, sd 1), and I know only that A>B. What is the expected value of A?
My simulations suggest it is the mean + 0.56 * sd, but if anyone can help with a closed form solution I would be very grateful.

Thanks
Hi GeoMath!

The probability that "a" is greater than a randomly picked number is $P(a > B) = \text{normalcdf}(a)$, which is the cumulative change to pick a number below "a".
The probability to pick a number between a and a+da is $P(a) = \text{normalpdf}(a)da$.
The probability to pick A>B is equal to the probability to pick A<B, so $P(A>B)=\frac 1 2$.

To calculate the expectation of A, you need:

$P(a | A>B) = \frac{P(A=a \wedge A>B)}{P(A>B)} = \frac{P(a) P(a>B)}{P(A>B)} = \frac{\text{normalpdf}(a)da \cdot \text{normalcdf}(a)}{\frac 1 2}$

So the expectation of A is:

$E(A | A>B) = \int_{-\infty}^{+\infty} a \cdot P(a | A>B) da = \int a \cdot \frac{\text{normalpdf}(a)da \cdot \text{normalcdf}(a)}{\frac 1 2}$

To feed this to Wolfram|Alpha we apparently need that:

$\text{normalpdf}(x) = \frac 1 {\sqrt{2\pi}} \exp(-\frac 1 2 x^2)$

$\text{normalcdf}(x) = \frac 1 2 (1 + \text{erf}(\frac x {\sqrt 2}))$

Then Wolfram|Alpha (link included) gives the result:

$E(A | A>B) = \int_{-\infty}^{+\infty} x \cdot \frac 1 {\sqrt{2\pi}} \exp(-\frac 1 2 x^2) dx \cdot (1 + \text{erf}(\frac x {\sqrt 2}))$

$E(A | A>B) = \frac 1 {\sqrt \pi} \approx 0.56419$

I believe this matches what you found empirically.

3. ## Re: Expected Value given dominance

Fantastic, thank you very much. What does the term 'd' refer to?
Also I don't suppose this extends easily to E(A) | A>B>C. I notice (empirically ) that .56419 is 2/3 of the E(A) when there are 3 numbers. Perhaps this is just coincidence?

4. ## Re: Expected Value given dominance

Originally Posted by GeoMath
Fantastic, thank you very much. What does the term 'd' refer to?
Also I don't suppose this extends easily to E(A) | A>B>C. I notice (empirically ) that .56419 is 2/3 of the E(A) when there are 3 numbers. Perhaps this is just coincidence?
The 'd' is the differential operator, which is used in integrals.
The symbol 'da' represents a very small increase of 'a'.
You see the "d" in for instance $\int f(x)dx$.

It should extend well enough to E(A|A>B>C).
That is just a bit more work.
I do not know (yet) whether the factor 2/3 is coincidence.