# Conditional Density Function Derivation

Let $(\Omega, \mathcal{F},P)$ be a probability space and $X\colon\Omega \to \mathbb{R},Y \colon \Omega \to \mathbb{R}$ be continuous random variables (i.e. random variables which have a density function. I am assuming that this implies $P(X=x)=P(Y=y)=0~\forall x,y \in \mathbb{R}$).

According to Papoulis, the conditional distribution function $F_{X|Y} = P(X \leq x | Y = y)$ is defined by considering the probability $P(X \leq x | y \leq Y \leq y + \delta y)$ and taking the limit $\delta y\to 0$. However, I do not find the derivation given there rigorous.

It is easy to write:

$$P(X \leq x | y \leq Y \leq y + \delta y) = \frac{P( X \leq x, y \leq Y \leq y + \delta y)}{P(y \leq Y \leq y + \delta y)} = \frac{F_{X,Y}(x,y+\delta y) - F_{X,Y}(x,y)}{F_Y(y+\delta y) - F_Y(y)}$$ from definition of $F_{X,Y}$, $F_Y$ and the fact that the point probabilities are zero.

I am not sure how to evaulate the limit:

$$\lim_{\delta y \to 0} \frac{F_{X,Y}(x,y+\delta y) - F_{X,Y}(x,y)}{F_Y(y+\delta y) - F_Y(y)}.$$

I have tried using the L'Hopital rule as this limit is of the form $\frac{0}{0}$ but I am not sure if that is the right direction.

Any help is much appreciated.

EDIT: Papoulis obtains a formula for the density function by differentiating the term inside the limit. i.e., $$f_{X|Y}(x,y) = \lim_{\delta y \to 0} \left(\frac{\partial F_{X,Y}(x,y+\delta y) - F_{X,Y}(x,y)}{\partial x}\frac{1}{F_Y(y+\delta y) - F_Y(y)}\right)$$

I believe I should have asked for the derivation of the density function as I am afraid that the Conditional Distribution functions does not have a neat expression.

Thanks, Phanindra

-
At the level of the derivation, try dividing the numerator and denominator of your final expression by $\delta y$. The denominator converges to $f_Y(y)$ while the numerator converges to $\frac{\partial}{\partial y}F_{X,Y}(x,y)$ – Dilip Sarwate Oct 17 '11 at 10:06

$P\left ( \{X \leq a\} \cap \{b \leq Y \leq b + \delta b\}\right )$ is the total probability mass in the (infinitely long) horizontal strip with NE corner $(a, b+\delta b)$ and SE corner $(a, b)$, or if we think of the joint density $f_{X, Y}(x,y)$ as defining a surface above the $x$-$y$ plane, then this probability can be thought of as the volume of a slice of width $\delta b$. For small values of $\delta b$ (when the slice is very thin), this volume is approximately the face area of the slice (the integral of the joint density $f_{X, Y}(x,b)$ from $x = -\infty$ to $x = a$) times the slice thickness $\delta b$. That is, $$P\left (\{X \leq a\} \cap \{ b \leq Y \leq \delta b\} \right ) \approx \delta b \int_{-\infty}^a f_{X, Y}(x,b) \mathrm dx.$$ Since $P(b \leq Y \leq \delta b) \approx f_Y(b)\delta b$ for small values of $\delta b$, we get that \begin{align*} P(X \leq a \mid b \leq Y \leq \delta b) &= \frac{P\left (\{X \leq a\} \cap \{ b \leq Y \leq \delta b\} \right )}{P(\{b \leq Y \leq \delta b\})}\\ &\approx \frac{\displaystyle \delta b \int_{-\infty}^a f_{X, Y}(x,b) \mathrm dx}{f_Y(b)\delta b}\\ &\approx \int_{-\infty}^a \frac{f_{X, Y}(x,b)}{f_Y(b)} \mathrm dx \end{align*} The above should be thought of as a heuristic justification of the definition of conditional distribution function and density of $X$ conditioned on $Y = b$ as \begin{align*} F_{X \mid Y}(a \mid Y = b) &= \int_{-\infty}^a \frac{f_{X, Y}(x,b)}{f_Y(b)} \mathrm dx\\ f_{X \mid Y}(a \mid Y = b) &= \frac{\partial}{\partial a}F_{X \mid Y}(a \mid Y = b) = \frac{f_{X, Y}(a,b)}{f_Y(b)} \end{align*}
Dilip: Thanks for your answer. I have also figured out that using the L' Hospital's rule on the last expression in my question, we directly get the expression for the conditional density without apprxoimations (as was done in Papoulis), if indeed the terms are of the form $\frac{0}{0}$ – jpv Oct 18 '11 at 1:43
$$F_{X|Y}(x,y) = \lim_{\delta y \to 0} \left(\frac {F_{X,Y}(x,y+\delta y) - F_{X,Y}(x,y)}{F_Y(y+\delta y) - F_Y(y)}\right)$$ As this is of the form $\frac{0}{0}$, using the L'Hopital's rule, we get $$\lim_{\delta y \to 0} \left(\frac {\partial {F_{X,Y}(x,y+\delta y) - F_{X,Y}(x,y)}}{\partial \delta y} \frac{1}{\frac{\partial F_Y(y+\delta y) - F_Y(y)}{\partial \delta y}} \right)$$ which equals $$\frac{\partial {F_{X,Y}(x,y)}}{\partial y} \frac{1}{f_Y(y)}$$ which when differentiated w.r.t $x$ gives the expression for the density $$f_{X|Y}(x,y) := \frac{\partial F_{X|Y}(x,y)}{\partial x}=\frac{\partial^2 {F_{X,Y}(x,y)}}{\partial x\partial y} \frac{1}{f_Y(y)} := \frac{f_{X,Y}(x,y)}{f_Y(y)}$$
Hopefully, my assumption regarding the existence of partial derivative of $F_{X,Y}(x,y)$ such as $\frac{\partial {F_{X,Y}(x,y)}}{\partial y}$ is not wrong.