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

The question is: Let $X$ and $Y$ which are independent Exp(1)-distributed random variables. Find the conditional distribution of $X$ given that $X+Y=c$ ($c$ is a positive constant).

1) I don't see how these can be independent if they are constrained by $c$.

2) Assuming the question is right (it must be, but I dont immediately see why they $are$ independent), then what's the best approach?

$F_{Y|X=x}(y)= \int_{-∞}^{y} f_{Y|X=x} (z) dz$ or

$F_{Y|X=x}(y)= \frac{\int_{-∞}^{y} f_{X,Y} (z) dz}{\int_{-∞}^{∞} f_{X,Y} (z) dz}$

Also any advice on when to use which "form" would be much appreciated. So my question is not just about this particular problem, but also a quesiton on theory and general technique.

share|cite|improve this question
up vote 3 down vote accepted

The question is correctly stated but you are confusing yourself about what is required. $X$ and $Y$ are independent random variables, the meaning of which (not the math) is that knowing the value of one of them tells you nothing that you don't already know about the other. The math says that $$\begin{align} f_{X,Y}(x,y) &= f_X(x)f_Y(y) &\text{by independence}\\ &= \exp(-x)\exp(-y), &\qquad 0 \leq x < \infty, ~ 0 \leq y < \infty,\\ &= \exp(-x-y), &\qquad 0 \leq x < \infty, ~ 0 \leq y < \infty, \end{align}$$

Now, the random point $(X,Y)$ can be anywhere in the first quadrant of the $x$-$y$ plane. If you are told that $Y$ took on the value $\alpha$, then you know that the random point lies somewhere on the horizontal line at height $\alpha$ above the $x$ axis, but you get no information about $X$. In particular, the conditional density $f_{X\mid Y = \alpha}(x\mid Y = \alpha)$ of $X$ given $Y=\alpha$ is the same as the unconditional density $f_X(x)$. If you want an explicit working out of this answer that crosses all i's and dots all t's, just use the standard formula $$f_{X\mid Y = \alpha}(x\mid Y = \alpha) =\frac{f_{X,Y}(x,\alpha)}{f_Y(\alpha)} = \frac{\exp(-x-\alpha)}{\exp(-\alpha)} = \exp(-x), ~~~0 < x \leq \infty.$$

The way to think about the conditional density formula used above (and not just for the independent case here) is that the shape of the conditional density of $X$ given $Y = \alpha$ is just the curve $f_{X,Y}(x,\alpha)$. This is not the actual conditional density because the area under the curve is not necessarily $1$ as it must be for all density functions. But, given any curve $g(x)$ such that $g(x) \geq 0$ for all $x$ and the area under the curve is finite, the function $$\frac{g(x)}{\int_{-\infty}^\infty g(x)\,\mathrm dx}$$ is a valid density function. Note that the denominator above is just the (finite) area under the curve $g(x)$. For our application to conditional density calculations, we need to divide $f_{X,Y}(x,\alpha)$ by the area under $f_{X,Y}(x,\alpha)$, but this area is $$\int_{-\infty}^\infty f_{X,Y}(x,\alpha)\,\mathrm dx$$ which I hope you will recognize as just the calculation that needs to be done to find the value of the marginal density $f_Y(y)$ at $y = \alpha$, that is, the above integral gives us $f_Y(\alpha)$, and the ratio $f_{X,Y}(x,\alpha)/f_Y(\alpha)$ is thus the conditional density function $f_{X\mid Y = \alpha}(x\mid Y = \alpha)$

Turning to the question asked here, it is slightly trickier in that the information given is that the random point $(X,Y)$ lies on the straight line $x+y=c$, but the answer is a lot simpler. Now, since the point must be in the first quadrant, you know it lies on the line segment with end points $(0,c)$ and $(c,0)$. Now you do get some information about $X$; you know immediately that $X$ can take on values only in the interval $[0,c]$. The conditional density of $X$ given $X+Y=c$ is just the function $f_{X,Y}(x,y)$ along the curve $x+y=c$. But since $f_{X,Y}(x,y) = \exp(-x-y) = \exp(-c)$ along this curve, the conditional density of $X$ given $X+Y=c$ has constant value for $0 \leq x \leq c$, that is,

The conditional density of $X$ given $X+Y=c$ is a uniform density on $[0,c]$.

In fact, a little thought will show that the conditional density of $Y$ given $X+Y=c$ is also a uniform density on $[0,c]$. But of course, $X$ and $Y$ are not conditionally independent given $X+Y=c$ since each is constrained to be $c$ minus the other.

share|cite|improve this answer
+1. And all this shows, or nearly so, that X/(X+Y) is uniform on (0,1) and independent of X+Y. – Did Sep 30 '12 at 5:46
The answer is right, I'm sure.... but I feel its too wordy for me to understand. Can you give a simpler answer? – Squirtle Oct 1 '12 at 0:04

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.