TITLE: If X is independent to Y and Z, does it imply that X is independent to YZ ?
QUESTION [5 upvotes]: After years of mathematics, I am struggling with this simple question. 
If we have 3 r.v. $X,Y,Z$ and we have $X$ independent to $Y$ and to $Z$, then do we have that $X$ is also independent to $YZ$ ?
At first sight, I thought that if $X$ is independent to $Y$ and $Z$, it is also independent to the sigma-algebra generated by $Y$ and to $Z$ and hence $YZ$ but the example below made me confused : 
https://en.wikipedia.org/wiki/Pairwise_independence
If someone can make this clear...
Thank you very much in advance !

REPLY [8 votes]: Short answer: No, $X \perp Y , X \perp Z$ doesn't imply $X \perp YZ$
Let's say you do an experiment where you choose a number randomly from:
{1,2,3,4,6,7,8,9}
Let X = 1 if:
(Your chosen number is even AND less than five) OR (your chosen number is odd AND greater than 5)
and 0 otherwise
Let Y = 1 if your chosen number is even, 0 otherwise
Let Z = 1 if your chosen number is greater than 5, 0 otherwise
Now we know X = 1 with probability - 0.5 (2,4,7,9) and 0 with probability 0.5 (1,3,6,8)
If we know Y = 1, X is still 1 with p = 0.5 (2,4) and 0 with p = 0.5 (6,8)
If we know Y = 0, X is still 1 with p = 0.5 (7,9) and 0 with p = 0.5 (1,3)
If we know Z = 1, X is still 1 with p = 0.5 (7,9) and 0 with p = 0.5 (6,8)
If we know Z = 0, X is still 1 with p = 0.5 (2,4) and 0 with p = 0.5 (1,3)
So X is independent of Y and X is independent of Z.
But knowing if a number is even AND knowing if it's greater than 5 (Y & Z), makes us know X with certainty. e.g. Y = 1, Z = 1, then YZ = 1, X has to be 0 with probability 1 (as X is 0 if the number is an even number > 5)
$P(X = 0 | Y ) = P(X = 0) = 0.5$ (same for X = 1)
$P(X = 0 | Z ) = P(X = 0) = 0.5$ (same for X = 1)
But
$P(X = 0 | YZ = 1) = 1 \neq P(X=0) $  (similar for X = 1)