Tests of scale ST551 Lecture 15

So far …

Tests of center

Test/Procedure Parameter Setting
Z-test Population mean
t-test Population mean
Binomial exact test Population proportion (mean)
Binomial z-test Population proportion (mean)
Sign test Population median
Signed Rank test Population mean/median

Two tests of scale

  1. Chi-square test of variance

  2. t-test of variance

Chi-square test of variance

Chi-square test of variance

Population: Y some population distribution

Sample: n i.i.d from population, Y1,,Yn

Parameter: Population variance σ2=Var(Y)

Sample variance

The sample variance, s2=1n1i=1n(YiY¯)2

is an unbiased and consistent estimate of σ2.

Furthermore, if YN(μ,σ), it can be shown the sampling distribution of s2 is a scaled Chi-square distribution: (n1)s2σ2χ(n1)2

Using the sampling distribution to formulate a test

Assume the population distribution is N(μ,σ2).

Consider the null hypothesis H0:σ2=σ02.

Let the test statistic be: X(σ02)=(n1)s2σ02 What’s the distribution of the test statistic if the null hypothesis is true?

Rejection regions

For a test at level α:

  • HA:σ2>σ02: Reject H0 if X(σ02)>
  • HA:σ2<σ02: Reject H0 if X(σ02)<
  • HA:σ2σ02: Reject H0 if X(σ02)>
    or X(σ02)<

p-values: Your turn

Shade the area for the p-value when X(σ0)=20, with HA:σ2>σ02

Shade the area for the p-value when X(σ0)=20, with HA:σ2<σ02

p-values: Your turn

Shade the area for the p-value when X(σ0)=20, with HA:σ2σ02

p-values: In general

p-value is:

  • HA:σ2>σ02:
  • HA:σ2<σ02:
  • HA:σ2σ02:

where Xχ(n1)2

In R: P(Xx) = pchisq(x, df = n - 1)

Confidence interval

From inverting test statistic.

(1α)100% confidence interval

(s2(n1)χ(n1)2(1α/2),s2(n1)χ(n1)2(α/2))

What if the population isn’t Normal

(from Sarah Emerson’s slides F2016)

t-test of variance

t-test of variance

An alternative to the Chi-square test of variance, based on considering a transformed response:

Zi=(YiY¯)2i=1,,n

What is E(Z), are the Zi independent?

A CLT for the sample variance

The Zi aren’t independent but are weakly dependent, turns out there is a CLT for this case, as long as Z has finite fourth moment:

Z¯E(Z)Var(Z)/ndN(0,1)

Substitute in for E(Z) Z¯n1nσ2Var(Z)/ndN(0,1)

Leads to a t-test

We don’t know the population variance of the Z (transformed Y), so substitute sample estimate for it.

Under null hypothesis H0:σ2=σ02

t(σ02)=Z¯n1nσ02sZ2/n˙t(n1)

So to test the null H0:σ2=σ02, do a t-test on Zi=(YiY¯)2 with the null hypothesis H0:μZ=n1nσ02.

Performance of t-test of variance

Charlotte’s simulations, rejection rate of H0 for α=0.05.

  50 500 5000
Chi-square(10) 0.12 0.069 0.055
Exp(1) 0.177 0.084 0.072
t(5) 0.148 0.076 0.068
Uniform(0, 1) 0.057 0.057 0.042