# The power of chi-square test

Under the null hypothesis, if we have $$\sqrt{n} \vec{x} \, \rightarrow_d \, N(0, I_p),$$ the test statistic can be construct as: $$\hat{\Psi} = n \vec{x}^{\top} \vec{x} \, \rightarrow_d \,\chi^2_p.$$ And we reject the null hypothesis if $$\hat{\Psi} > \chi^2_{p, 1 - \alpha}$$ under level $$\alpha$$.

Now, if under the alternative hypothesis $$H_1$$, $$\sqrt{n} \left( \vec{x} - \vec{\mu} \right)\, \rightarrow_d \, N(0, \Sigma),$$ I want to know the power of using test statistic $$\hat{\Psi}$$, i.e. $$\mathrm{P} \left( \left. \hat{\Psi} > \chi^2_{p, 1 - \alpha} \right| H_1 \right) = ?$$

I know under $$H_1$$, $$\hat{\Psi}$$ can be decomposed as: $$\hat{\Psi} \, \rightarrow_d \, \sum_{j = 1}^p \xi_j^2, \quad \left( \xi_1, \cdots, \xi_p \right)^{\top} \, \sim \, N(\vec{\mu}, \Sigma),$$ but I don't know how to deal with this square sum. Can anyone help me? Thanks a lot!!

• It seems we cannot use the above method to calculate the power of this test. Since $n^{-1} \hat{\Psi} \, \rightarrow_p \, \vec{\mu}^{\top}\vec{\mu}$, I guess, under $H_1$, $n^{-1/2} \left( \hat{\Psi} - \vec{\mu}^{\top}\vec{\mu} \right)$ is asymptotically normal? So the power goes to 1 when $n \rightarrow \infty$, it that right?
– 香结丁
Jul 29, 2020 at 1:29

If $$\Sigma=I_p$$, then the distribution of $$\sum_{j=1}^p\xi_j^2$$ for $$(\xi_1,\cdots,\xi_p)^\top\sim N(\vec{\mu},\Sigma)$$ is the non-central chi-square distribution with $$p$$ degrees of freedom and non-centrality parameter $$\vec{\mu}^\top\vec{\mu}$$.

If $$\Sigma\ne I_p$$, then the distribution of $$\sum_{j=1}^p\xi_j^2$$ for $$(\xi_1,\cdots,\xi_p)^\top\sim N(\vec{\mu},\Sigma)$$ has no name or closed-form expression of its pdf or cdf -- even when $$\vec{\mu}=\vec0$$.

Responding to a comment by the OP: Let $$x_n:=\vec x$$ and $$\mu:=\vec\mu$$. If $$Z_n:=\sqrt n(x_n-\mu) \to_d Z\sim N(0,\Sigma), \tag{1}$$ then, for any fixed $$\mu\ne0:=\vec0$$, $$nx_n^\top x_n=(\sqrt n\mu+Z_n)^\top(\sqrt n\mu+Z_n) =n\mu_n^\top\mu_n+O_P(\sqrt n),$$ so that $$nx_n^\top x_n$$ converges in probability to $$\infty$$, rather than to a finite random variable.

To get a finite random variable in the limit, you need to consider alternative hypotheses close enough to the null one; that is, in this case, you need to consider nonzero alternative asymptotic mean vectors close enough to $$0$$. In particular, it will make sense to fix some $$\mu\ne0$$ and consider the alternative values $$\mu/\sqrt n$$ of the asymptotic mean.

So, now instead of (1) we are assuming that $$Z_n:=\sqrt n x_n-\mu=\sqrt n(x_n-\mu/\sqrt n) \to_d Z\sim N(0,\Sigma).$$ Then $$nx_n^\top x_n=(\mu+Z_n)^\top(\mu+Z_n)\to_d (\mu+Z)^\top(\mu+Z),$$ and $$\mu+Z\sim N(\mu,\Sigma)$$, so that the limit random variable $$(\mu+Z)^\top(\mu+Z)$$ will have the non-central chi-square distribution with $$p$$ degrees of freedom and non-centrality parameter $$\mu^\top\mu$$.

• Thanks so much. But is there a feasible method to tackle $$\mathrm{P} \left( \sum_{j = 1}^p \xi_j^2 > \chi_{p, 1 - \alpha}^2\right)$$ when $\Sigma \neq I_p$?
– 香结丁
Jul 29, 2020 at 0:38
• @香结丁 : As I said, if $\Sigma\ne I$, then little can be said even for $\vec\mu=\vec0$; see e.g. link.springer.com/article/10.1007%2Fs00440-003-0262-6 for some inequalities. Jul 29, 2020 at 1:09
• @ Iosif Appreciate your helping! It seems we cannot use this method to calculate the power. Since $n^{-1} \hat{\Psi} \, \rightarrow_p \, \vec{\mu}^{\top}\vec{\mu}$, I guess, under $H_1$, $n^{-1/2} \left( \hat{\Psi} - \vec{\mu}^{\top}\vec{\mu} \right)$ is asymptotically normal? It that right?
– 香结丁
Jul 29, 2020 at 1:24
• Thanks for your generous help! Now I know what I should do!
– 香结丁
Jul 30, 2020 at 1:40
• @香结丁 : As a relatively new user, you may want to look at these guidelines Jul 30, 2020 at 15:30