Consider the hypothesis test in Example 8.30 for testing the variance:
$H_0: X$ is Gaussian with $\sigma_X^2=1$ and $m$ unknown
$H_1: X$ is Gaussian with $\sigma_X^2 \neq 1$ and $m$ unknown.
Let $n=16, \alpha=5 \%, \mu=0$. For $\sigma_X^2=k / 3, k=1,2, \ldots, 6$ perform the following experiment: Generate 500 batches of size 16 of the Gaussian random variable with zero mean and variance $\sigma_X^2$. For each batch determine whether the hypothesis test accepts or rejects the null hypothesis. Count the number of Type I errors and Type II errors. Plot the power function as a function of $\mu$. Compare to the expected results.