# Hypothesis testing for variance

From a random sample $X_1;...;X_8\sim \mathcal N(3,σ^2)$, we would like to test whether the variance $σ^2$ can be considered to be at least $5$, against the hypothesis that it is less than 5. We have recorded $\sum_{i=1}^8 (x_i-3)^2 = 37.5$.

(i) Perform the relevant test at $1\%$ signicance level and conclude.

(ii) In terms of the cumulative distribution function of a known distribution, express the power of the test when (a) $σ^2 = 4$, (b) $σ^2 = 3$ and (c) $σ^2 = 2$.

(iii) Explain briefly what would change if we did not know the true mean in the population, but we had recorded the sample mean $x = 3$.

I got the answer for part i,the observed t-statistic is $7.5$ so do not reject the null hypothesis. But I have problem with part ii. I try to use the power method but it seems not working as in the statistic T there is only one variance $σ^2$, can anyone helps me out?

• I assume in part (ii), the question is still referring to the null hypothesis given in the problem description. Mar 7 '17 at 17:59

In order to understand the power computation, it will help to write out the original test in (1). I think it is bad for to call the test statistic $T$ because this has nothing to do with t tests or Student's t distribution; so I'll use $Q$.

Testing the null hypothesis at level $\alpha.$

You want to test $H_0: \sigma^2 \ge 5$ against the alternative $H_a: \sigma^2 < 5.$ Your estimate of the variance is $$V = \frac{1}{n}\sum_{i=1}^n (X_i - \mu)^2 = \frac{1}{8}\sum_{i=1}^8 (X_i - 3)^2 = \frac{37.5}{8} = 4.6875.$$

Thus your estimate $V < 5,$ but the question is whether it is enough smaller than $5$ to reject $H_0$ at the 1% level of significance.

The test statistic is

$$Q = \frac{nV}{\sigma_0^2} =\sum_{i=1}^8 \frac{(X_i - 3)^2}{\sigma_0^2} = \sum_{i=1}^8 \left(\frac{X_i - 3}{\sigma_0} \right)^2 = \sum_{i=1}^8 Z_i^2,$$ where $Z_i \stackrel{iid}{\sim} \mathsf{Norm}(0,1),$ because $\mu = 3$ is known. Thus $Q \sim \mathsf{Chisq}(df=8).$

We will reject $H_0$ for sufficiently small values of $Q.$ Specifically, the critical value $q^* = 1.646$ cuts 1% of the area from the lower tail of $\mathsf{Chisq}(8).$ So we reject $H_0$ at the $\alpha =1\%$ level of significance against the left-sided alternative if $Q < 1.646.$ (You can get $q^*$ from a suitable printed table of chi-squared distributions or by using software; the result from R statistical software is shown below.)

qchisq(.01, 8)
## 1.646497


In summary, we can write $\alpha = P\{Q = nV/\sigma_0^2 \le q^* = 1.65\; |\; \sigma_0^2 = 5\} = 0.01.$

Power against alternative $\sigma_a.$ In finding the critical value $q^*$ we have used the value of $\sigma = \sigma_0 = 5,$ specified by the $=$-sign in $H_0.$ One can find the power of the tests for any of the values $\sigma_a$ of $\sigma$ in the alternative hypothesis. Specifically, let's choose $\sigma_a = 2.$ The power is the probability of rejecting $H_0$ assuming that $\sigma = \sigma_a = 2.$

$\pi(\sigma_a=2) = P\{Q = nV/\sigma_0^2 \le q^* = 1.65\; |\; \sigma_0^2 = 2\} = ??.$

The test procedure and significance level $\alpha = .01$ remain the same. What is different is that the data $X_i$ are now a random sample from $\mathsf{N}(\mu = 3, \sigma^2 = 2).$ You no longer have $V = 4.6875.$ You are imagining new data, for which you no longer have $Q = nV/\sigma_0^2 \sim \mathsf{Chisq}(8).$ Your task in solving this problem is to decide how to take this change into account.

[I get $\pi(2) \approx 0.154.$ From simulation and from the R code below:]

 pchisq(qchisq(.01,8)*2.5, 8)
## 0.1535139


When $\mu$ is unknown. If $\mu$ is unknown, you would estimate it by $\bar X.$ Then the estimate of $\sigma^2$ would be $S^2 = \frac{1}{n-1}\sum_{i=1}^8 (X_i - \bar X)^2$ and $Q = (n-1)S^2/\sigma^2 \sim \mathsf{Chisq}(n - 1).$

• My problem is how to calculate the power, without using R. Could you show me how to calculate it? Mar 10 '17 at 9:23
• I have given you a page of notation and framework--and a numerical answer. It is still not a trivial problem. But I think you will learn something important--as a graduate student--by comparing what I have written with your text, and putting the pieces together for yourself on the 2nd part of the problem. Mar 10 '17 at 9:46