In a sample $N(0, \sigma ^2)$ we have two hypothesis. $H_0: \sigma ^2 =16$ and $H_1: \sigma ^2 =4$
(a )For a sample of size n, find the form of the best critical region.
(b) If n = 10 and $\alpha = 0.10$, find the critical region and the power when $H_0$ is false.
(c) Whith the next sample: 0.05, 1.58, 1.41, -0.01, -0.40, -1.39, -1.78, 1.03, 1.27, 0.23; ¿Which hypothesis should be accepted?
a) I use the Neyman-Pearson Lemma:
$$\frac{L(16)}{L(4)} =\frac{\prod_{i=0}^n 1/\sqrt{32\pi} e^{\frac{-x_i^2}{32}}}{\prod_{i=0}^n 1/\sqrt{8\pi } e^{\frac{-x_i^2}{8}}} \le K$$
$$\iff \sum_{i=0}^n{X_i^2 \le c}$$
then $\gamma: $ Reject $H_0$ if $ \sum_{i=0}^n{X_i^2 \le c}$
thus the critical region is $C^*=\{(X_1,...,X_n) | \sum_{i=0}^n {X_i^2} \le c \}$
b)I think I should find the value of c using $P($Reject $ H_0 | H_a)$ and $\pi_\gamma (4) $ Is this correct?
In this case: $P($Reject $ H_0 | H_a) =P(\sum_{i=0}^n {X_i^2} \le c | \sigma^2=4)$ . Since $X_i^2=4(\frac{X_i}{2})^2 \sim$ Gamma$(1/2, 8)$ then $\sum_{i=0}^n {X_i^2} \sim$ Gamma $(5,8)$. If $\alpha=.1 $, c is the value of the quantile .1
c) $P($Reject $ H_0 | H_0) =P(\sum_{i=0}^n {X_i^2} \le c | \sigma^2=16)$ using the same argument in b) I get: $\sum_{i=0}^n {X_i^2} \sim$ Gamma $(5,32)$ and c=77.84, using the values $\sum_{i=0}^n {X_i^2}=12.47$ then $H_0 $ is rejected
