Professional Documents
Culture Documents
I NTRODUCTION
We look at a rather basic problem: how many
i.i.d. samples N are required to decide that a discrete
distribution p, supported on m points, is nonuniform
in an L1 sense? More precisely, how large must the
sample size N be so that we may test between the null
hypothesis
H0 : pi 1/m
and the nonparametric alternative
HA :
m
X
i=1
N 1
m1
Eu (K1 ) = N
.
m
(1)
Now we will compare these two expectations by computing the difference Eu (K1 ) Ep (K1 ) =
"
N 1 X
N 1 #
m
m1
m
N
.
pi 1
(1 pi )
m
m1
i=1
After some approximations and an application of
Jensens inequality, we have the following key lower
bound on E(K1 ) in terms of the distance from uniformity :
Lemma 1.
p HA .
0.07
f(p)
bound
p
0.25
N 2 2
[1+O(N/m)]
Eu (K1 )Ep (K1 )
m
f(p)
bound
p
0.06
0.05
0.2
0.04
0.15
0.03
N 1 #
m
f (pi ) = pi 1
,
(1 pi )
m1
we have
Eu (K1 ) Ep (K1 ) = N
m1
m
N 1 X
m
f (pi ).
i=1
(2)
The function f (x) has a fairly simple form: f (0) = 0,
f (1/m) = 0, f (x) < 0 for 0 < x < 1/m, f (x) is
monotonically increasing for x > 1/m, and f (x)
x as x becomes large. However, f (x) is not convex.
To develop a lower bound on Eu (K1 ) Ep (K1 ), we
develop a convex lower bound on f (x), valid for all
x [0, 1] when N m:
0.1
0.02
0.05
0.01
0
0
0
0.1
0.2
0.3
0.02
0.04
p
0.06
X
i
X
i
f (pi )
X
i
"
c(pi 1/m)
#
X
f (pi ) c (
pi ) 1
i
f (pi );
f (pi )
X
i
X
i
g(|pi 1/m|).
1 X
|pi 1/m|
m i
g(/m),
f (pi ) mg(/m),
and therefore
this solution exists uniquely when m > N . The derivative f (1/m) is easily computed as
f (1/m) = (N 1)/(m 1),
Eu (K1 ) Ep (K1 ) N m
m1
m
N 1
g(/m).
A 2
z + o(z 2 ), z 0,
2
with
A
=
=
2 f (x)
x2 x=1/m
N 1
m
2(N 1)(1 x)N 2
m1
P
(i) 2
) =
symmetry we may write 12 E N
j=1 (S S
"
X
`
N
E{xi }1iN 1 p
pi pj 1(ni = 0 nj > 0)
2
ii,jm
#
+1(nj = 0 ni > 0)
=
x=1/m
i,j
2N + O(N 2 /m).
Nm
=
N 1
2
2
m1
2
[N + O(N /m)] 2 + o( 2 )
m
m
m
2 2
N
[1 + O(N/m)],
m
X
i6=j
X
i,j
pi pj (1pi pj )N 2 .
However, we found it inconvenient to bound this formula directly. Instead, we use the Efron-Stein inequality
(Steele, 1986)
X
i,j
m
X
j=1
pi pj (1 pi )
1 1
pj
1 pi
N 1 !
pi pj (1 pi )N 1 (1 pi pj )N 1
pj 1 (1 pj )N 1
1
m1
m
Eu (K1 ) Ep (K1 ) + N
N 1 !
m1
T Eu (K1 ) K1 = N
K1 > T ,
m
for some threshold T .
Theorem 3. The size of this test is
2
N
.
Pu (T T ) = O
mT2
The power is greater than
N
1 X
V ar(S) E
(S S (i) )2 ,
2 j=1
Pp (T T ) 1
Pp (T Ep (T ) < T Ep (T ))
Ep (T ) + O(N 2 /m)
,
(Ep (T ) T )2
again by lemma 2.
Now, by lemma 1, it is clear that for the size to tend
to zero and the power to tend to one, it is sufficient that
the z-score
1/2
2 4
N 2 2 /m
N /m
=
1 + 2
(N 2 /m + N 2 2 /m)1/2
tends to infinity. Since 0 < 2, and 4 /(1 + 2 ) 4
for [0, 2], the proof is complete.
L OWER BOUND
The theorem above states that N 2 4 /m is
a sufficient condition for the existence of a uniformly
consistent test of H0 vs. HA . The following result is a
converse:
Theorem 4. If N 2 4 < m log 5, then no test reliably
distinguishes H0 from HA ; more precisely, for any test
with critical region B and size bounded away from one,
the minimum power
Z
inf
p(x)dx
pHA
,
u(~x)
q(~
x
)d(q)
qHA
with
N
Y
dQz
(~x) =
(1 + G(xj , z)),
du
j=1
N
X
X
X
m/2
1+
G(xj , z) +
= 2
G(xj , z)G(xj , z) + . . . ,
(~x)
j=1
j>j
X X
X
(1)2 = 2m
1+
G(xj , z)+
G(xj , z)G(xj , z )+. . . .
z,z
j>j
m/2
22 X
v(zi , zi ),
m i=1
j>j
XY
z,z
(1 + Hj (z, z )) 1.
6) Finally, we compute
Ez,z exp
Hj (z, z )
1
exp
2
2N 2
m
m/2
1
2N 2
exp
2
m
u2
2
to obtain
Ez,z exp
Hj (z, z )
i=2,4,...m
i=2,4,...m
(1 + )ni1 (1 )ni
i=2,4,...m
Y
X
(1 + Hj (z, z )) exp
Hj (z, z ) .
j
exp
N 2 4
m
2 4
1/2
N
||Q u||1 exp
1
m
2 mi
(1 )
i=2,4,...m
1+
!
di 2
+
2
!
!
di 4
+ ... ,
4