# Under what conditions is expectation value distributive?

We know that for two real numbers $a,b$ and two random variables $X,Y$ we have that $E(a X + b Y ) = a E(X) + b E(Y)$. Under what conditions is it also true that for any three random variables $X,Y,Z$, we have that $E\bigl(X (Y + Z)\bigr) = E(X Y + X Z) = E(X Y) + E(X Z)$?

In this equation you are allowed to assume that there exist joint distributions for $X,Y$ and $X,Z$ but not necessarily for $X,Y,Z$. So, as per Michael's answer below, the question would seem to reduce to when a joint distribution exists given distributions for $X,Y$ and $X,Z$.

-
That's distributivity, not associativity. – mjqxxxx Sep 10 '12 at 17:20
For real numbers, you have $X(Y+Z) = XY + XZ$. Hence you have $E(X(Y+Z)) = E(XY + XZ)$. Expectation is linear, so you have $E(XY + XZ) = E XY + E XZ$. – copper.hat Sep 10 '12 at 17:20
Thanks mjqxxxx, editted. I think it can't always be true because the violation of this property is needed to arrive at the violation of Bell inequalities in quantum mechanics. – SMeznaric Sep 10 '12 at 17:23
Your equation $E(aU+bV)=aE(U)+bE(V)$ answers the question. – André Nicolas Sep 10 '12 at 17:23
Thanks to everyone who tried to answer my question. I have now found a partial answer to my question. Unfortunately there is no guarantee that given marginal or conditional distributions for $X,Y$ and $X,Z$, there exists a joint distribution for $X,Y,Z$. This is why the distributive law does not always hold. The paper dealing with conditional distributions can be seen here. However, if anyone can lucidate the matter with a simple condition, the question is still open. I have also editted the question to make it clearer what I want. – SMeznaric Sep 11 '12 at 11:05

In the form in which you've written it, $E\bigl(X (Y + Z)\bigr) = E(X Y + X Z) = E(X Y) + E(X Z)$, it's always true ("always" means whenever the expected values involved exist) since $XY$ and $XZ$ is a random variable and $XY+XZ$ is their sum. The expected value of the sum is the sum of the two expected values. You've applied the distributive law above only to show that $X (Y + Z)=(X Y) + (X Z)$, and that does not in any way depend on any facts about expected values. If you wanted to separate that last term into $E(X)E(Z)$ or something like that, that would be another matter. That will work if $X$ and $Z$ are uncorrelated (independence is a stronger hypothesis than what is needed here).
Thanks for your answer Michael. Here is what I don't understand. Suppose $X,Y$ follow some measure $dp(x,y)$ (where $x,y$ are particular values of $X,Y$) and $X,Z$ follow $dq(x,y)$, where you can assume that $p$ and $q$ are densities. Now of course $\int dy p(x,y) = \int dz q(x,z)$. It is not obvious to me that $E(XY) + E(XZ) = int dx dy p(x,y) x y + \int dx dz q(x,z) x z = \int dx dy dz x(y+z) r(x,y,z) = E\bigl(X(Y+Z)\bigr)$. Does such extension of $p$ and $q$ always exist? – SMeznaric Sep 10 '12 at 18:38