Let $ X, Y $ be an independent random variable.

$ R ( pi, X) $ to be a posterior distribution for a distribution a priori $ pi $ and sample $ X $. CA watch $$ R ( pi_0, (X, Y)) = R (R ( pi_0, X), Y) $$

**My work up here**

Firstly, write:

$ R ( pi_0, (X, Y)) = frac {P ((X, Y) | pi_0) cdot P ( pi_0)} {P (X) P (Y)} = frac {P (X cap pi_0) P (Y cap pi_0) P ( pi_0)} {P (X) P (Y)} $. I used the fact that $ X, Y $ are therefore dependent $ P (X, Y) = P (X) P (Y) $

Now the second expression:

$ R ( pi_0, X) = frac {P (X | pi_0) P ( pi_0)} {P (X)} $

$$ R (R ( pi_0, X), Y) = frac {P (Y | frac {P (X | pi_0 cdot P ( pi_0)} {P (X)}) cdot ( Frac {P (X | pi_0) cdot P ( pi_0)} {P (X)})} {P (Y)} $$.

So, if the equality is true, I have to show that $$ frac {P (Y | frac {P (X | pi_0 cdot P ( pi_0)} {P (X)}) cdot ( frac {P (X | pi_0) cdot P ( pi_0)} {P (X)})} {P (Y)} = frac {P (X cap pi_0) P (Y cap pi_0) P ( pi_0)} {P (X) P (Y)} Rightarrow $$

$$ P (Y | frac {P (X cap pi_0)} {P (X)}) cdot P (X | pi_0) = P (X cap pi_0) P (Y cap pi_0 ) $$.

So, the left side of equality is: $$ P (Y | P ( pi_0 | X)) = P (Y) P ( pi_0 | X) P (X | pi_0) = P (Y) P ( pi_0 cap X) $$ But $ P (Y) neq P (Y cap pi_0) $.

Can you please show me an error in my justification?