SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Introduction to sample size
and power calculations
How much chance do we have to
reject the null hypothesis when
the alternative is in fact true?
(what’s the probability of detecting
a real effect?)
Can we quantify how much
power we have for given
sample sizes?
study 1: 263 cases, 1241 controls

Null
Distribution:
difference=0.

Rejection region.
Any value >= 6.5
(0+3.3*1.96)
For 5% significance level,
one-tail area=2.5%

(Z α/2 = 1.96)
Power= chance of being in the
Clinically relevant region if the alternative
rejection
alternative: is true=area to the right of this
difference=10%. yellow)
line (in
study 1: 263 cases, 1241 controls
Rejection region.
Any value >= 6.5
(0+3.3*1.96)

Power here:
6.5 10
P( Z >
)=
3.3
P( Z > 1.06) = 85%

Power= chance of being in the
rejection region if the alternative
is true=area to the right of this
line (in yellow)
study 1: 50 cases, 50 controls

Critical value=
0+10*1.96=20

Z α/2 =1.96

2.5% area
Power closer to
15% now.
Study 2: 18 treated, 72 controls, STD DEV = 2
Critical value=
0+0.52*1.96 = 1

Clinically relevant
alternative:
difference=4 points

Power is nearly
100%!
Study 2: 18 treated, 72 controls, STD DEV=10
Critical value=
0+2.58*1.96 = 5

Power is about
40%
Study 2: 18 treated, 72 controls, effect size=1.0

Critical value=
0+0.52*1.96 = 1

Power is about
50%
Clinically relevant
alternative:
difference=1 point
Factors Affecting Power
1. Size of the effect
2. Standard deviation of the characteristic
3. Bigger sample size
4. Significance level desired
1. Bigger difference from the null mean
Null

Clinically
relevant
alternative

average weight from samples of 100
2. Bigger standard deviation

average weight from samples of 100
3. Bigger Sample Size

average weight from samples of 100
4. Higher significance level

Rejection region.

average weight from samples of 100
Sample size calculations




Based on these elements, you can write
a formal mathematical equation that
relates power, sample size, effect size,
standard deviation, and significance
level…
**WE WILL DERIVE THESE
FORMULAS FORMALLY SHORTLY**
Simple formula for difference
in means
Sample size in each
group (assumes equal
sized groups)

n=

Represents the
desired power
(typically .84 for
80% power).

2σ ( Z β + Zα/2 )

Standard
deviation of the
outcome variable

2

2

2

difference Represents the
Effect Size
(the difference
in means)

desired level of
statistical
significance
(typically 1.96).
Simple formula for difference
in proportions
Represents the
desired power
(typically .84 for
80% power).

Sample size in each
group (assumes equal
sized groups)

n=

2( p )(1 − p )( Z β + Zα/2 )

A measure of
variability (similar
to standard
deviation)

(p1 − p2 )
Effect Size
(the difference
in proportions)

2

2
Represents the
desired level of
statistical
significance
(typically 1.96).
Derivation of sample size
formula….
Study 2: 18 treated, 72 controls, effect size=1.0
Critical value= 0+.52*1.96=1

Power close to 50%
SAMPLE SIZE AND POWER FORMULAS
Critical value=
0+standard error (difference)*Zα/2

Power= area to right of Zβ =
Zβ =

critical value - alternative difference (here = 1)
standard error (diff)

e.g. here :Z β =

−0
; power = 50%
standard error (diff)
Power= area to right of Zβ =
Zβ =

critical value - alternative difference
standard error (diff)

Zα/2 * standard error (diff) - difference
Zβ =
standard error(diff)
Power is the area to the right of Z . OR
difference
Z β = Zα/2 −
power is the area to the left of - Z .
standard error(diff) Since normal charts give us the area to
the left by convention, we need to use
difference
- Z to get the correct value. Most
− Zβ =
− Zα/2 textbooks just call this “Z ”; I’ll use the
standard error(diff)
term Z
to avoid confusion.
β

β

β

β

Z power = − Z β 
→

power

the area to the left of Z power = the area to the right of Z β
All-purpose power formula…

Z power

difference
=
− Zα / 2
standard error(difference)
Derivation of a sample size
formula…
σ
σ
s.e.(diff ) =
+
n1 n2
2

2

Sample size is embedded in the
standard error….

σ
σ
if ratio r of group 2 to group 1 : s.e.(diff ) =
+
n1 rn1
2

2
Algebra…
∴ Z power =

Z power =

difference

σ2 σ2
+
n1 rn1

difference
(r + 1)σ 2
rn1
2

( Z power + Zα/2 ) = (

− Zα/2

− Zα/2

difference
(r + 1)σ 2
rn1

)2
( r + 1)σ ( Z power + Zα/2 ) = rn1 difference

2

rn1difference = ( r + 1)σ ( Z power + Zα/2 )

2

2

2

2

2

( r + 1)σ ( Z power + Zα/2 )
2

n1 =

2

rdifference 2

(r + 1) σ ( Z power + Zα/2 )
n1 =
2
r
difference
2

If r = 1 (equal groups), then n1 =

2

2σ 2 ( Z power + Zα/2 ) 2
difference 2
Sample size formula for
difference in means
(r + 1) σ ( Z power + Zα/2 )
n1 =
2
r
difference
2

2

where :
n 1 = size of smaller group
r = ratio of larger group to smaller group

σ = standard deviation of the characteristic
diffference = clinically meaningful difference in means of the outcome
Z power = corresponds to power (.84 = 80% power)
Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
Examples


Example 1: You want to calculate how much power
you will have to see a difference of 3.0 IQ points
between two groups: 30 male doctors and 30 female
doctors. If you expect the standard deviation to be
about 10 on an IQ test for both groups, then the
standard error for the difference will be about:

10 2 10 2
+
= 2.57
30
30
Power formula…
Z power

Zβ
Z power =

 

d*
=
− Zα / 2 =
σ (d *)

d*
2σ 2
n

− Zα / 2

d* n
=
− Zα / 2
σ 2

d*
3
d* n
3
− Zα / 2 =
− 1.96 = −.79 or Z power =
Zβ
− Zα / 2 =
σ (d *)
2.57
σ 2
10

P(Z≤ -.79) =.21; only 21% power to see a difference of 3 IQ points.

30
− 1.96 = −.79
2


Example 2: How many people would
you need to sample in each group to
achieve power of 80% (corresponds to
Zβ=.84)

n=

2σ 2 ( Z β + Z α / 2 ) 2
(d *) 2

100( 2)(.84 + 1.96) 2
=
= 174
2
(3)

174/group; 348 altogether
Sample Size needed for
comparing two proportions:
Example: I am going to run a case-control study
to determine if pancreatic cancer is linked to
drinking coffee. If I want 80% power to detect a
10% difference in the proportion of coffee
drinkers among cases vs. controls (if coffee
drinking and pancreatic cancer are linked, we
would expect that a higher proportion of cases
would be coffee drinkers than controls), how
many cases and controls should I sample?
About half the population drinks coffee.
Derivation of a sample size
formula:
The standard error of the difference of two proportions is:

p (1 − p ) p (1 − p )
+
n1
n2
Derivation of a sample size
formula:
Here, if we assume equal sample size and
that, under the null hypothesis proportions of
coffee drinkers is .5 in both cases and
controls, then
s.e.(diff)=

.5(1 − .5) .5(1 − .5)
+
= .5 / n
n
n
Z power

test statistic
=
− Zα / 2
s.e.(test statistic )

Z power =

.10
.5 / n

1.96
For 80% power…
.84 =

.10
.5 / n

.84 + 1.96 =

− 1.96
.10
.5 / n

.10 2 n
(.84 + 1.96) 2 =
.5
.5(.84 + 1.96) 2
∴n =
= 392
2
.10

There is 80% area to the
left of a Z-score of .84
on a standard normal
curve; therefore, there is
80% area to the right of
-.84.

Would take 392 cases and 392 controls to have 80% power!
Total=784
Question 2:
How many total cases and controls would I have
to sample to get 80% power for the same
study, if I sample 2 controls for every case?


Ask yourself, what changes here?
Z power =

test statistic
− Zα / 2
s.e.(test statistic)

p (1 − p ) p (1 − p )
.25 .25
.25 .5
.75
.75
+
=
+
=
+
=
=
2n
n
2n
n
2 n 2n
2n
2n
Different size groups…
.84 =

.10
.75 / 2n

− 1.96
.10

.84 + 1.96 =

.75 / 2n

(.10 2 ) 2n
(.84 + 1.96) =
.75
.75(.84 + 1.96) 2
∴n =
= 294
2
( 2).10
2

Need: 294 cases and 2x294=588 controls. 882 total.
Note: you get the best power for the lowest sample size if you keep both groups equal (882 > 784).
You would only want to make groups unequal if there was an obvious difference in the cost or ease of
collecting data on one group. E.g., cases of pancreatic cancer are rare and take time to find.
General sample size formula
s.e.(diff ) =

p (1 − p ) p (1 − p)
+
=
rn
n

p(1 − p ) rp(1 − p )
( r + 1) p (1 − p)
+
=
rn
rn
rn

2
r + 1 p (1 − p )( Z power + Z α / 2 )
n=
r
( p1 − p 2 ) 2
General sample size needs
when outcome is binary:
p (1 − p )( Z β + Zα / 2 ) 2
r +1
n=
2
r
( p1 − p2 )
where :
n = size of smaller group
r = ratio of larger group to smaller group
2σ 2 ( Z power + Z α / 2 ) 2
p1 − p2 = clinically meaningful difference in proportions of the outcome
n=
2

Z β = corresponds to power (.84 = 80% power)
(diff )

Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
Compare with when outcome
is continuous:
(r + 1) σ ( Z β + Zα/2 )
n1 =
2
r
difference
2

2

where :
n1 = size of smaller group
r = ratio of larger group to smaller group

σ = standard deviation of the characteristic
diffference = clinically meaningful difference in means of the outcome
Z β = corresponds to power (.84 = 80% power)
Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
Question


How many subjects would we need to sample
to have 80% power to detect an average
increase in MCAT biology score of 1 point, if
the average change without instruction (just
due to chance) is plus or minus 3 points
(=standard deviation of change)?
Standard error here=

σ change
n

=

3
n
Z power
Z power

test statistic
=
− Zα / 2
s.e.(test statistic )

D
=
− Zα / 2
σD
n

( Z power + Zα / 2 ) 2 =
2

n=

Where D=change
from test 1 to test
2. (difference)

nD

σD

2

σ D ( Z power + Zα / 2 )
D2

Therefore, need:
(9)(1.96+.84)2/1 =
70 people total

2

2
Sample size for paired data:
2

n=

σ d ( Z β + Zα/2 )
difference

2

2

where :
n = sample size
σ = standard deviation of the within - pair difference
diffference = clinically meaningful difference
Z β = corresponds to power (.84 = 80% power)
Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
Paired data difference in
proportion: sample size:
n=

p (1 − p )( Z β + Zα / 2 ) 2
( p1 − p2 )

2

where :
n = sample size for 1 group

p1 − p2 = clinically meaningful difference in)
2σ ( Z power + Z α / 2 dependent proportions
2

2

n=
Z β = corresponds to power (.84 = 80% power)
2
(diff )

Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)

