# Is statistical dependence transitive?

Take any three random variables $X_1$, $X_2$, and $X_3$.

Is it possible for $X_1$ and $X_2$ to be dependent, $X_2$ and $X_3$ to be dependent, but $X_1$ and $X_3$ to be independent?

Is it possible for $X_1$ and $X_2$ to be independent, $X_2$ and $X_3$ to be independent, but $X_1$ and $X_3$ to be dependent?

First problem: Toss a fair coin twice. Let $X_1=1$ if the first toss is a head, and $0$ otherwise. Let $X_3=1$ if the second toss is a head, and $0$ otherwise. Let $X_2$ be the number of heads in the two tosses combined.

Then $X_1$ and $X_2$ are dependent, as are $X_2$ and $X_3$, but $X_1$ and $X_3$ are independent.

Second problem: Again, two tosses of a fair coin. Let $X_1$ and $X_3$ each be $1$ if we get head on the first toss, and $0$ otherwise. Let $X_2$ be $1$ if we got a head on the second toss, and $0$ otherwise. Then $X_1$ and $X_2$ are independent, as are $X_2$ and $X_3$, but $X_1$ and $X_3$ are very much not independent.

• The example given in Problem 2 is vacuous since $X_1$ and $X_3$ are the same random variable, which trivially are never independent (unless constant).
– jII
Sep 24, 2015 at 14:30
• The example is indeed quite simple. But it is perfectly legitimate since nothing in the problem statement forbade $X_1=X_3$. If one specifies that one in addition wants $X_1\ne X_3$, it can be done by minor modification. Sep 24, 2015 at 15:01
• I think the question was misunderstood (and vaguely stated). By transitivity I would understand the question in such way that the belief network has to be drawn like this: X1 -> X2 -> X3 and not like this X1 -> X2 <- X3 Oct 18, 2023 at 12:04

for $(ii)$ consider $X_1, X_2$ independant and $X_1 = 3X_3$.

1. Let $X,Y$ be independent real-valued variables each with the standard normal distribution $\mathcal N(0,1)$
We have then: $$EX = EY = 0, EX^2 = EY^2 = 1.$$
Consider random variables $U = X +Y$, $V = X - Y$. We have $E(U * V) = 0 .$ Since $U$ and $V$ are also normally distributed, this implies that $U$ and $V$ are statistically independent. Meanwhile, $(X, U)$, $(X, V)$ (as well as $(Y, U)$ and $(Y, V)$ are statistically dependent variables in each of these pairs.

2. Consider a regular triangular pyramid which 4 faces are colored as follows: $$(1,R), (2,G), (3, B), (4, RGB).$$ In rolling a pyramid, we have equal probability of $1/4$ for each face to land on. The probability to observe certain colors on the landed face are:
$$P(R) = P((1,R),(4,RGB)) = 1/2.$$ Similarly, $$P(G) = 1/2, P(B)= 1/2.$$ Then, we have $P(RGB)=1/4$ which is not equal to $P(R)*P(G)*P(G) = 1/8.$