Fixed-mean normal variance test (source code)

= Fixed-mean normal variance test
{title2=$\sum_iX_i^2\geq\sigma_0^2F_n^{-1}(1-\alpha)$}

For independent $N(0,\sigma^2)$ observations, testing a fixed variance against larger variances uses the sum of squares $S=\sum_iX_i^2$. The <likelihood ratio> for any simple larger variance is strictly increasing in $S$. The <Neyman-Pearson lemma> therefore gives the displayed rejection rule, where $F_n$ is the <chi-squared distribution> function with $n$ degrees of freedom. Its threshold is independent of the selected larger variance, so it is a <uniformly most powerful test> for the one-sided composite alternative. Its <power function> is $1-F_n((\sigma_0^2/\sigma^2)F_n^{-1}(1-\alpha))$, increasing continuously from zero to one and equaling $\alpha$ at the null. A known nonzero mean is handled by replacing each observation by its difference from that mean.