Weitere ähnliche Inhalte

Was ist angesagt?

Fadama poultry management plus obj
Fadama poultry management plus objFadama poultry management plus obj
Fadama poultry management plus objDr Babatunde Bello
 
Viruela aviar
Viruela aviarViruela aviar
Viruela aviar920043
 
Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...
Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...
Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...Tata Naipospos
 
Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...
Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...
Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...HFG Project
 

Was ist angesagt? (6)

Avian Reo Virus
Avian Reo VirusAvian Reo Virus
Avian Reo Virus
 
Fadama poultry management plus obj
Fadama poultry management plus objFadama poultry management plus obj
Fadama poultry management plus obj
 
Bird biosecurity
Bird biosecurityBird biosecurity
Bird biosecurity
 
Viruela aviar
Viruela aviarViruela aviar
Viruela aviar
 
Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...
Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...
Persyaratan Pemasukan Sapi Dari Negara Berisiko Tinggi PMK - Pusat KH dan Keh...
 
Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...
Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...
Entomological Monitoring, Environmental Compliance, and Vector Control Capaci...
 

Andere mochten auch

Portfolio management sessions 1&2
Portfolio management sessions 1&2Portfolio management sessions 1&2
Portfolio management sessions 1&2Aakash Kulkarni
 
Overstated role of capital
Overstated role of capitalOverstated role of capital
Overstated role of capitalAakash Kulkarni
 
