Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

If I have two variables $X$ and $Y$ which randomly take on values uniformly from the range $[a,b]$ (all values equally probable), what is the expected value for $\max(X,Y)$?

share|improve this question

3 Answers 3

up vote 11 down vote accepted

Here are some useful tools:

  1. For every nonnegative random variable $Z$, $$\mathrm E(Z)=\int_0^{+\infty}\mathrm P(Z\geqslant z)\,\mathrm dz.$$
  2. As soon as $X$ and $Y$ are independent, $$\mathrm P(\max(X,Y)\leqslant z)=\mathrm P(X\leqslant z)\,\mathrm P(Y\leqslant z).$$
  3. If $U$ is uniform on $(0,1)$, then $a+(b-a)U$ is uniform on $(a,b)$.

If $(a,b)=(0,1)$, items 1. and 2. together yield $$\mathrm E(\max(X,Y))=\int_0^1(1-z^2)\,\mathrm dz=\frac23.$$ Then item 3. yields the general case, that is, $$\mathrm E(\max(X,Y))=a+\frac23(b-a)=\frac13(2b+a).$$

share|improve this answer

did's excellent answer proves the result. The picture here enter image description here

may help your intuition. This is the "average" configuration of two random points on a interval and, as you see, the maximum value is two-thirds of the way from the left endpoint.

share|improve this answer
-1 Sorry for the down vote. I know what you mean, but I hate such examples, as it confuses the situation for those who do not fully understand what an "average" configuration means. –  Calvin Lin Jul 1 '13 at 2:57
I don't follow. In what sense is this an average configuration? –  Jonah Jul 9 '13 at 18:02

I very muck liked Martin's approach but there's an error with his integration. The key is on line three. The intution here should be that when y is the maximum, then x can vary from 0 to y whereas y can be anything and vice-versa for when x is the maximum. So the order of integration should be flipped:

enter image description here

share|improve this answer
Thanks for pointing that out. As your answer corrects the mistake, I'll simply delete mine. –  Martin Van der Linden Nov 28 '14 at 16:00

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.