Professional Documents
Culture Documents
02 Permutation Test
02 Permutation Test
Kosuke Imai
Harvard University
Fall 2019
P(X, U | T = 1) = P(X, U | T = 0)
{X, U} ⊥
⊥T and in particular {Y (1), Y (0)} ⊥
⊥T
Does tea taste different depending on whether the tea was poured
into the milk or whether the milk was poured into the tea?
8 cups; n = 8
Randomly choose 4 cups into which pour the tea first (Ti = 1)
Null hypothesis: the lady cannot tell the difference
Sharp null – H0 : Yi (1) = Yi (0) for all i = 1, . . . , 8
Statistic: the number of correctly classified cups
The lady classified all 8 cups correctly!
Did this happen by chance?
0.5
1 M M T T
30
0.4
2 T T T T
probability
frequency
0.3
3 T T T T
20
4 M M T M
0.2
5 M 5 10
M M M
0.1
6 T T M M
0.0
0
7 T T M T
0 2 4 6 8 0 2 4 6 8
8 M M M M
correctly guessed 8 Number4of correctly6guessed cups Number of correctly guessed cups
90
80
Publication bias:
70
p-hacking
60
Frequency
file drawer bias
50
40
30
Potential solutions:
20
pre-registration
10
statistical control of
0
multiple testing 0.16 1.06 1.96 2.86 3.76 4.66 5.56 6.46 7.36 8.26 9.16 10.06 10.96 11.86 12.76 13.66
z-Statistic
Units: i = 1, . . . , n
Treatment: Ti ∈ {0, 1}
Outcome: Yi = Yi (Ti )
Total n1 n0
Analytical approximations:
n1 m mn0 n1 m
E(S | On ) = , and V(S | On ) = 1−
n n(n − 1) n
p
1 Normal: {S − E(S | On )}/ V(S | On ) ∼ N (0, 1)
2 Binomial(n1 , m/n)
Becomes accurate as n grows
0.012
0.008
0.008
Density
Density
0.004
0.004
0.000
0.000
400 500 600 700 800 900 400 500 600 700 800 900