Moment criterion for conditional independence Suppose $X,Y,Z$ are real-valued random variables on some probability space. Suppose I know everything there is to know about the moments
$$
M_{p,q,r}=\mathbb{E}(X^pY^qZ^r)
$$
for $p,q,r\in\mathbb{N}_0$. Suppose also that these moments do not grow too fast so the moment problem is determinate, i.e., the moments completely determine the joint distribution of $X,Y,Z$.
How can I characterize $X\perp Y\mid Z$, namely the conditional independence of $X$ and $Y$ given $Z$,
entirely in terms of the moments $M_{p,q,r}$?
I tried to search the internet for such conditional independence criteria but what I could find was not helpful to me.
 A: If the moment problem is determinate and in addition $Z$ is bounded, then $X\perp Y\mid Z$ if and only if
$$\mathbb E\left[X^pY^qZ^r\right]=\lim_{n\to\infty}\mathbb E\left[X^p\mathbf Z_n^{\mathsf T}\right]\mathbb E\left[\mathbf Z_n\mathbf Z_n^{\mathsf T}\right]^+\mathbb E\left[\mathbf Z_nZ^r\mathbf Z_n^{\mathsf T}\right]\mathbb E\left[\mathbf Z_n\mathbf Z_n^{\mathsf T}\right]^+\mathbb E\left[\mathbf Z_nY^q\right]$$
where $\mathbf Z_n$ is the column vector $\left(1,Z,\dots,Z^n\right)$ and $^+$ denotes the Moore–Penrose pseudoinverse. I suspect that the assumption that $Z$ is bounded can be removed, but use it in my argument here.
The key to this result is the interpretation of conditional expectation as an orthogonal projection. Just as $\mathbb E\left[X\right]$ is the $\mu$ that minimizes $\mathbb E\left[\left(X-\mu\right)^2\right]$, the conditional expectation is $\mathbb E\left[X\mid Z\right]$ is $g\left(Z\right)$ for the measurable function $g$ that minimizes $\mathbb E\left[\left(X-g\left(Z\right)\right)^2\right]$, assuming $X$ and $Z$ have finite variance. In the Hilbert space of real-valued random variables with finite variance up to almost sure equality, where the inner product is defined by $\left\langle X,Y\right\rangle:=\mathbb E\left[XY\right],$ this is just the orthogonal projection of $X$ onto the subspace of measurable functions of $Z$.
If $Z$ is bounded, then by the Stone–Weierstrass theorem, the subspace of measurable functions of $Z$ is the closed linear span of $1,Z,Z^2,\dots$. Hence the orthogonal projection of $X$ onto this subspace is the limit of the orthogonal projection of $X$ onto the linear span of $1,Z,\dots,Z^n$ as $n\to\infty$. In other words, assuming $X$ has finite variance and $Z$ is bounded,
$$\mathbb E\left[X\mid Z\right]=\lim_{n\to\infty}\mathbb E\left[X\mathbf Z_n^{\mathsf T}\right]\mathbb E\left[\mathbf Z_n\mathbf Z_n^{\mathsf T}\right]^+\mathbf Z_n$$
in mean square, where $\mathbf Z_n$ is as above. The expression inside the limit on the right-hand side is the aforementioned orthogonal projection, which should be familiar from OLS regression.
To deduce the result, if $X\perp Y\mid Z$, then
$$\mathbb E\left[X^pY^qZ^r\right]=\mathbb E\left[\mathbb E\left[X^pY^q\mid Z\right]Z^r\right]=\mathbb E\left[\mathbb E\left[X^p\mid Z\right]\mathbb E\left[Y^q\mid Z\right]Z^r\right],$$
and the converse follows from the fact that the right-hand expression depends only on the joint distributions of $\left(X,Z\right)$ and of $\left(Y,Z\right)$, together with the assumption that the moment problem is determinate. The final step deducing convergence uses the fact that $Z$ is bounded again.
As an example, suppose $\left(X,Z\right)$ and $\left(Y,Z\right)$ are both bivariate Gaussian and $X\perp Y\mid Z$. Even though $Z$ is not bounded, the expression on the right hand-side of the equation for $\mathbb E\left[X\mid Z\right]$ has already converged once $n=1$, since uncorrelated bivariate Gaussians are independent. Hence the original equation still holds in the case $p=q=1$. Assuming $\mathrm{Var}\left(Z\right)>0$, this reduces in the case $r=0$ to $$\mathrm{Cov}\left(X,Y\right)=\frac{\mathrm{Cov}\left(X,Z\right)\mathrm{Cov}\left(Z,Y\right)}{\mathrm{Var}\left(Z\right)},$$
which can be shown to coincide with the solution obtained via maximum entropy.
A: I do not think that there is a way to do this more directly than via this straightforward approach:
Knowing the $M_{p,q,r}$'s, you can express the joint characteristic function $f$ of $(X,Y,Z)$:
$$f(s,t,u)=Ee^{i(sX+tY+uZ)}=\sum_{p,q,r\ge0}\frac{i^{p+q+r}s^p t^q u^r}{p!q!r!}\,M_{p,q,r}$$
for real $s,t,u$.
Inverting $f$, you can express the joint cdf $F$ of $(X,Y,Z)$, and finally express the conditional independence of $X$ and $Y$ given $Z$ in terms of $F$.

It should be clear that in general the conditional moments (say) of $X$ and $Y$ given $Z$ cannot be expressed in terms of any finite number of unconditional moments $M_{p,q,r}$, and the characteristic function neatly captures all the unconditional moments at once.
