Professional Documents
Culture Documents
Power Power: Statistical Inference
Power Power: Statistical Inference
Power Power: Statistical Inference
Statistical Inference
· A type II error (a bad thing, as its name would suggest) is failing to reject the null hypothesis
when it's false; the probability of a type II error is usually called β
· Note Power = 1 − β
2/12
Notes
· Consider our previous example involving RDI
· H0 : µ = 30 versus Ha : µ > 30
· Then power is
ˉ − 30
> t1−α,n−1 | µ = µa )
X
P(
s/√n
3/12
Calculating power for Gaussian data
Assume that n is large and that we know σ
ˉ − 30
> z1−α | µ = µa )
X
1 − β = P(
σ/√n
ˉ − µ + µ − 30
> z1−α | µ = µa )
X a a
= P(
σ/√n
ˉ−µ
| µ = µa )
X a µ − 30
= P( > z1−α − a
σ/√n σ/√n
| µ = µa )
µa − 30
= P(Z > z1−α −
σ/√n
4/12
Example continued
· Suppose that we wanted to detect a increase in mean RDI of at least 2 events / hour (above 30).
· Assume normality and that the sample in question will have a standard deviation of 4;
· What would be the power if we took a sample size of 16 ?
- Z1−α = 1.645
- µa −30
−−
σ/√n
= 2/(4/√16 ) = 2
- P(Z > 1.645 − 2) = P(Z > −0.355) = 64%
## [1] 0.6387
5/12
Note
· Consider H0 : µ = µ0 and Ha : µ > µ0 with µ = µa under Ha .
√n(X ˉ −µ )
· Under H the statistic Z = 0
is N(0, 1)
0 σ
√n(µa −µ0 )
· Under H
a Z is N( σ , 1)
· We reject if Z > Z1−α
6/12
7/12
Question
· When testing Ha : µ > µ0, notice if power is 1 − β, then
| µ = µa ) = P(Z > zβ )
µa − µ0
1 − β = P(Z > z1−α −
σ/√n
√n(µa − µ0 )
z1−α − = zβ
σ
· Unknowns: µa , σ, n, β
· Knowns: µ0 , α
· Specify any 3 of the unknowns and you can solve for the remainder
8/12
Notes
· The calculation for Ha : µ < µ0 is similar
· For Ha : µ ≠ µ0 calculate the one sided power using α/2 (this is only approximately right, it
excludes the probability of getting a large TS in the opposite direction of the truth)
9/12
T-test power
· Consider calculating power for a Gossett's T test for our example
· The power is
ˉ−µ
> t1−α,n−1 | µ = µa )
X 0
P(
S/√n
10/12
Example
power.t.test(n = 16, delta = 2/4, sd = 1, type = "one.sample", alt = "one.sided")$power
## [1] 0.604
## [1] 0.604
## [1] 0.604
11/12
Example
power.t.test(power = 0.8, delta = 2/4, sd = 1, type = "one.sample", alt = "one.sided")$n
## [1] 26.14
## [1] 26.14
## [1] 26.14
12/12