Let $\mathbf{y},\mathbf{x},\mathbf{z}$ are real-valued *random vectors* with possibly different dimensions. Assume $\mathbf{y}=f(\mathbf{x},\mathbf{z})$ for some function $f$.
If $\mathbf{z} \perp\!\!\!\perp \{\mathbf{y},\mathbf{x}\}$ (i.e., $\mathbf{z}$ is *statistically* independent of $\mathbf{y}$ and $\mathbf{x}$ **jointly**), is it true that there exists a function $g$ such that $\mathbf{y}=f(\mathbf{x},\mathbf{z})=g(\mathbf{x})$?


If it is not true, how about the simpler case: $y=f(\mathbf{x}+\mathbf{z},\mathbf{z})=g(\mathbf{x})$ for $y\in \mathbb{R}$ and $\mathbf{x},\mathbf{z}\in \mathbb{R}^p$?



$\mathbf{y}=f(\mathbf{x},\mathbf{z})=g(\mathbf{x})$ if $\mathbf{z}\perp \!\!\! \perp \{\mathbf{y},\mathbf{x}\}$ jointly?
$\newcommand\R{\mathbb R}$The answer is yes. According to standard convention, write $X,Y,Z$ in place of $\mathbf x,\mathbf y,\mathbf z$, respectively, reserving the corresponding lower-case letters $x,y,z$ for the corresponding values of $X,Y,Z$.


So, $Z$ is independent of $(X,Y)$. We also have $Y=f(X,Z)$ for some Borel function $f$. So, for any Borel sets $A,B,C$ in the respective spaces,
$$P(X\in A,f(X,Z)\in B,Z\in C) \\ 
=P(X\in A,f(X,Z)\in B)\,P(Z\in C). \tag{1}\label{1}$$
Since the independence of $Z$ from $(X,Y)$ implies the independence of $Z$ from $X$, we rewrite \eqref{1} as
$$\int\_A P(X\in dx)P(f(x,Z)\in B,Z\in C) \\ 
=\int\_A P(X\in dx)P(f(x,Z)\in B)\,P(Z\in C); \tag{2}\label{2}$$
this rewriting holds by the Tonelli theorem, which implies that
$$\begin{aligned}Eh(X,Z)&=\iint P(X\in dx,Z\in dz) h(x,z) \\ 
&=\iint P(X\in dx)P(Z\in dz) h(x,z) \\ 
&=\int P(X\in dx)\int P(Z\in dz) h(x,z)\\ 
&=\int P(X\in dx)E h(x,Z)
\end{aligned}$$
for any nonnegative Borel function $h$ (provided that $X$ and $Z$ are independent). In our case, we apply this to $h(x,z)=1(x\in A,f(x,z)\in B,z\in C)$ on the left and to $h(x,z)=1(x\in A,f(x,z)\in B)$ on the right.


Since the Borel set $A$ in \eqref{2} is arbitrary, we see that
$$P(f\_x(Z)\in B,Z\in C) 
=P(f\_x(Z)\in B)\,P(Z\in C) \tag{3}\label{3}$$
for almost all (a.a.) $x$ (with respect to the probability measure that is the distribution of $X$), where $f\_x(z):=f(x,z)$. Letting now $C=f\_x^{-1}(B)$, we get
$$P(f\_x(Z)\in B) 
=P(f\_x(Z)\in B)^2\tag{4}\label{4}$$
and hence $P(f\_x(Z)\in B)\in\{0,1\}$ for any (say) open ball $B$ and a.a. $x$. So, $P(f\_x(Z)\in B)\in\{0,1\}$ for a.a. $x$ and all open balls $B$ of rational radii and rational coordinates of the centers -- at once (since there are only countable many such balls). So, for a.a. $x$, the support of the distribution of the random variable $f\_x(Z)$ is a singleton set (by Lemma 1 below), so that for some real $g\_x$
$$P(f(x,Z)\ne g\_x)=P(f\_x(Z)\ne g\_x)=0.$$
So,
$$P(Y\ne g\_X)=P(f(X,Z)\ne g\_X)=\int P(X\in dx)P(f\_x(Z)\ne g\_x)=0.$$


Thus indeed, $Y=g\_X$ almost surely.




---


**Lemma 1:** Let $V$ be a random vector in $\R^d$ such that $P(V\in B)\in\{0,1\}$ for all open balls $B$ in $\R^d$ of rational radius and rational coordinates of the center. Then the support $S\_V$ of the distribution of $V$ is a singleton set.


*Proof:* Suppose that contrary: that there are two distinct points $u,v$ in $S\_V$, so that the distance between $u$ and $v$ is $d>0$. Let $B\_u$ and $B\_v$ be the open balls centered at $u$ and $v$ of radii $d/4$, so that the shortest distance between $B\_u$ and $B\_v$ is $d/2>0$. Since $u,v$ are in $S\_V$, we have $P(V\in B\_u)>0$ and $P(V\in B\_v)>0$. By the continuity of probability (or the Fatou lemma), there exist **disjoint** open balls $C\_u$ and $C\_v$ of rational radii and rational coordinates of the centers that are close enough to $B\_u$ and $B\_v$ so that $P(V\in C\_u)>0$ and $P(V\in C\_v)>0$.


Then
$$0<P(V\in C\_u)\le1-P(V\in C\_v)<1,$$
which contradicts the condition that $P(V\in C\_u)\in\{0,1\}$. $\quad\Box$.


