Why is the conditional expectation $E[x|y]$ a function of the conditioning argument $y$? How about the pdf $p(x|y)$?

228 Views Asked by At

For a random variable $x$ and $y$, consider the conditional pdf $p(x|y)$ and the conditional expectation $E[x|y]$.

I previously thought that the conditional pdf or conditional expectation were functions of $x$, not $y$.

But I read that the $E[x|y] = \int_{-\infty}^{\infty}x\cdot p(x|y)dx$ is a function of $y$. Hence, when taking the expectation again on $E[x|y]$, we write:

$$ E[E[x|y]] = \int_{y = -\infty}^{\infty}\left[\int_{-\infty}^{\infty}x\cdot p(x|y)dx\right]p(y)dy. $$

I do not understand this first because I thought $p(x|y)$ is a function of $x$, and therefore $E[x|y]$ also a function of $x$. Am I wrong in the first place?

Is $p(x|y)$ actually a function of $y$? Why isn't it a function of $x$?

Why isn't $E[x|y] = \int_{-\infty}^{\infty}x\cdot p(x|y)dx$ a function of $x$ when it clearly has $x$ in the expression? Is it a function of both $x$ and $y$?

3

There are 3 best solutions below

6
On BEST ANSWER

$$\int_{-\infty}^{\infty} x f(x|y)dx$$

is clearly a function of $y$ because $x$ is integrated

For the same reason

$$\int_{-\infty}^{\infty} x f(x)dx= E(X)$$

is a constant...when the integral exists


$p(x|y)$ is surely a function of $y$ but it can also be a function of both $x,y$, i.e.

$$f(x|y)=y e ^{-xy}$$

$x>0$; $y \sim U[1;2]$

Which is a Negative exponential density with a parameter that is uniformly distributed in $[1;2]$

0
On

The definition of conditional density is f(x|y) = f(x $\cap$ y)/f(y). Plus it is right in the name: the probability density depends on the condition, the value of y, so it has to be a function of y. p(x|y) is generally a function of both x and y. If you integrate it over all y then you end up with a function that depends on x, called the marginal probability, f(x). E[x|y] is not a function of x because it is an expectation--when you integrate over a variable between constant limits, the variable goes away. It still depends on y though. E[x|y] says "the average value of x given this value of y." When you do a double integral to get a number, the outer integral has to have numbers for limits, but the inner integral can have functions of the outer variable for limits, because it will still be a function of the outer variable once you have done the inner integral, but it won't be a function of the inner variable any more because you "totaled it all up." It can't depend on a specific value of inner variable because it already is built out of ALL the values of the inner variable. Try writing out a couple of easy double integrals for yourself; find the area of a triangle, for example. Watch when you have functions of what, and integrate in both orders so you can see the difference.

0
On

Is it possible to interpret the example you gave in terms of the p(x,y) and p(y)?

Of course it is! There are several possible interpretation. Here is one...

$$f(x|y)=\frac{f(x,y)}{f(y)}=\frac{2}{2y}$$

where

$$f(x,y)=2$$

is the joint uniform distribution on the following triangle

enter image description here

and $f(y)=2y$ is the density of the variable $Y$ where $y \in (0;1)$