Professional Documents
Culture Documents
Power & Sample Size - Lecture17a
Power & Sample Size - Lecture17a
Power & Sample Size - Lecture17a
H0 = Null Hypotheses
Ha = Alternative Hypotheses
Hypotheses always pertain to population
parameters or characteristics rather than
to sample characteristics.
It is the population, not the sample, that
we want to make an infernece about from
limited data
Hypothesis Testing
Making statement(s) regarding unknown population
parameter values based on sample data.
Null Hypothesis (H0):
The accepted explanation, status quo.
This is what we're trying to disprove.
Error:
Type 1 : Reject H0 when H0 is really true
Type II : Fail to reject H0 when H0 is really false
Error Rates and Power
Test Result
True State
H0 True H0 False
H0 True Correct Decision Type I error
H0 False Type II error Correct Decision
0.025 0.025
0.05
0.05
Steps of Hypothesis Testing
The following steps are used in hypothesis testing:
1. Identify the problem: objectives.
2. Translate these into H0 and H1.
3. Set up the rejection region.
4. Calculate the test statistic.
5. Draw the conclusion: reject or fail to reject H0 .
6. Interpret the results: say in words what the
conclusion means in terms of the objectives.
Interpretation of P-value
In the research literature, results of statistical tests
are usually reported using the p-value.
The p-value provides an objective measure of the
strength of evidence which the data supplies in
favor of the null hypothesis.
It is the probability of getting a result as extreme
or more extreme than the one observed if the
proposed null hypothesis is correct.
A small p-value provides evidence against the null
hypothesis, because data have been observed that
would be unlikely if the null hypothesis were correct.
Thus we reject the null hypothesis when the p-value
is sufficiently small.
Statistical Tests for Continuous Data
Normal/Large Sample Data?
No
t test t test
pooled variance unequal variance
Z Test Statistic
Want to test continuous outcome
Known variance
Under H0 X 0
~ N (0,1)
n
Therefore,
X 0
Reject H0 if 1.96 Two sided =0.05 test
/ n
Reject H0 if X 0 1.96 or
n
X 0 1.96
n
Testing Statistical Hypotheses – example
Suppose H0: =75; Ha: 75. Assume =10 & population is
normal, so sampling distribution of means is known (to be
normal). We get data
N 100; X 80
Null distribution
Alternate distribution
Effect Size
Type I and II Errors
This is part of H1
Type I and II Errors
This is part of H1
Type I and II Errors
This is part of H0
Type I and II Errors
This is part of H0
Power of a statistical test
Power = 1 -
Power of a statistical test
=0.2
=0.05
Power = 0.8
Impact of decreasing
> 0.2
=0.02
Impact of increasing
< 0.2
> 0.05
Impact of increasing sample size
Impact of increasing Effect Size
=0.2
=0.05
Effect Size
Impact of increasing Effect Size
1
Probability
0
- 0 +
Difference
Example
A drug company wants to know if a new drug B will be more effective
than the current drug A. Running clinical trials comparing A to B are
expensive and they are only budgeted to run a trial with at most 10 patients
in each group. Is running the trial worthwhile?
1 2
Effect Size=
Sample Size Calculations for Fixed Power
Step 1 - Define an important difference in means:
– Case 1: approximated from prior experience or pilot study -
difference can be stated in units of the data
– Case 2: unknown - difference must be stated in units of standard
deviations of the data
( Z Z
2
n for the one-side test, and
( Z / 2 Z
2
n for the two-side test.
Example
We need to estimate the average blood glucose among
diabetic patients. Normal fasting glucose level is about
100 mg/dl. Estimated standard deviations is 20 mg/dl.
Calculate the sample size needed to detect a difference
of 20 mg/dl. Desired Power = 0.80, = 0.05
( Z / 2 Z
2
n
z / 2 1.96 z z.20 .84
20(1.96 0.84)
2
n 7.84
20
Paired Observations Example
Below is data acquired by Mazze el al. (1971) that deals
with the pre-operative and post-operative creatinine
clearance (ml/min) of six patients anesthetized by halothane.
Patients
Time 1 2 3 4 5 6
Pre-operative 110 101 61 73 143 118
Post-operative 149 105 162 93 143 100
Difference 39 4 101 20 0 -18
( Z Z
2
n
42(1.645 0.842
2
n 48.49
15
( Z / 2 Z )
2
n
42(1.96 0.842
2
n 61.55
15
Two-Sample Tests
Assume that each sample has a normal distribution with
mean and variance 2. The true levels of I and C for
the intervention and control groups are not known, but it is
assumed that 2 is known. The sample size per group can
be calculated as
( Z Z )
2
( Z / 2 Z )
2
H0: I - C =0
HA: I - C 0
( Z / 2 Z )
2
50(1.96 1.282)
2
n 2 2 526.33
10
Independent?
Yes No
n
Z p0 (1 p0 ) Z p(1 p )
2
( p p0 ) 2
Example
n
1.96 0.5(1 0.5) 0.8416 0.6(1 0.6)
2
194
(0.6 0.5) 2
Sample Size for two Proportion
n
Z 2 p(1 p ) Z pT (1 pT ) pC (1 pC )
2
2
pT pC
p
2
pT pC or pC pT
n
1.96 2(.27)(1 .27) 1.28 .24(1 .24) .30(1 .30)
2
1149
(.30 .24) 2