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.

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

Suppose X is uniform in the interval [0, Y] and Y can either be 1 or 2 with equal probability.

How would I calculate P(X>1)?

This is what I'm trying to do:

$$f_x(x) = \int_a^b \! f_{X,Y}(x,y) \, \mathrm{d} y $$


$$f_{X,Y}(x,y) = \sum\limits_{y=1}^{2}f_{X\mid Y=y}(x\mid y) * p_Y(y) = 3/4$$

Did I calculate the joint density correctly, because it feels a bit awkward adding pdf's like that.

Another trouble I'm having is figuring how to decide the limits of integration. I know a should be 1 but what should b be? Should it be 2 because that is technically the highest value X could take but can you only say that for the distribution $X\mid Y$ or can you say that for X also?

share|cite|improve this question

We have $X\gt 1$ precisely if $Y=2$ and a uniform on $[0,2]$ is greater than $1$. So the required probability is $(1/2)(1/2)$.

It is not difficult to find the cumulative distribution function of $X$. Nothing interesting happens outside $[0,2]$. For $0\le x\le 1$, we have $$F_X(x)=\Pr(X\le x)=\frac{1}{2}(x)+\frac{1}{2}(x/2).$$ For $1\lt x\le 2$, $$F_X(x)=\frac{1}{2}+\frac{1}{2}(x/2).$$

share|cite|improve this answer

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.