Crp fdi opportunities in dubai and its international attractiveness - aakash
Crp  fdi opportunities in dubai and its international attractiveness - aakashCrp  fdi opportunities in dubai and its international attractiveness - aakash
Crp fdi opportunities in dubai and its international attractiveness - aakashAakash Kulkarni
 
Proctergamble 090329014100-phpapp02
Proctergamble 090329014100-phpapp02Proctergamble 090329014100-phpapp02
Proctergamble 090329014100-phpapp02Aakash Kulkarni
 
Israel 100224205701-phpapp02
Israel 100224205701-phpapp02Israel 100224205701-phpapp02
Israel 100224205701-phpapp02Aakash Kulkarni
 
Banking without banks group 1
Banking without banks group 1Banking without banks group 1
Banking without banks group 1Aakash Kulkarni
 
Market efficiency and portfolio theory
Market efficiency and portfolio theoryMarket efficiency and portfolio theory
Market efficiency and portfolio theoryAakash Kulkarni
 
Introduction to business statistics
Introduction to business statisticsIntroduction to business statistics
Introduction to business statisticsAakash Kulkarni
 
Merger And Acquisition - Reasons for Failure and Counter Measures
Merger And Acquisition - Reasons for Failure and Counter MeasuresMerger And Acquisition - Reasons for Failure and Counter Measures
Merger And Acquisition - Reasons for Failure and Counter MeasuresAakash Kulkarni
 

