# Joint pdf of discrete and continuous random variables

Consider two independent random variables $X$ and $Y$, where $X$ is uniformly distributed on the interval $[0,1]$ and $Y$ is uniformly distributed on the set $\{0,1\}$. Thus, the cdfs are given by $F_X(x) = \begin{cases} 0 & x <0\\ x & 0 \leq x <1\\ 1 & else \end{cases}$

and

$F_Y(y) = \begin{cases} 0 & y <0\\ 1/2 & 0 \leq y <1\\ 1 & else. \end{cases}$

Consider the random variable $Z = (X,Y)$ with cdf is given by

$F_Z(x,y) = \begin{cases} 0 & y<0\\ F_X(x)/2& 0 \leq y < 1\\ F_X(x) & else. \end{cases}$

Now, what I'm interested in is a pdf of $Z$. Is

$f_Z(x,y) = \begin{cases} 0 & y<0\\ f_X(x)/2& 0 \leq y < 1\\ f_X(x) & else. \end{cases}$

the pdf of $Z$? More generally, I'm interested in the joint pdf of independent random variables, one of which is continuous and the others (possibly more than one) are discrete. If correct, can the above be applied in this case?

• @Dominik Would you care to elaborate a bit? In particular, what is wrong with the expression $f_Z (x,y)$ in the question? I mean, are you saying that we can not make any probabilistic statements about the events of the sort I flip a coin and draw a number from [0,1] - what is the density of observing heads and 0.5? – igor Sep 23 '15 at 19:50
• The expression is simply wrong. They can't have a joint density, since the set $N = \mathbb{R} \times \{0, 1\}$ is a Lebesgue-Nullset, but $P(Z \in N) = 1$. – Dominik Sep 23 '15 at 19:55
• @Dominik Okay. But can we say something about $P(Z \in [0,1/2] \times {0})$? I would say it should be 1/4 no? – igor Sep 23 '15 at 20:06
• Yes, that's because the random variables $X$ and $Y$ are independent. This implies $P(Z \in [1, 1/2] \times \{0\}) = P(X \in [0, 1/2], Y \in \{0\}) = P(X \in [0, 1/2])P(Y \in \{0\}) = 1/4$. – Dominik Sep 23 '15 at 20:08