# Computing the conditional density function

Let $$(X,Y)$$ have joint density $$f(x,y)=c\exp(-(1+x^2)(1+y^2))$$, $$(x,y)\in\mathbb R^2$$, $$c$$ is a constant such that $$f$$ is indeed a probability density function. Then what is the conditional density of $$X$$ given $$\{Y=y\}$$.

We compute the conditional distribution of $$X$$ given $$\{Y=y\}$$. \begin{align} \Pr(X

Applying the Fubini-Tonelli theorem and taking the derivative in terms of $$x_0$$ gives us $$\frac{\int f(x_0,y)dy}{\int f(x,y) dx}.$$

Direct computation shows that $$\frac{\int f(x_0,y)dy}{\int f(x,y) dx}=\frac{\exp(-(1+x_0^2))\sqrt{1+y^2}}{\exp(-(1+y^2))\sqrt{1+x_0^2}}$$

But I think there should be a better way to compute the density other than taking the derivative of the distribution function. Can we do that?

With direct computation I get (similar to yours but I calcualated also the normalizing constant)

$$f_Y(y)=\sqrt{\frac{\pi}{1+y^2}}e^{-(1+y^2)}$$

Thus the conditional density is, by definition,

$$f_{X|Y}(x|y)=\frac{f_{XY}(x,y)}{f_Y(y)}=\sqrt{\frac{1+y^2}{\pi}}e^{-x^2(1+y^2)}$$

Thus immediately we recognize that

$$(X|Y=y)\sim N\Bigg(0;\frac{1}{2(1+y^2)}\Bigg)$$