How are conditional density functions of more than 2 variables defined?

760 Views Asked by At

I know that $$f_{X|Y}(x|y)=\frac {f_{X,Y}(x,y)}{f_Y(y)}$$ Is defined to be the conditional density of function of $X$ given $Y$.
However, I have yet to see how the conditional probability function of several variables is defined. If I had to guess, I would say it is defined like this: $$f_{X,Y|Z}(x,y|z)=\frac{f_{X,Y,Z}(x,y,z)}{f_Z(z)}$$ And hopefully it is also true that:
$$f_{X|Y,Z}(x|y,z)=\frac{f_{X,Y,Z}(x,y,z)}{f_{Y,Z}(y,z)}$$ For more variables, the pattern is clear, and I would understand if this was the definition.
My biggest problem is the following:
If $X$ and $Y$ are independent uniformly distributed on $(-1,1)$ random variables, what is the conditional density function of $X$ and $Y$ given that $X^2+Y^2\le 1$?
Intuitively and logically, I know that the answer is $\frac 1\pi$, but I would like to find this answer through the use of the above formulas and definitions I thought about $\mathbb{P} (X\le a, Y\le b |X^2+Y^2\le 1)$, intending to differentiate after I had gotten the integral of the density function... of what density function? It cannot be $\frac 14$ because where would the condition fall? I could maybe define a new density function of $X,Y,R=X^2+Y^2$, but how would I obtain it?
My main question is: how do I get the conditional density using a more formal argument (i.e. using definitions and formulas)?

2

There are 2 best solutions below

3
On BEST ANSWER

(A) When $X,Y,Z$ are each continuous random variables, your definitions are correct (at least when they do not produce a "divide by zero" error). $$\begin{align}f_{X,Y,Z}(x,y,z) & = f_{X,Y\mid Z}(x,y\mid z)~f_Z(z) \\[1ex] & = f_{X\mid Y,Z}(x\mid y,z)~f_{Y\mid Z}(y\mid z)~f_Z(z) \\[1ex] &= f_{X\mid Y,Z}(x\mid y,z)~f_{Y,Z}(y,z) \end{align}$$

It is very much analogous to the (perhaps) more familiar definition for discrete random variables.

$$\begin{align}\mathsf P(U{=}u,V{=}v,W{=}w) & = \mathsf P(U{=}u,V{=}v\mid W{=}w)~\mathsf P(W{=}w) \\[1ex] & = \mathsf P(U{=}u\mid V{=}v,W{=}w)~\mathsf P(V{=}v\mid W{=}w)~\mathsf P(W{=}w) \\[1ex] &= \mathsf P(U{=}u\mid V{=}v,W{=}w)~\mathsf P(V{=}v,W{=}w) \end{align}$$


(B) This is a somewhat different scenario, since the constraint: $X^2+Y^2\leqslant 1$ is not a continuous random variable, but an event (and one with a probability mass).   However the form of the relevant expression is also an analogous mixture.

$${f_{X,Y}(x,y)\cdot\mathbf 1_{x^2+y^2\leqslant 1}}~=~ {f_{X,Y}(x,y\mid X^2+Y^2\leqslant 1)~\mathsf P(X^2+Y^2\leqslant 1)}$$

So:

$$f_{X,Y}(x,y\mid X^2+Y^2\leqslant 1) = \dfrac{f_{X,Y}(x,y)\cdot\mathbf 1_{x^2+y^2{\leqslant} 1}}{\mathsf P(X^2+Y^2{\leqslant} 1)}$$

And in this case $\mathsf P(X^2+Y^2{\leqslant} 1)$ $= \tfrac 14\underset{(x,y)\in[-1;1]^2}{\iint_{x^2+y^2\leqslant 1}} 1\operatorname d (x,y) \\ = \tfrac 14\int_0^1\int_0^{2\pi} r\operatorname d \theta\operatorname d r \\ = \tfrac14\pi$

So indeed: $f_{X,Y}(x,y\mid X^2+Y^2\leqslant 1) ~=~ \tfrac 1\pi\cdotp\mathbf 1_{x^2+y^2\leqslant 1}$

1
On

You may define $Z=I_{X^2+Y^2\le 1}$, where $I$ is the indicator function, then you might write your conditional density as $f_{X,Y|Z}(x,y|1)$

But of course, the joint distribution of $(X,Y,Z)$ is of mixed type (continuous in $X$ and $Y$ and discrete in $Z$) and you should work with it accordingly.

$$f_{X,Y|Z}(x,y|1)=\frac{f_{X,Y,Z}(x,y,1)}{f_Z(1)}=\frac{f_{X,Y,Z}(x,y,1)}{P(Z=1)}=\frac{f_{X,Y}(x,y)I_{x^2+y^2\le 1}}{P(X^2+Y^2\le 1)}$$

since $f_{X,Y,Z}(x,y,1)=f_{Z|X,Y}(1|x,y)f_{X,Y}(x,y)=I_{x^2+y^2\le 1}f_{X,Y}(x,y)$