Sign up ×
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.

Assume $X\in\mathbb{R}$, $Y\in\{0,1\}$ are two random variables. What allows us to claim that $$f_{X}(x) = f_{XY}(x,1) + f_{XY}(x,0)$$ where $f_X(x)$ and $f_{XY}(x,y)$ are densities.

share|cite|improve this question
The definition, perhaps? – Did Mar 3 '13 at 16:11
What is $f_{XY}$ and how does it differ from plain vanilla $f$ which you say is a density? – Dilip Sarwate Mar 3 '13 at 16:11
My initially posted answer missed something, but I've edited to take that into account, and the answer is still just as simple. – Michael Hardy Mar 3 '13 at 18:38
@ Michael Hardy. Thank you. I upwoted your answer originally, but someone downvoted it after that. – arkadiy Mar 3 '13 at 18:50

2 Answers 2

up vote 1 down vote accepted

\begin{align} \int_A f_{X,Y}(x,1)+f_{X,Y}(x,0)\,dx & = \int_A f_{X,Y}(x,1)\,dx+\int_A f_{X,Y}(x,0)\,dx \\[8pt] & = \Pr(X\in A\ \&\ Y=1) + \Pr(X\in A\ \&\ Y=0) \\[8pt] & = \Pr((X\in A\ \&\ Y=1)\text{ or }(X\in A\ \&\ Y=0)) \\[8pt] & = \Pr(X\in A) \\[8pt] & = \int_A f_X(x) \, dx. \end{align}

share|cite|improve this answer
Hi Hardy... He says $X\in \mathbb{R}$, so I thought he was referring to a mixture of discrete and cont. distributions. In that case, $P(X=x,Y=1)$ would become zero. – Bravo Mar 3 '13 at 17:01
Oh, I see. I'll edit my answer accordingly. – Michael Hardy Mar 3 '13 at 18:35
Done. ${{{{{}}}}}$ – Michael Hardy Mar 3 '13 at 18:37

$$P(X\le x)=P(X\le x\mid Y=1)P(Y=1)+P(X\le x\mid Y=0)P(Y=0)\\ =P(X\le x, Y=1)+P(X\le x,Y=0)\\ f_X(x)=\frac{dP(X\le x)}{dx}=f_{XY}(x,1)+f_{XY}(x,0)$$

share|cite|improve this answer
My initial comment here was mistaken; I had missed something. Now I've adjusted my own answer accordingly. You've done the derivative version; I've done the integral version. BTW, I notice I'm the only person who's up-voted the question itself; you might consider doing that. – Michael Hardy Mar 3 '13 at 18:40

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.