25
$\begingroup$

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)$?

3 Answers 3

27

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=\int_0^{+\infty}(1-\mathrm P(Z\leqslant 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).$$

  • 0
    Hi, would you please tell me what theorem step 2 comes from?2016-01-26
  • 1
    @Larry Theorem? Rather, the observation that $\{\max(X,Y)\leqslant z\}=\{X\leqslant z,Y\leqslant z\}$, plus independence.2016-01-26
  • 0
    I feel really dumb for asking this, but why is this true? I can't remember my professor ever mentioning the min or max functions in my previous probability course.2016-01-26
  • 1
    @Larry ?? $\max(x,y)\leqslant z\iff (x\leqslant z \land y\leqslant z)$. Not a probabilistic result...2016-01-26
  • 0
    This is totally true...You can think $Z= \max{(x,y)}$2016-08-08
13

I very much 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

  • 0
    Thanks for pointing that out. As your answer corrects the mistake, I'll simply delete mine.2014-11-28
  • 0
    E(max(x,y)) should read E(max(X,Y)).2015-08-22
9

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.

  • 5
    -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.2013-07-01
  • 5
    I don't follow. In what sense is this an average configuration?2013-07-09