Professional Documents
Culture Documents
Rachel Glennerster
MIT
Sampling and Sample Size
Rachel Glennerster
MIT
Which of these most likely to describe
estimates from 8 well implemented RCTs?
I. II.
70%
A. I
B. II
C. Neither 15% 15%
A. B. C.
J - PAL | SAMPLING AND SAMPLE SIZE 4
Which is the best description of II?
I. II.
89%
A. Imprecise estimate
B. Biased estimate
C. Imprecise but unbiased
11%
0%
A. B. C.
J - PAL | SAMPLING AND SAMPLE SIZE 5
Bias and precision
estimates
truth
• Introduction
• Hypothesis testing
• What influences power?
• Power in clustered designs
• Calculating power in practice
• Introduction
• Hypothesis testing
• What influences power?
• Power in clustered designs
• Calculating power in practice
15%
A. Yes
5%
B. No
C. We cant tell
A. B. C.
Estimated effect
Estimated effect
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
100
90
80
70
60
Frequency
50
40
30
20
10
0
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
Difference
• Introduction
• Hypothesis testing
• What influences power?
• Power in clustered designs
• Calculating power in practice
0.5
0.45 β
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.5
0.45 0
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.5
0.45
True effect=H0
0.4
True effect=Hβ
0.35
H0 Hβ
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.5
0.45
0.4
True effect=H0
0.35
Hβ
True effect=Hβ
H0
0.3
P1
0.25
0.2
0.15
0.1
0.05
P2
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.4
H0 Hβ
0.35 True effect=H0
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.4
H0 0.35
0.3
Hβ True effect=H0
True effect=Hβ
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
How do we know?
Hypothesis Testing
• Traditionally significance
level is set at 5%
• This means allowing a 5%
chance of experiencing
Type I errors
• 5% of time we will say
program had impact
when in fact it didn’t
0.4
H0 0.35
0.3
Hβ True effect=H0
True effect=Hβ
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
H0 0.3
0.25
Hβ
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
J - PAL | SAMPLING AND SAMPLE SIZE Source: Effect Size FAQs blog 38
Four results from hypothesis testing
Underlying truth
Effect No effect
Power: when is effect No error
prob, find significance
Significant
Statistical test
No error
Not significant
J - PAL | SAMPLING AND SAMPLE SIZE Source: Effect Size FAQs blog 39
Four results from hypothesis testing
• Introduction
• Hypothesis testing
• What influences power?
• Power in clustered designs
• Calculating power in practice
H0 0.3
0.25
Hβ
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
1. Effect Size
• Hypothesized effect
0.5
size determines distance between
1 Standard
means 0.45 Error
0.4
True effect=H0
H0 0.35
0.3
Hβ True effect=Hβ
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
True effect=Hβ
0.4
Significance
H0 Hβ
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
True effect=H0
0.45
True effect=Hβ
0.4
H0 Hβ
Power
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.5
0.45 3*SE
0.4
True effect=H0
H0 0.35
0.3
Hβ True effect=Hβ
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.4 Power
H0 0.35
0.3
Hβ
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
3*SE
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
1 Standard
0.45
Error
0.4
True effect=H0
H0 Hβ
0.35
True effect=Hβ
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
True effect=H0
0.45
True effect=Hβ
0.4
H0 Hβ
Power
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
1. Effect Size
2. Sample Size
-4 -3 -2 -1 0 1 2 3 4 5 6
A. Reduce bias
B. Increase precision
C. Both
D. Neither 11%
E. Don’t know 0% 0% 0%
A. B. C. D. E.
J - PAL | SAMPLING AND SAMPLE SIZE 55
Increasing sample size
will …
Power 91%
83%
-4 -3 -2 -1 0 1 2 3 4 5 6
0.5
0.45
H0 Hβ
True effect=H0
0.4
True effect=Hβ
0.35
Significance
0.3
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
Significance
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
Power
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
Significance
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
Power
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
1. Effect Size
2. Sample Size
3. Variance
11%
6% 6% 6%
A. B. C. D. E.
J - PAL | SAMPLING AND SAMPLE SIZE 63
What does increased variation in population
do to our distribution of estimates curves?
6% 6%
0% 0%
A. B. C. D. E.
J - PAL | SAMPLING AND SAMPLE SIZE 64
Low variance sample
0.5
0.45
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
Significance
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
H0 Hβ
True effect=H0
0.35
True effect=Hβ
0.3
Power
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
True effect=H0
0.4
True effect=Hβ
0.35
Significance
H0 0.3
0.25
Hβ
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
Population
Treatment Control
Population
Treatment Control
1. Effect Size
2. Sample Size
3. Variance
4. Proportion of sample in T vs. C
0.45
H0 Hβ
0.4
Significance
0.25
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
H0 0.4
0.35
Hβ
0.3 True effect=H0
True effect=Hβ
0.25
Power
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
0.4
H0 Hβ
0.35
0.3
True effect=H0
0.25
True effect=Hβ
0.2
Significance
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
0.45
H0 Hβ
0.4
0.35
True effect=Hβ
0.25
Power
0.2
0.15
0.1
0.05
0
-4 -3 -2 -1 0 1 2 3 4 5 6
σ2 σ2
sd ( X 1 − X 2 ) = +
n1 n2
1 1 2
sd ( X 1 − X 2 ) = + = =1
2 2 2
1 1 4
sd ( X 1 − X 2 ) = + = = 1.15
3 1 3
J - PAL | SAMPLING AND SAMPLE SIZE 78
Power equation: MDE
Significance Variance
Level
Effect Size Power
σ
EffectSize = (t(1−κ ) + tα )*
2
1
*
P(1 − P ) N
Proportion in
Treatment Sample
Size
79
J - PAL | SAMPLING AND SAMPLE SIZE
Outline
• Introduction
• Hypothesis testing
• What influences power?
– Effect size
– Sample size
– Variance
– Proportion of sample in treatment vs. control
• Power in clustered designs
• Calculating power in practice
15%
5%
0%
A. B. C. D.
Treatment
J - PAL | SAMPLING AND SAMPLE SIZE 88
HIGH intra-cluster correlation (ρ)
Control
Population
Treatment
J - PAL | SAMPLING AND SAMPLE SIZE 89
Intra-cluster correlation definition
A. High
83%
B. Low
C. No effect on rho
D. Don’t know
17%
0% 0%
A. B. C. D.
16%
11%
A. B. C. D.
J - PAL | SAMPLING AND SAMPLE SIZE 93
Power with clustering
Significance
Effect Size Variance
Level
Power
σ
= (t(1−κ ) + tα )*
2
EffectSize 1
*
1 + ρ (m − 1) P(1 − P ) N
Proportion in
Average Treatment Sample
ICC Size
J - PAL |
Cluster Size
SAMPLING AND SAMPLE SIZE
94