# Are all random variables conditional expectations?

Let $$Z$$ be a random variable on a probability space. Is it true that we can always find $$X,Y$$ two random variables on the same space such that $$E[Y|X]=Z$$ almost surely ?

What about this weaker (is it really weaker ? It feels so, but I am not sure) statement: Let $$\mu$$ be a probability measure on $$\mathbb R$$. Is it true that we can always find $$X,Y$$ such that $$E[Y|X]\sim \mu$$ ?

Any solution is welcome, but extra points if you can "build" the random variables $$X,Y$$.

• Doesn't $X=Y=Z$ work?
– Karl
May 15, 2021 at 17:42
• I should have added that the r.v have to be different on a set of probability bigger than $0$ May 15, 2021 at 20:52

Let $$(X, \Omega, \mu) \in \mathcal{P}$$ a probability space, $$\mathcal{B} \subseteq \Omega$$ a sub $$\sigma$$-field of $$\Omega$$, $$Y : X \rightarrow \mathbb{R}$$ a $$\Omega$$-measurable function of finite expectation. Conditional expectation naturally extends itself to the question of existance of a $$\mathcal{B}$$-measurable function $$Z$$ on $$X$$ such that : $$\forall A \in \mathcal{B}, \int_A ZdP = \int_A Y dP$$ If $$Y$$ has a finite expectation (and we need it for the very definition of conditional expectation) such a random variable $$Z$$ does exists (We define $$m$$ a measure on $$\mathcal{B}$$ by $$\forall A \in \mathcal{B}, m(A) = \int_A YdP$$ and apply Radon-Nykodym theorem to get a $$\mathcal{B}$$-measurable function $$Z$$ such that $$\forall A \in \mathcal{B}, m(A) = \int_A ZdP$$) A good intuition on this for $$\mathcal{L}^2$$ functions is that expectation is just the (linear) projection from $$\Omega$$-measurable functions onto $$\mathcal{B}$$-measurable function.
Now for the second question, by definition of $$Z$$ you have that the answer is positive.
Now if we drop the assumption of finite expectation it becomes a bit more complex as ( R. E. Strauch. "Conditional Expectations of Random Variables Without Expectations." Ann. Math. Statist. 36 (5) 1556 - 1559, October, 1965. ) in short, you could define a new conditional expectation to be $$E(Y^+ \mid \mathcal{B}) - E(Y^- \mid \mathcal{B})$$ provided this difference is defined almost everywhere. The paper goes on about pathologies of such a definition.