Two variances comparison test
What is-it?
A two variances test, also known as a test of two variances or a test of homogeneity of variances, is a statistical method used to compare the variability or dispersion of two independent samples or groups. It assesses whether the variances of two populations are significantly different from each other.
The two variances test is commonly used when working with continuous data and aims to determine if there is a significant difference in the spread of observations between two groups. It is often used to compare the variability of measurements or outcomes in different treatment groups, experimental conditions, or populations.
Data
Two independent samples \(j=1,2\): \(\left(x_{i,j}\right)_{i=1}^{n_j}\)
Assume that \(x_{i,j}\), \(i=1,\cdots,n_j\) is a realization of i.i.d. random variables \(X_{i,j}\), \(i=1,\cdots,n_j\)
\(\mu_j=\mathbb{E}\left[X_{i,j}\right]\)
\(\sigma_j^2=\mathbb{V}ar\left(X_{i,j}\right)\)
\(\overline{X}_j=\dfrac{1}{n_j}\sum_{i=1}^{n_j}X_{i,j}\)
\(S_j^2=\dfrac{1}{n_j}\sum_{i=1}^{n_j}\left(X_{i,j}-m_j\right)^2\) where
- \(m_j:=\overline{X}_j\) if \(\mu_j\) is unknown
- \(m_j:=\mu_j\) if \(\mu_j\) is known.
Hypothesis
\(\mathcal{H}_0\): \(\sigma_1^2=\sigma_2^2\)
Two-sided \(\mathcal{H}_1\): \(\sigma_1^2\neq\sigma_2^2\)
Left-sided \(\mathcal{H}_1\): \(\sigma_1^2<\sigma_2^2\)
Right-sided \(\mathcal{H}_1\): \(\sigma_1^2>\sigma_2^2\)
Test Statistic
If means are unknown: \(dof_j=n_j-1\)
If means are known: \(dof_j=n_j\)
\(\mathbb{X}_j^2=\dfrac{n_jS_j^2}{dof_j}\)
\(F=\dfrac{\mathbb{X}_1^2}{\mathbb{X}_2^2}\ \overset{\mathcal{H}_0}{\rightarrow}\ \mathcal{F}_{dof_1, dof_2}\) where
Critical region and P-value
Critical Region
Let \(q_{\alpha}=q_{\alpha}\left(\mathcal{F}_{dof_1,dof_2}\right)\)
Two-sided: \(W=\left(0, q_{\alpha/2}\right)\cup\left(q_{1-\alpha/2}, +\infty\right)\)
Left-sided: \(W=\left(0, q_{\alpha}\right)\)
Right-sided: \(W=\left(q_{1-\alpha}, +\infty\right)\)
P-value
Two-tailed: \(pValue=2\min\left[\mathbb{P}\left(F<F_{obs}\right), \mathbb{P}\left(F>F_{obs}\right)\right]\)
Left-tailed: \(pValue=\mathbb{P}\left(T<F_{obs}\right)\)
Right-tailed: \(pValue=\mathbb{P}\left(T>F_{obs}\right)\)
Decision
Decision based on Critical Region
- Reject \(\mathcal{H}_0\) if and only if \(F_{obs}\in W\)
Decision based on P-value
- Reject \(\mathcal{H}_0\) if and only if \(pValue<\alpha\)