已知 $X_1, X_2, \cdots, X_n$ 为来自总体的 $N\left(\mu_1, \sigma^2\right)$ 的简单随机样本, $Y_1, Y_2, \cdots Y_m$ 为来自总体的 $N\left(\mu_2, 2 \sigma^2\right)$ 的简单随机样本,且两样本相互独立,记
$$
\begin{gathered}
\bar{X}=\frac{1}{n} \sum_{i=1}^n X_i, \bar{Y}=\frac{1}{m} \sum_{i=1}^m Y_i, \\
S_1^2=\frac{1}{n-1} \sum_{i=1}^n\left(X_i-\bar{X}\right)^2, S_2^2=\frac{1}{m-1} \sum_{i=1}^m\left(Y_i-\bar{Y}\right)^2
\end{gathered}
$$
则( )
A. $\frac{S_1^2}{S_2^2} \sim F(n, m)$
B. $\frac{S_1^2}{S_2^2} \sim F(n-1, m-1)$
C. $\frac{2 S_1^2}{S_2^2} \sim F(n, m)$
D. $\frac{2 S_1^2}{S_2^2} \sim F(n-1, m-1)$