2
$\begingroup$

I have random variables $X$, $Y$ with joint distribution $f_{XY}(x,y)$ and conditional distribution $f_{X|Y}(x|y)$ and another random variable $Z=g(X)$ with $g$ being bijective is it true that

$$E(Z|Y=y)=\int_{-\infty}^{\infty}g(x)f_{X|Y}(x|y)dx$$

if so, does $g$ need to be bijective for this to hold in general? If not, is there a way to find $E(Z|Y=y)$ knowing just the joint and conditional probability functions for $X$ and $Y$?

$\endgroup$
6
  • 1
    $\begingroup$ Why is $f_{XY}(x|y)$ joint distribution? $\endgroup$ Jul 4, 2020 at 2:19
  • $\begingroup$ It's not, that was a mistake thank you for pointing that out $\endgroup$ Jul 4, 2020 at 2:27
  • $\begingroup$ The equation you write can indeed be considered as a definition, and it is valid for any $g$. To convince yourself that this is the case, you might for example consider a similar but discrete problem, with the quantities $x,y,z$ assuming, say, three values each. Then you can check what happens with the formula above if $g$ is one-one, or many-one, and if it's surjective or not. See if it agrees with your intuition. You can also consider the case $g(x)=\text{const}$ to convince yourself that the formula is valid. $\endgroup$
    – pglpm
    Jul 4, 2020 at 11:25
  • 1
    $\begingroup$ @pglpm thank you for the response! In the last part of the question I meant, if the integral above was not valid for all g (or any g for that matter) then is there another integral (or transformation) that was valid. In either case, g is known. $\endgroup$ Jul 4, 2020 at 14:26
  • 1
    $\begingroup$ I see, thank you. The formula is valid for every $g$. The statement that $z$ is a function of $x$ can also be seen as a limit case of a probabilistic statement: we can write $\mathrm{p}(\mathrm{d}z |\, x) = \delta[z - g(x)]\,\mathrm{d}z$. You can then use the law of total probability to calculate $\mathrm{p}(\mathrm{d}z |\, y)$ and $\mathrm{E}(z |\, y)$. $\endgroup$
    – pglpm
    Jul 4, 2020 at 17:46

2 Answers 2

2
$\begingroup$

Let's see this from a slightly different point of view. It may appear long-winded, but it's a mechanical application of the rules of the probability calculus. I'm not going to use random-variable notation (I prefer Jaynes's notation) but I hope the reasoning will be clear nevertheless.

By definition, $$ \mathrm{E}(z |\, y) := \int z \; \mathrm{p}(z |\, y) \;\mathrm{d}z\;. $$ Now let's see whether the conditional density $\mathrm{p}(z |\, y)\,\mathrm{d}z$ is determined by the information given in the problem.

We have $\mathrm{p}(x |\, y)\,\mathrm{d}x$. We also know that $z=g(x)$. This is equivalent to (a limit case of) probabilistic information. It means two things: first, $$ \mathrm{p}(z |\, x)\;\mathrm{d}z = \delta[z - g(x)]\;\mathrm{d}z $$ that is, if we know the value of $x$ then we also know the value of $z$ with perfect certainty. Note that this is true no matter what kind of function $g$ is, bijective or not. Second, $$ \mathrm{p}(z |\, x,y) \;\mathrm{d}z= \mathrm{p}(z |\, x) \;\mathrm{d}z\;, $$ because if $x$ is known, then knowledge of $y$ is irrelevant for ascertaining $z$ (otherwise $g$ would have been a function of $x$ and $y$, for example).

Now we can use the theorem of total probability: $$ \begin{align} \mathrm{p}(z |\, y) &= \int \mathrm{p}(z |\, x,y)\; \mathrm{p}(x |\, y)\;\mathrm{d}x \\ &= \int \mathrm{p}(z |\, x)\; \mathrm{p}(x |\, y)\;\mathrm{d}x \\ &= \int \delta[z - g(x)]\; \mathrm{p}(x |\, y)\;\mathrm{d}x \end{align} $$ where we have used the two previous equations.

Now we can replace the newly found expression for $\mathrm{p}(z |\, y)\;\mathrm{d}z$ in the definition of expectation: $$\begin{align} \mathrm{E}(z |\, y) &:= \int z \; \mathrm{p}(z |\, y) \;\mathrm{d}z \\ &= \int z \; \biggl\{\int \delta[z - g(x)]\; \mathrm{p}(x |\, y)\;\mathrm{d}x\biggr\} \;\mathrm{d}z \\ &= \int \biggl\{\int z \; \delta[z - g(x)]\;\mathrm{d}z\biggr\}\; \mathrm{p}(x |\, y)\;\mathrm{d}x \\ &=\int g(x)\; \mathrm{p}(x |\, y)\;\mathrm{d}x \end{align} $$ Which is the desired result. Of course the two integrals can only be swapped under some regularity assumptions about the density, which we have swept under the carpet (they're especially important if $\mathrm{p}(x |\, y)$ is a generalized function, for example).

$\endgroup$
0
$\begingroup$

As far as I understand, the transformation function should be bijective for the expectation result to hold true. If it is not the case then the distribution of x is not going to be uniquely defined. A simple example is $z = x^2$. For a given x, z is deterministic but we can't determine the probability mass function of x by knowing z. Please let me know if I am wrong and it can indeed be inferred in some way.

$\endgroup$
4
  • $\begingroup$ Welcome to this community! Whether the distribution for $x$ is defined, and whether $g$ is bijective, are two different matters. The formula in the question is valid for any $g$ (work out the case $g(x)=\text{const}$ for example). $\endgroup$
    – pglpm
    Jul 4, 2020 at 11:30
  • $\begingroup$ Thanks! I think I got it wrong. If the expectation is with respect to $f_{X|Y}$ then it is a correct expression but if the expectation is w.r.t Z given Y then it is not. In that case, the bijectivity of g is required for the expression to stand correct. $\endgroup$ Jul 5, 2020 at 4:23
  • $\begingroup$ I'm not sure if we're saying the same thing. If $z=g(x)$ and $\mathrm{p}(\mathrm{d}x |\,y)$ [or $f_{X|Y}$ as written in the question] are given, then $\mathrm{p}(\mathrm{d}z |\,y)$ [ie $f_{Z|Y}$] is also fully determined, no matter whether $g$ is bijective or not. I think you mean to say that if $z=g(x)$ and $\mathrm{p}(\mathrm{d}z |\,y)$ are given, then $\mathrm{p}(\mathrm{d}x |\,y)$ is not determined unless $g$ is bijective. Or am I misunderstanding you? $\endgroup$
    – pglpm
    Jul 5, 2020 at 8:22
  • $\begingroup$ Thats exactly what I meant. Thanks $\endgroup$ Jul 6, 2020 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.