Mais fácil primeiro trabalhar com o caso em que os coeficientes de regressão são conhecidos e a hipótese nula, portanto, simples. Então a estatística suficiente é , onde z é o residual; sua distribuição sob o nulo também é um qui-quadrado com escala de σ 2 0 e com graus de liberdade iguais ao tamanho da amostra n .T=∑z2zσ20n
Escreva a razão das probabilidades em & σ = σ 2 e confirme que é uma função crescente de T para qualquer σ 2 > σ 1 :σ=σ1σ=σ2Tσ2>σ1
A função de razão de verossimilhança de log é
ℓ(σ2;T,n)−ℓ(σ1;T,n)=n2⋅[log(σ21σ22)+Tn⋅(1σ21−1σ22)]
, & directly proportional to T with positive gradient when σ2>σ1.
So by the Karlin–Rubin theorem each of the one-tailed tests H0:σ=σ0 vs HA:σ<σ0 & H0:σ=σ0 vs HA:σ<σ0 is uniformly most powerful. Clearly there's no UMP test of H0:σ=σ0 vs HA:σ≠σ0. As discussed hereσ>σ0 or that σ<σ0 when you reject the null.
σ=σ^σ, & σ=σ0:
Como σ^2=Tn
ℓ(σ^;T,n)−ℓ(σ0;T,n)=n2⋅[log(nσ20T)+Tnσ20−1]
This is a fine statistic for quantifying how much the data support HA:σ≠σ0 over H0:σ=σ0. And confidence intervals formed from inverting the likelihood-ratio test have the appealing property that all parameter values inside the interval have higher likelihood than those outside. The asymptotic distribution of twice the log-likelihood ratio is well known, but for an exact test, you needn't try to work out its distribution—just use the tail probabilities of the corresponding values of T in each tail.
If you can't have a uniformly most powerful test, you might want one that's most powerful against the alternatives closest to the null. Find the derivative of the log-likelihood function with respect to σ—the score function:
dℓ(σ;T,n)dσ=Tσ3−nσ
Evaluating its magnitude at σ0 gives a locally most powerful test of H0:σ=σ0 vs HA:σ≠σ0. Because the test statistic's bounded below, with small samples the rejection region may be confined to the upper tail. Again, the asymptotic distribution of the squared score is well known, but you can get an exact test in the same way as for the LRT.
Another approach is to restrict your attention to unbiased tests, viz those for which the power under any alternative exceeds the size. Check your sufficient statistic has a distribution in the exponential family; then for a size α test, ϕ(T)=1 if T<c1 or T>c2, else ϕ(T)=0, you can find the uniformly most powerful unbiased test by solving
E(ϕ(T))E(Tϕ(T))=α=αET
A plot helps show the bias in the equal-tail-areas test & how it arises:
At values of σ a little over σ0 the increased probability of the test statistics' falling in the the upper-tail rejection rejection doesn't compensate for the reduced probability of its falling in the lower-tail rejection region & the power of the test drops below its size.
Being unbiased is good; but it's not self-evident that having a power slightly lower than the size over a small region of the parameter space within the alternative is so bad as to rule out a test altogether.
Two of the above two-tailed tests coincide (for this case, not in general):
The LRT is UMP among unbiased tests. In cases where this isn't true the LRT may still be asymptotically unbiased.
I think all, even the one-tailed tests, are admissible, i.e. there's no test more powerful or as powerful under all alternatives—you can make the test more powerful against alternatives in one direction only by making it less powerful against alternatives in the other direction. As the sample size increases, the chi-squared distribution becomes more & more symmetric, & all the two-tailed tests will end up being much the same (another reason for using the easy equal-tailed test).
With the composite null hypothesis, the arguments become a little more complicated, but I think you can get practically the same results, mutatis mutandis. Note that one but not the other of the one-tailed tests is UMP!