Andere mochten auch (19)

Fdi india
Fdi   indiaFdi   india
Fdi india
 
Portfolio management sessions 1&2
Portfolio management sessions 1&2Portfolio management sessions 1&2
Portfolio management sessions 1&2
 
Us shut down
Us   shut downUs   shut down
Us shut down
 
Overstated role of capital
Overstated role of capitalOverstated role of capital
Overstated role of capital
 
Tuapr 2011 figures_web
Tuapr 2011 figures_webTuapr 2011 figures_web
Tuapr 2011 figures_web
 
Crp fdi opportunities in dubai and its international attractiveness - aakash
Crp  fdi opportunities in dubai and its international attractiveness - aakashCrp  fdi opportunities in dubai and its international attractiveness - aakash
Crp fdi opportunities in dubai and its international attractiveness - aakash
 
Poke yoke
Poke yokePoke yoke
Poke yoke
 
What is-six-sigma69
What is-six-sigma69What is-six-sigma69
What is-six-sigma69
 
Proctergamble 090329014100-phpapp02
Proctergamble 090329014100-phpapp02Proctergamble 090329014100-phpapp02
Proctergamble 090329014100-phpapp02
 
Israel 100224205701-phpapp02
Israel 100224205701-phpapp02Israel 100224205701-phpapp02
Israel 100224205701-phpapp02
 
Meddeb riad 29-04-08
Meddeb riad 29-04-08Meddeb riad 29-04-08
Meddeb riad 29-04-08
 
Plant location
Plant locationPlant location
Plant location
 
Banking without banks group 1
Banking without banks group 1Banking without banks group 1
Banking without banks group 1
 
9akk105151d0113 5 whys
9akk105151d0113 5 whys9akk105151d0113 5 whys
9akk105151d0113 5 whys
 
5 whys
5 whys5 whys
5 whys
 
