# Conditional density question

So two variables $$X$$ and $$Y$$ are uniformly distributed on $$[0,1]$$. I want to find the conditional densities of $$X$$ and $$Y$$ given $$X > Y$$.

I am approaching this question using the formula $$h(x|x>y) = \frac{f(x,y)}{\textrm{marginal pdf of }y}$$ What would the $$\textrm{pdf} (f(x,y))$$ be in this scenario?

• The answers will generally assume $X$ and $Y$ are independent. No reason to think they aren't, but you should probably state this. – Brian Tung Aug 12 '19 at 7:00

$$P(X\leq t|X>Y)=\frac {P(YY)}$$. By symmetry $$P(X>Y)=P(X so $$P(X\leq t|X>Y)=2 P(Y for $$0< t <1$$. The density if $$X$$ given $$X>Y$$ is therefore $$2t$$ for $$0< t <1$$.
Since $$(X,Y)$$ is uniformly distributed on the unit square, the conditional distribution given $$X>Y$$ is uniformly distributed on the triangle $$\{(x,y)\colon 1>x>y>0\}.$$
Since the triangle has area $$\tfrac12$$, we have to multiply by $$2$$ to get a probability distribution. Thus, the probability density function of the conditional distribution of the pair $$(X,Y)$$ is given by the function equal to $$2$$ on this triangle, and $$0$$ everywhere else, or in other words: $$\textrm{pdf}(x,y)=2\cdot 1_{x>y},\qquad (x,y)\in [0,1]^2.$$ To find the $$x$$ and $$y$$ marginals from this pdf, simply integrate out the other variable: $$\textrm{pdf}(x)=\int_0^1 2\cdot 1_{x>y}\ dy=2\int_0^x\ dy=2x,$$ and $$\textrm{pdf}(y)=\int_0^1 2\cdot 1_{x>y}\ dx=2\int_y^1\ dy=2(1-y).$$
• Yes, I write pdf$(x,y)$ for the joint conditional density and pdf$(x)$ for the $x$ marginal (and similarly for $y$) – pre-kidney Aug 12 '19 at 10:27