How is independence between two family of random variables defined? Given a family of random variables are jointly independent, how is independence between two family of random variables defined? An example is from Terry Tao's blog. Thanks!

Exercise 18 (Creation of new, independent random variables) Let $(X_\alpha)_{\alpha \in A}$ be a family of random variables (not necessarily independent or finite), and let $(\mu_\beta)_{\beta \in B}$ be a collection (not necessarily finite) of probability measures $\mu_\beta$ on measurable spaces $R_\beta$. Then, after extending the sample space if necessary, one can find a family $(Y_\beta)_{\beta \in B}$ of independent random variables, such that each ${Y_\beta}$ has distribution ${\mu_\beta}$, and the two families $(X_\alpha)_{\alpha \in A}$ and $(Y_\beta)_{\beta \in B}$ are independent of each other.

 A: It means that the two sigma-fields
$$
\sigma\left(\{X_\alpha\mid \alpha\in A\}\right)=\sigma\left(\bigcup_{\alpha\in A}\{X^{-1}_\alpha(B)\mid B\in\mathcal{B}(\mathbb{R})\}\right)\qquad (1)
$$
and
$$
\sigma\left(\{Y_\beta\mid \beta \in B\}\right)=\sigma\left(\bigcup_{\beta\in B}\{Y^{-1}_\beta(B)\mid B\in\mathcal{B}(\mathbb{R})\}\right)\qquad (2)
$$
are independent. Two sigma-fields $\mathcal{A}$ and $\mathcal{B}$ are independent whenever 
$$
P(A\cap B)=P(A)P(B),\quad A\in\mathcal{A},\;B\in\mathcal{B}.
$$
In fact $\sigma\left(\{X_\alpha\mid \alpha\in A\}\right)$ is the sigma-field generated by the system 
$$
\left\{\bigcap_{i=1}^n\{X_{\alpha_i}^{-1}(B_i)\}\;\bigg|\; \alpha_1,\ldots,\alpha_n\in A\text{ are distinct},\; B_1,\ldots,B_n\in\mathcal{B}(\mathbb{R})\right\},\qquad (*)
$$
which obviously is stable under intersection. Let us use the following result:

If $\mathcal{G}$ and $\mathcal{F}$ are systems of sets that are stable under finitely many intersections, then
  $$
\mathcal{G} \text{ and }\mathcal{F} \text{ are independent} \iff \sigma(\mathcal{G})\text{ and }\sigma(\mathcal{F}) \text{ are independent}.
$$

It shows that $(1)$ and $(2)$ are independent if and only if $(*)$ and $(**)$ are independent, where $(**)$ is the analogue of $(*)$ for the family $(Y_\beta)_{\beta\in B}$.
But this is just saying that
$$
\begin{align}
P\big(&(X_{\alpha_1},\ldots,X_{\alpha_n})^{-1}(B_1)\cap (Y_{\beta_1},\ldots,Y_{\beta_k})^{-1}(B_2)\big)\\
&=P\big((X_{\alpha_1},\ldots,X_{\alpha_n})^{-1}(B_1)\big)\cdot P\big((Y_{\beta_1},\ldots,Y_{\beta_k})^{-1}(B_2)\big)
\end{align}
$$
for every choice $\alpha_1,\ldots,\alpha_n\in A$, $\beta_1,\ldots,\beta_k\in B$, $B_1\in\mathcal{B}(\mathbb{R}^n)$, $B_2\in\mathcal{B}(\mathbb{R}^k)$ and $n,k\in\mathbb{N}$.
A: Infinite families of $\sigma$-algebras are said to be independent if all finite subfamilies are independent.  So for two families of random variables to be independent, I believe it is sufficient (and it is certainly necessary) that
$$
E[f(X_1,...,X_n)g(Y_1,...,Y_m)]=E[f(X_1,...,X_n)]\cdot E[g(Y_1,...,Y_m)]
$$
for any measurable functions $f$ and $g$ and for any finite sequences of variables $(X_i)$ and $(Y_i)$ drawn from the first and second families.
