I asked this question a couple of days ago on [Math.SE](https://math.stackexchange.com/questions/3680748/are-conditional-expectation-values-the-same-if-expectation-values-are-part-ii) but without any echo (no upvotes, although I offered a bounty). But because I did it for oversight from a reputable/professional source I now think meta.MO might be the more suitable place to ask. I hope you don't mind the cross-posting.




---


Assume ${\bf x},{\bf z} \in \mathbb{R}^n$ denote real-valued and bounded random variables with continuous probability density $p({\bf x},{\bf z})$ and $f({\bf x})$ and $g({\bf x})$ are real-valued bounded scalar functions. Furthermore, $P\_k({\bf z})$ denote all monomials for ${\bf z}$ indexed by $k\in\mathbb{N}$ (so that the expectation values of $E[P\_k]$ are the corresponding mixed moments of $\bf z$).


Then, does the following implication hold?


For all $k$: $ E\left[f({\bf x})P\_k({\bf z})\right] = E\left[g({\bf x})P\_k({\bf z})\right]~~~ \implies ~~~E\left.\left[f({\bf x})\right|{\bf z}\right] = E\left.\left[g({\bf x})\right|{\bf z}\right]$


Note: All moments and expectation values exist because the random variables and functions are bounded.




---


I tried the following. (I'm not so sure with the exchange of the limits and the uniform convergence.)


Because the premise holds for all polynomials of $\bf z$ I can represent for each $\epsilon$ the $\eta\_\varepsilon({\bf z})$ (Gaussian bump representation) in the Dirac-Delta function in $\mathbb{R}^n$ 


$\delta({\bf z})=\lim\_{\varepsilon\to 0^+} \eta\_\varepsilon({\bf z})$


as the powerseries of the exponential function in the Gaussian bump representation with coefficients $c\_k$. This powerseries converges uniformly to the exponential function and, thus, the arguments of the expectation values converge uniformly to $f({\bf x})\eta\_\varepsilon({\bf z})$ and $g({\bf x})\eta\_\varepsilon({\bf z})$ (for arbitrary bounded $f$ and $g$). Then, I can exchange the integral of the expectation with the infinite sum and obtain


$$ \sum\_k c\_k E\left[f({\bf x})P\_k({\bf z})\right] = \sum\_k c\_k E\left[g({\bf x})P\_k({\bf z})\right] \\
E\left[f({\bf x})\sum\_k c\_k P\_k({\bf z})\right] = E\left[g({\bf x})\sum\_k c\_kP\_k({\bf z})\right]\\
E\left[f({\bf x})\eta\_\varepsilon({\bf z} -{\bf z}\_0)\right] = E\left[g({\bf x})\eta\_\varepsilon({\bf z} -{\bf z}\_0)\right]\\
\lim\_{\varepsilon\to 0^+}E\left[f({\bf x})\eta\_\varepsilon({\bf z} -{\bf z}\_0)\right] = \lim\_{\varepsilon\to 0^+}E\left[g({\bf x})\eta\_\varepsilon({\bf z} -{\bf z}\_0)\right]\\
E\left[f({\bf x})\delta({\bf z} -{\bf z}\_0)\right] = E\left[g({\bf x})\delta({\bf z} -{\bf z}\_0)\right]\\
E\left[f({\bf x})|{\bf z}\_0\right] = E\left[g({\bf x})|{\bf z}\_0\right]$$


Is this correct? 


In general, I am interested if the statement holds without the assumption of a continuous probability density $p({\bf x},{\bf z})$ for arbitrary probability distributions, but I don't see any reason why it should. Any ideas?



Conditional expectation values defined by expectation values
Your desired conclusion does hold without the assumption of a probability density of $\bf x$ and $\bf z$, provided that the functions $f$ and $g$ are assumed to be Borel measurable. 


Indeed, let $X:=f(\bf x)-g(\bf x)$ and $Z:=\bf z$, so that $X$ and $Z$ are bounded random variables with values in $\mathbb R$ and $\mathbb R^n$, respectively, such that 
$$EXP(Z)=0$$
for all polynomials $P$ on $\mathbb R^n$. Since the set of all such polynomials is dense in $L^1(K)$ for any compact $K\subset\mathbb R^n$, whereas $X$ and $Z$ are bounded, we conclude that $EXh(Z)=0$ for any $h\in L^1(K)$. So, $EX\,1(Z\in B)=0$ for any Borel set $B\subseteq\mathbb R^n$, which means $E(X|Z)=0$, as desired. 


