A basic doubt on joint distribution How to calculate the following probability $P(X \leq x, Y=y)$ where $X$ is a continuous random variable and $Y$ is a discrete random variable. I have been given the distribution of $X$ and distribution of $P(Y=y|X=x)$.
 A: Mixing discrete and continuous distributions makes for interesting problems since one cannot rely anymore on fully-cooked formulas without understanding them. Here the first notion to understand is the conditional distribution of $Y$ conditionally on $X$. Assume that $X$ has density $f_X$. When we declare that
$$
P[Y=y\mid X=x]=p_Y(y\mid x),
$$
what we are actually imposing is that, for every $y$ and every measurable $B$,
$$
P[Y=y,X\in B]=\int_Bp_Y(y\mid x)f_X(x)\mathrm dx.
$$
This is the strict analogue of the fact that, when $(X,Z)$ has density $f_{X,Z}$, then, with obvious notations,
$$
f_{X,Z}(x,z)=f_{Z\mid X}(z\mid x)f_X(x),
$$
and of the integrated version, stating that, for every measurable $B$ and $C$,
$$
P[X\in B,Z\in C]=\int_C\int_Bf_{Z\mid X}(z\mid x)f_X(x)\mathrm dx\mathrm dz.
$$
Note that, since $X$ has a density, $P[Y=y,X=x]=0$ for every $y$ and $x$ hence the integrated version above is necessary. As a consequence,
$$
P[Y=y,X\leqslant x]=\int_{-\infty}^xp_Y(y\mid u)f_X(u)\mathrm du.
$$
A: Well P(X=t,Y=y)=P(Y=y)P(X=t|Y=y). Of course since X is a continuous random variable the probability that X=t is zero but we can sum up all of these values by taking in integral of the right hand side as t goes from negative infinity to x to get the probability that X≤x,Y=y
