Suppose we pick a real number $x \in [0,5]$ and an arbitrary real number $y \in [0,2]$. What is the probability that $x$ is greater than $y$?

How do I tackle this problem? We know that $x$ is greater than $y$ if $x>2$. Hence I would have to compute $P(X>2)$. But that does not help very much.

EDIT: I should have mentioned the following possibilities were given. However, I was curious to the answers without giving these possibilities.

The following possibilities were given: (A) 40% (B) 60% (C) 70% (D) 75% (E) 80%

A hint would be appreciated.

Thanks in advance!

  • $\begingroup$ First you have to specify the distributions in question. $\endgroup$ – lulu May 10 '16 at 18:52
  • $\begingroup$ The distribution is not given. There should be enough information (it was asked in a mathematical olympiad). $\endgroup$ – user39039 May 10 '16 at 18:52
  • $\begingroup$ How are we picking the numbers? Uniformly at random? Have you tried drawing yourself a picture? What is the ratio of the area of the geometric shape formed by all of these conditions compared to the area of the sample space? How might you word this with integrals instead? $\endgroup$ – JMoravitz May 10 '16 at 18:53
  • $\begingroup$ @Joanpemo $x>y\not\Leftrightarrow x>2$. You have $x>2\implies x>y$ but not vice versa. For example $1>0.5$ but $1\not\gt 2$ $\endgroup$ – JMoravitz May 10 '16 at 18:55
  • 1
    $\begingroup$ The expected answer is $80\%$. But the question is excessively imprecise. $\endgroup$ – André Nicolas May 10 '16 at 19:02

Like everyone else assuming uniformity and independence.

Making a picture can help to see what is going on while keeping it light and informal.


The entire rectangle represents all possible points $(x,y)$. The darker area (which is above the line $y=x$ ) are the points where $y>x$ and the lighter area (which is below the line $y=x$) are the points where $x>y$.

I hope this helps to get a simple picture of the problem.

  • $\begingroup$ Very clean, thanks! $\endgroup$ – user39039 May 10 '16 at 20:23

In the absence of more information, one naturally assumes uniform distributions: $$X\sim \operatorname{Unif}[0,5]$$ $$Y\sim\operatorname{Unif}[0,2]$$ which means $$f_X(x) = \begin{cases}\tfrac15,&0\leq x\leq 5\\0,&\textrm{otherwise}\end{cases}$$ $$f_Y(y) = \begin{cases}\tfrac12,&0\leq y\leq 2\\0,&\textrm{otherwise}\end{cases}$$

To find $\Pr(X>Y)$, condition on $Y$ and integrate over all possible values of $Y$:

$$\Pr(X>Y)=\int_{y=0}^{2}\Pr(X>Y|Y=y)f_Y(y)\; dy$$ $$=\int_{y=0}^{2}\Pr(X>y)(\tfrac12)\; dy$$ $$=\int_{y=0}^{2}(\tfrac{5-y}{5})(\tfrac12)\; dy$$ $$=\tfrac1{10}\left.\left(5y-\tfrac{y^2}{2}\right)\right|_{y=0}^{y=2}$$ $$=0.8$$

So the correct answer is 80%.

  • $\begingroup$ Very clean, thanks! $\endgroup$ – user39039 May 10 '16 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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