Market efficiency and portfolio theory
Market efficiency and portfolio theoryMarket efficiency and portfolio theory
Market efficiency and portfolio theory
 
Asset pricing models
Asset pricing modelsAsset pricing models
Asset pricing models
 
Introduction to business statistics
Introduction to business statisticsIntroduction to business statistics
Introduction to business statistics
 
Merger And Acquisition - Reasons for Failure and Counter Measures
Merger And Acquisition - Reasons for Failure and Counter MeasuresMerger And Acquisition - Reasons for Failure and Counter Measures
Merger And Acquisition - Reasons for Failure and Counter Measures
 

Ähnlich wie Lecture11

Ähnlich wie Lecture11 (20)

The T-test
The T-testThe T-test
The T-test
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or VarianceEstimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance
 
lecture8.ppt
lecture8.pptlecture8.ppt
lecture8.ppt
 
Student t t est
Student t t estStudent t t est
Student t t est
 
Community Medicine Presentation
Community Medicine PresentationCommunity Medicine Presentation
Community Medicine Presentation
 
การสุ่มตัวอย่างในงานวิจัยสาธารณสุข
การสุ่มตัวอย่างในงานวิจัยสาธารณสุขการสุ่มตัวอย่างในงานวิจัยสาธารณสุข
การสุ่มตัวอย่างในงานวิจัยสาธารณสุข
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Chapter07.pdf
Chapter07.pdfChapter07.pdf
Chapter07.pdf
 
Sample size estimation
Sample size estimationSample size estimation
Sample size estimation
 
Statistics chm 235
Statistics chm 235Statistics chm 235
Statistics chm 235
 
Statistical analysis by iswar
Statistical analysis by iswarStatistical analysis by iswar
Statistical analysis by iswar
 
Statistics
StatisticsStatistics
Statistics
 
Chapter11
Chapter11Chapter11
Chapter11
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-test
 
non parametric tests.pptx
non parametric tests.pptxnon parametric tests.pptx
non parametric tests.pptx
 
Chapter12
Chapter12Chapter12
Chapter12
 
Mean, median, and mode ug
Mean, median, and mode ugMean, median, and mode ug
Mean, median, and mode ug
 
Normal Distribution
Normal DistributionNormal Distribution
Normal Distribution
 
Topic 1 part 2
Topic 1 part 2Topic 1 part 2
Topic 1 part 2
 

Mehr von Aakash Kulkarni

Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Aakash Kulkarni
 
The global business environment presentation slides - sessions 2-8
The global business environment   presentation slides - sessions 2-8The global business environment   presentation slides - sessions 2-8
The global business environment presentation slides - sessions 2-8Aakash Kulkarni
 
Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01
Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01
Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01Aakash Kulkarni
 
Introduction to business statistics
Introduction to business statisticsIntroduction to business statistics
Introduction to business statisticsAakash Kulkarni
 
Capstone presentation (2)
Capstone presentation (2)Capstone presentation (2)
Capstone presentation (2)Aakash Kulkarni
 

Mehr von Aakash Kulkarni (13)

Aakash Kulkarni
Aakash KulkarniAakash Kulkarni
Aakash Kulkarni
 
Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)
 
The global business environment presentation slides - sessions 2-8
The global business environment   presentation slides - sessions 2-8The global business environment   presentation slides - sessions 2-8
The global business environment presentation slides - sessions 2-8
 
Poli30 session14 2008
Poli30 session14 2008Poli30 session14 2008
Poli30 session14 2008
 
Cima certification dof
Cima certification dofCima certification dof
Cima certification dof
 
Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01
Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01
Pokayokefinalppt 1334856991612-phpapp01-120419123833-phpapp01
 
Mproof smpl 1
Mproof smpl 1Mproof smpl 1
Mproof smpl 1
 
Metabical
MetabicalMetabical
Metabical
 
Introduction to business statistics
Introduction to business statisticsIntroduction to business statistics
Introduction to business statistics
 
Class op sys
Class op sysClass op sys
Class op sys
 
Capstone presentation
Capstone presentationCapstone presentation
Capstone presentation
 
