Problem Setup
Suppose we have two random variables $X\sim D_X$ and $Y\sim D_Y$ where $X$ is continuous with domain [0,1] and $Y$ is discrete with domain $\{0, 1\}$. Further suppose these variables have some type of dependency, i.e. $\mathbb{P}(Y=y|X=x) \neq P(Y=y)$.
Regarding the joint of $X$ and $Y$, there are two expressions I am particularly interested in, namely
- $\frac{d}{d \alpha}\mathbb{P}(Y=y|\alpha \leq X)$
- $\frac{d}{d \alpha}\mathbb{P}(Y=y, \alpha \leq X)$
Question
How can we write the above expressions in terms of $\mathbb{P}(Y=y|X=\alpha)$ and $f_{X, Y}(Y=y, X=\alpha)$ respectively.
Background/Motivation
In the probability theory course I took, we covered joint and conditional distributions of two random variables when both variables are continuous or both variables are discrete. However we did not cover cases in which one variable is continuous and one is discrete. If $X$ and $Y$ are either both continuous or both are discrete then neither (1) nor (2) are well defined. Ideally I am trying to get some unified understanding of how joint and conditional distributions of two variables behave for any combination of discrete/continuous variable type. In the particular case of one discrete and one continuous, I am interested in somehow relating the expressions the $\mathbb{P}(Y=y|\alpha \leq X)$ and $\mathbb{P}(Y=y, \alpha \leq X)$ to the expressions $\mathbb{P}(Y=y|X=\alpha)$ and $f_{X, Y}(Y=y, X=\alpha)$, in the same that the pdf of a single continuous variable $f_X(X=\alpha)$ and $\mathbb{P}(\alpha \leq X)$ are related.
By definition of the joint density function, and the fundamentals of calculus: $$\begin{align}\dfrac{\mathrm d~~}{\mathrm d\alpha}\mathsf P(Y=y,\alpha\leqslant X) &=\dfrac{\mathrm d ~~}{\mathrm d\alpha}\int_\alpha^1 f_{X,Y}(s,y)\,\mathrm d s\\[2ex] &= - f_{X,Y}(\alpha, y)\end{align}$$
And similarly $\tfrac{\mathrm d ~~}{\mathrm d\alpha}\mathsf P(\alpha\leqslant X)=-f_X(\alpha)$
Then, using the definition for conditioning, and the ratio rule for differentiation :
$$\small\begin{align}\dfrac{\mathrm d~~}{\mathrm d\alpha}\mathsf P(Y=y\mid\alpha\leqslant X)&=\dfrac{\mathrm d~~}{\mathrm d\alpha}\dfrac{\mathsf P(Y=y, \alpha\leqslant X)}{\mathsf P(\alpha\leqslant X)}\\&=\dfrac{\mathsf P(\alpha\leqslant X)\left(\tfrac{\mathrm d ~~}{\mathrm d\alpha}\mathsf P(Y=y,\alpha\leqslant X)\right)-\mathsf P(Y=y,\alpha\leqslant X)\left(\tfrac{\mathrm d ~~}{\mathrm d\alpha}\mathsf P(\alpha\leqslant X)\right)}{\mathsf P(\alpha\leqslant X)^2}\\[1ex]&=\dfrac{f_X(\alpha)\,\mathsf P(Y=y,\alpha\leqslant X)- \mathsf P(\alpha\leqslant X)\,f_{X,Y}(\alpha, y)}{\mathsf P(\alpha\leqslant X)^2}\\[1ex]&=\dfrac{f_X(\alpha)\,\mathsf P(Y=y\mid \alpha\leqslant X)- f_{X,Y}(\alpha, y)}{\mathsf P(\alpha\leqslant X)}\end{align}$$