# Conditional probability using known density function: $f_{x | y}(x_0 \leq x \leq x_1| y_0 \leq y \leq y_1)$

Assume we have two continuous variables $$X,Y$$; and we know the conditional probability density function: $$f_{x|y}(x,y)$$

How might we calculate the conditional probability over a range of values: $$P(x_0 \leq x \leq x_1|y_0 \leq y \leq y_1)$$

I know we could use the definition: $$P(x_0 \leq x \leq x_1|y_0 \leq y \leq y_1) = \frac{ \int_{x_0}^{x_1}\int_{y_0}^{y_1}f(x,y)dydx }{ \int_{y_0}^{y_1} f(y)}$$ where $$f(y)$$ and $$f(x,y)$$ are the probability distribution functions of the just $$Y$$ and then $$X,Y$$, the joint.

I can calculate $$f(y)$$ quickly, but I would rather not calculate $$f(x,y)$$. This is for a numerical application and calculating $$f(x,y)$$ is expensive. Is there a way to use the the conditional probability density function directly? I feel like the answer is a simple integral; but this is my first attempt at dealing with continuous and discrete probability density functions in the context of conditional/joint probabilities.

If someone has a good reference that helped one "graduate" from the low-level undergraduate style probability (nearly everything is discrete events) to working with continuous or discrete density functions directly, I would be most appreciative.

If you know $$f_{x|y}(x,y)$$ and $$f(y)$$ then
Define $$h(x) = \frac{\int_{y_0}^{y_1}{f_{x|y}(x,y)f(y)}dy}{\int_{y_0}^{y_1}{f(y)}dy}$$
$$P[x_0 \leq X \leq x_1 | y_0 \leq Y \leq y_1] = \int_{x_0}^{x_1}{h(x)dx}$$
• Thank-you! Is there a theorem that gives the right hand side? It is not clear to me why we can define $h(x)$ in that way. Apr 26, 2020 at 21:23
• It looks like $h(x)$ is using the "definition" of probability? The numerator is another way of stating the joint probability? Apr 26, 2020 at 21:32