I have a question on independence of random variables.
Question $:$ Let $X_1,X_2, \cdots, X_n$ be independent random variables. Let $A = \{i_1, i_2, \cdots, i_p \}$ and $B = \{j_1, j_2, \cdots, j_q \}$ be two disjoint subsets of $\{1,2, \cdots, n \}.$ Let $f : \mathbb R^p \longrightarrow \mathbb R$ and $g : \mathbb R^q \longrightarrow \mathbb R$ be Borel measurable functions. Then can we conclude that the random variables $f \left (X_{i_1}, X_{i_2}, \cdots, X_{i_p} \right )$ and $g \left (X_{j_1}, X_{j_2}, \cdots, X_{j_q} \right )$ are independent as well?
Intuitively I feel that it is correct but I can't able to prove it rigorously. Any help in this regard would be a boon for me at this stage.
Thanks for your time.
Let $(\Omega, \mathcal F, \mathbb P)$ be the underlying probability measure space. Define the random vectors $\mathbf Z_1 = \left (X_{i_1}, X_{i_2}, \cdots, X_{i_p} \right )$ and $\mathbf Z_2 = \left (X_{j_1}, X_{j_2}, \cdots, X_{j_q} \right ).$ As I pointed out in the comments above that it is enough to show that the sub-$\sigma$-algebras $\sigma (\mathbf Z_1)$ and $\sigma (\mathbf Z_2)$ of $\mathcal F$ are independent. Now it is not hard to see that $\sigma (\mathbf Z_1) = \sigma \left (\bigcup\limits_{k=1}^{p} \sigma \left (X_{i_k} \right ) \right )$ and $\sigma (\mathbf Z_2) = \sigma \left (\bigcup\limits_{l=1}^{q} \sigma \left (X_{j_l} \right ) \right ).$ Fix some $A \in \bigcup\limits_{k=1}^{p} \sigma \left (X_{i_k} \right )$ and consider the following collection $$\mathcal C : = \left \{B \subseteq \Omega\ |\ \mathbb P(A \cap B) = \mathbb P(A) \mathbb P(B) \right \}.$$ It is easy to show that the collection $\mathcal C$ is a $\sigma$-algebra of subsets of $\Omega$ containing $\bigcup\limits_{l=1}^{q} \sigma \left (X_{j_l} \right )$ and hence $\sigma (\mathbf Z_2) = \sigma \left (\bigcup\limits_{l=1}^{q} \sigma \left (X_{j_l} \right ) \right ) \subseteq \mathcal C.$ So for all $A \in \bigcup\limits_{k=1}^{p} \sigma \left (X_{i_k} \right )$ and for all $B \in \sigma (\textbf Z_2)$ we have $$\tag{*} \mathbb P(A \cap B) = \mathbb P(A) \mathbb P(B).$$ Now define a collection $$\mathcal D : = \left \{A \subseteq \Omega\ |\ \mathbb P(A \cap B) = \mathbb P(A) \mathbb P(B)\ \text{for all}\ B \in \sigma (\mathbf Z_2) \right \}.$$ Then, as in the previous case, it is easy to show that the collection $\mathcal D$ is a $\sigma$-algebra of subsets of $\Omega$ and $\bigcup\limits_{k=1}^{p} \sigma \left (X_{i_k} \right ) \subseteq \mathcal D$ by $(*)$ and hence $\sigma (\mathbf Z_1) = \sigma \left (\bigcup\limits_{k=1}^{p} \sigma \left (X_{i_k} \right ) \right ) \subseteq \mathcal D.$ In other words, for all $A \in \sigma (\mathbf Z_1)$ and for all $B \in \sigma(\textbf Z_2)$ we have $$\mathbb P(A \cap B) = \mathbb P(A) \mathbb P(B)$$ as required.