Capstone presentation (2)
Capstone presentation (2)Capstone presentation (2)
Capstone presentation (2)
 
Autocorrelation
AutocorrelationAutocorrelation
Autocorrelation
 

Kürzlich hochgeladen

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Lecture11

  • 1. Introduction to sample size and power calculations How much chance do we have to reject the null hypothesis when the alternative is in fact true? (what’s the probability of detecting a real effect?)
  • 2. Can we quantify how much power we have for given sample sizes?
  • 3. study 1: 263 cases, 1241 controls Null Distribution: difference=0. Rejection region. Any value >= 6.5 (0+3.3*1.96) For 5% significance level, one-tail area=2.5% (Z α/2 = 1.96) Power= chance of being in the Clinically relevant region if the alternative rejection alternative: is true=area to the right of this difference=10%. yellow) line (in
  • 4. study 1: 263 cases, 1241 controls Rejection region. Any value >= 6.5 (0+3.3*1.96) Power here: 6.5 10 P( Z > )= 3.3 P( Z > 1.06) = 85% Power= chance of being in the rejection region if the alternative is true=area to the right of this line (in yellow)
  • 5. study 1: 50 cases, 50 controls Critical value= 0+10*1.96=20 Z α/2 =1.96 2.5% area Power closer to 15% now.
  • 6. Study 2: 18 treated, 72 controls, STD DEV = 2 Critical value= 0+0.52*1.96 = 1 Clinically relevant alternative: difference=4 points Power is nearly 100%!
  • 7. Study 2: 18 treated, 72 controls, STD DEV=10 Critical value= 0+2.58*1.96 = 5 Power is about 40%
  • 8. Study 2: 18 treated, 72 controls, effect size=1.0 Critical value= 0+0.52*1.96 = 1 Power is about 50% Clinically relevant alternative: difference=1 point
  • 9. Factors Affecting Power 1. Size of the effect 2. Standard deviation of the characteristic 3. Bigger sample size 4. Significance level desired
  • 10. 1. Bigger difference from the null mean Null Clinically relevant alternative average weight from samples of 100
  • 11. 2. Bigger standard deviation average weight from samples of 100
  • 12. 3. Bigger Sample Size average weight from samples of 100
  • 13. 4. Higher significance level Rejection region. average weight from samples of 100
  • 14. Sample size calculations   Based on these elements, you can write a formal mathematical equation that relates power, sample size, effect size, standard deviation, and significance level… **WE WILL DERIVE THESE FORMULAS FORMALLY SHORTLY**
  • 15. Simple formula for difference in means Sample size in each group (assumes equal sized groups) n= Represents the desired power (typically .84 for 80% power). 2σ ( Z β + Zα/2 ) Standard deviation of the outcome variable 2 2 2 difference Represents the Effect Size (the difference in means) desired level of statistical significance (typically 1.96).
  • 16. Simple formula for difference in proportions Represents the desired power (typically .84 for 80% power). Sample size in each group (assumes equal sized groups) n= 2( p )(1 − p )( Z β + Zα/2 ) A measure of variability (similar to standard deviation) (p1 − p2 ) Effect Size (the difference in proportions) 2 2 Represents the desired level of statistical significance (typically 1.96).
  • 17. Derivation of sample size formula….
  • 18. Study 2: 18 treated, 72 controls, effect size=1.0 Critical value= 0+.52*1.96=1 Power close to 50%
  • 19. SAMPLE SIZE AND POWER FORMULAS Critical value= 0+standard error (difference)*Zα/2 Power= area to right of Zβ = Zβ = critical value - alternative difference (here = 1) standard error (diff) e.g. here :Z β = −0 ; power = 50% standard error (diff)
  • 20. Power= area to right of Zβ = Zβ = critical value - alternative difference standard error (diff) Zα/2 * standard error (diff) - difference Zβ = standard error(diff) Power is the area to the right of Z . OR difference Z β = Zα/2 − power is the area to the left of - Z . standard error(diff) Since normal charts give us the area to the left by convention, we need to use difference - Z to get the correct value. Most − Zβ = − Zα/2 textbooks just call this “Z ”; I’ll use the standard error(diff) term Z to avoid confusion. β β β β Z power = − Z β  → power the area to the left of Z power = the area to the right of Z β
  • 21. All-purpose power formula… Z power difference = − Zα / 2 standard error(difference)
  • 22. Derivation of a sample size formula… σ σ s.e.(diff ) = + n1 n2 2 2 Sample size is embedded in the standard error…. σ σ if ratio r of group 2 to group 1 : s.e.(diff ) = + n1 rn1 2 2
  • 23. Algebra… ∴ Z power = Z power = difference σ2 σ2 + n1 rn1 difference (r + 1)σ 2 rn1 2 ( Z power + Zα/2 ) = ( − Zα/2 − Zα/2 difference (r + 1)σ 2 rn1 )2
  • 24. ( r + 1)σ ( Z power + Zα/2 ) = rn1 difference 2 rn1difference = ( r + 1)σ ( Z power + Zα/2 ) 2 2 2 2 2 ( r + 1)σ ( Z power + Zα/2 ) 2 n1 = 2 rdifference 2 (r + 1) σ ( Z power + Zα/2 ) n1 = 2 r difference 2 If r = 1 (equal groups), then n1 = 2 2σ 2 ( Z power + Zα/2 ) 2 difference 2
  • 25. Sample size formula for difference in means (r + 1) σ ( Z power + Zα/2 ) n1 = 2 r difference 2 2 where : n 1 = size of smaller group r = ratio of larger group to smaller group σ = standard deviation of the characteristic diffference = clinically meaningful difference in means of the outcome Z power = corresponds to power (.84 = 80% power) Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
  • 26. Examples  Example 1: You want to calculate how much power you will have to see a difference of 3.0 IQ points between two groups: 30 male doctors and 30 female doctors. If you expect the standard deviation to be about 10 on an IQ test for both groups, then the standard error for the difference will be about: 10 2 10 2 + = 2.57 30 30
  • 27. Power formula… Z power Zβ Z power =   d* = − Zα / 2 = σ (d *) d* 2σ 2 n − Zα / 2 d* n = − Zα / 2 σ 2 d* 3 d* n 3 − Zα / 2 = − 1.96 = −.79 or Z power = Zβ − Zα / 2 = σ (d *) 2.57 σ 2 10 P(Z≤ -.79) =.21; only 21% power to see a difference of 3 IQ points. 30 − 1.96 = −.79 2
  • 28.  Example 2: How many people would you need to sample in each group to achieve power of 80% (corresponds to Zβ=.84) n= 2σ 2 ( Z β + Z α / 2 ) 2 (d *) 2 100( 2)(.84 + 1.96) 2 = = 174 2 (3) 174/group; 348 altogether
  • 29. Sample Size needed for comparing two proportions: Example: I am going to run a case-control study to determine if pancreatic cancer is linked to drinking coffee. If I want 80% power to detect a 10% difference in the proportion of coffee drinkers among cases vs. controls (if coffee drinking and pancreatic cancer are linked, we would expect that a higher proportion of cases would be coffee drinkers than controls), how many cases and controls should I sample? About half the population drinks coffee.
  • 30. Derivation of a sample size formula: The standard error of the difference of two proportions is: p (1 − p ) p (1 − p ) + n1 n2
  • 31. Derivation of a sample size formula: Here, if we assume equal sample size and that, under the null hypothesis proportions of coffee drinkers is .5 in both cases and controls, then s.e.(diff)= .5(1 − .5) .5(1 − .5) + = .5 / n n n
  • 32. Z power test statistic = − Zα / 2 s.e.(test statistic ) Z power = .10 .5 / n 1.96
  • 33. For 80% power… .84 = .10 .5 / n .84 + 1.96 = − 1.96 .10 .5 / n .10 2 n (.84 + 1.96) 2 = .5 .5(.84 + 1.96) 2 ∴n = = 392 2 .10 There is 80% area to the left of a Z-score of .84 on a standard normal curve; therefore, there is 80% area to the right of -.84. Would take 392 cases and 392 controls to have 80% power! Total=784
  • 34. Question 2: How many total cases and controls would I have to sample to get 80% power for the same study, if I sample 2 controls for every case?  Ask yourself, what changes here? Z power = test statistic − Zα / 2 s.e.(test statistic) p (1 − p ) p (1 − p ) .25 .25 .25 .5 .75 .75 + = + = + = = 2n n 2n n 2 n 2n 2n 2n
  • 35. Different size groups… .84 = .10 .75 / 2n − 1.96 .10 .84 + 1.96 = .75 / 2n (.10 2 ) 2n (.84 + 1.96) = .75 .75(.84 + 1.96) 2 ∴n = = 294 2 ( 2).10 2 Need: 294 cases and 2x294=588 controls. 882 total. Note: you get the best power for the lowest sample size if you keep both groups equal (882 > 784). You would only want to make groups unequal if there was an obvious difference in the cost or ease of collecting data on one group. E.g., cases of pancreatic cancer are rare and take time to find.
  • 36. General sample size formula s.e.(diff ) = p (1 − p ) p (1 − p) + = rn n p(1 − p ) rp(1 − p ) ( r + 1) p (1 − p) + = rn rn rn 2 r + 1 p (1 − p )( Z power + Z α / 2 ) n= r ( p1 − p 2 ) 2
  • 37. General sample size needs when outcome is binary: p (1 − p )( Z β + Zα / 2 ) 2 r +1 n= 2 r ( p1 − p2 ) where : n = size of smaller group r = ratio of larger group to smaller group 2σ 2 ( Z power + Z α / 2 ) 2 p1 − p2 = clinically meaningful difference in proportions of the outcome n= 2 Z β = corresponds to power (.84 = 80% power) (diff ) Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
  • 38. Compare with when outcome is continuous: (r + 1) σ ( Z β + Zα/2 ) n1 = 2 r difference 2 2 where : n1 = size of smaller group r = ratio of larger group to smaller group σ = standard deviation of the characteristic diffference = clinically meaningful difference in means of the outcome Z β = corresponds to power (.84 = 80% power) Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
  • 39. Question  How many subjects would we need to sample to have 80% power to detect an average increase in MCAT biology score of 1 point, if the average change without instruction (just due to chance) is plus or minus 3 points (=standard deviation of change)?
  • 40. Standard error here= σ change n = 3 n
  • 41. Z power Z power test statistic = − Zα / 2 s.e.(test statistic ) D = − Zα / 2 σD n ( Z power + Zα / 2 ) 2 = 2 n= Where D=change from test 1 to test 2. (difference) nD σD 2 σ D ( Z power + Zα / 2 ) D2 Therefore, need: (9)(1.96+.84)2/1 = 70 people total 2 2
  • 42. Sample size for paired data: 2 n= σ d ( Z β + Zα/2 ) difference 2 2 where : n = sample size σ = standard deviation of the within - pair difference diffference = clinically meaningful difference Z β = corresponds to power (.84 = 80% power) Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)
  • 43. Paired data difference in proportion: sample size: n= p (1 − p )( Z β + Zα / 2 ) 2 ( p1 − p2 ) 2 where : n = sample size for 1 group p1 − p2 = clinically meaningful difference in) 2σ ( Z power + Z α / 2 dependent proportions 2 2 n= Z β = corresponds to power (.84 = 80% power) 2 (diff ) Zα / 2 = corresponds to two - tailed significance level (1.96 for α = .05)

Hinweis der Redaktion

  1. It turns out that if you were to go out and sample many, many times, most sample statistics that you could calculate would follow a normal distribution. What are the 2 parameters (from last time) that define any normal distribution? Remember that a normal curve is characterized by two parameters, a mean and a variability (SD) What do you think the mean value of a sample statistic would be? The standard deviation? Remember standard deviation is natural variability of the population Standard error can be standard error of the mean or standard error of the odds ratio or standard error of the difference of 2 means, etc. The standard error of any sample statistic.