1 introduction to biostatistics (bio/epi 540) lecture 11: hypothesis testing acknowledgement: thanks...
Post on 20-Dec-2015
218 views
TRANSCRIPT
1
Introduction to Biostatistics
(BIO/EPI 540)
Lecture 11: Hypothesis Testing
Acknowledgement: Thanks to Professor Pagano (Harvard School of Public Health) for lecture material
2
No human investigation can be called true science without passing through mathematical tests.
Leonardo da Vinci (1452-1519) (in Treatise on Painting)
Testing
3
Sampling Paradigm
Population
Sample
Inference
μ,
σ
,S
4
Inference
•Sample mean is an estimate of
•Sample variance (S) is an estimate of
•Confidence intervals and hypothesis tests are equivalent techniques to quantify uncertainty in sample derived inferences regarding population parameters
μ
σ2
5
We know that cholesterol levels inUS men 20-24 yrs are normally distributed with σX 46 mg/100ml.
We obtain a sample of n=25 and want to infer μ.
Confidence Interval - Illustration
6
value of μ
Use of C.I. to infer value
7
IF 95% C.I.
200 mg/100ml (182,218)
Population mean = 211?
8
XIF 95% C.I.
200 mg/100ml (182,218)
190 mg/100ml (172,208)
Population mean = 211?
9
IF 95% C.I.
200 mg/100ml (182,218)
190 mg/100ml (172,208)
175 mg/100ml (157,193)
Population mean = 211?
10
Alternatively IF= 211 and = 46 and we take a sample of size n=25 from this pop.,then the Central Limit Theorem says that the sample mean is approx. normal with mean = 211 and std. dev. 46/5; i.e.
If true
11
Hypothesis Testing
Hypothesis Testing Trial by jury
12
Individual on trial. Is he/she innocent?
Evidence Trial
Hypothesis Testing & Trial by jury
13
Individual on trial. Is he/she innocent?
Evidence Trial
Person
Innocent Guilty
Hypothesis Testing & Trial by jury
14
Individual on trial. Is he/she innocent?
Evidence Trial
JuryPerson
Innocent Guilty
Not Guilty
Guilty
Hypothesis Testing & Trial by jury
15
Individual on trial. Is he/she innocent?
Evidence Trial
JuryPerson
Innocent Guilty
Not Guilty
Guilty
Hypothesis Testing & Trial by jury
16
Individual on trial. Is he/she innocent?
Evidence Trial
JuryPerson
Innocent Guilty
Not Guilty x
Guilty x
Hypothesis Testing & Trial by jury
17
Evidence Trial
JuryPerson
Innocent Guilty
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Evidence Trial
Hypothesis Testing
18
Trial
JuryPerson
Innocent Guilty
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Sample Trial
Hypothesis Testing
19
JuryPerson
Innocent Guilty
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
20
JuryPopulation
Innocent Guilty
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
21
JuryPopulation
= 0 Guilty
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
22
JuryPopulation
= 0 0
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
23
UsPopulation
= 0 0
Not Guilty x
Guilty x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
24
UsPopulation
= 0 0
Not reject x
Guilty x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
25
UsPopulation
= 0 0
Not reject x
Reject x
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
26
UsPopulation
= 0 0
Not reject Type II
Reject Type I
Test of Hypothesis that = 0? Sample Analysis
Hypothesis Testing
27
Probability of Type I error is i.e. the probability of rejecting the null hypothesis when it is true.
Probability of Type II error is i.e the probability of not rejectingthe null hypothesis when it is false.
1- is the power of the test.
Possible errors in analysis results
28
1o Hypothesize a value (0)
2o Take a random sample (n).
3o
Is it likely that the sample came from a population with mean 0
( = 0.05) ?
Hypothesis testing about :
29
We know that cholesterol levels inUS men 20-74 yrs are normally
distributed with σX 46 mg/100mland μ = 211. We obtain a random
sample of 12 hypertensive smokers and obtain a sample mean of 217
mg/100ml. We want to test whether their population mean is the same as that of the general population?
2 sided hypothesis test -Illustration
H0 : = 211
HA : 211
30
H0 : = 211
HA : 211 = 46 mg/100ml
12 hypertensive smokers have:
217 2110.45
n 46/ 12x
zm
s0- -
= = =/
217 mg/ 100mlx =
2 sided hypothesis test -Illustration
31
Some prefer to quote the p-value.The p-value answers the question,“What is the probability of get-ting as large, or larger, a Discrepancy given the null hypothesis is true?”
P-value
Question: Do hypertensive smokers have the same mean as the general population?
32
Rejecting the null hypothesis
• Assume a specific threshold of Type I error, α– Typically α = 0.05
• If p value < α Reject null
33
Some prefer to quote the p-value.The p-value answers the question,“What is the probability of get-ting as large, or larger, a Discrepancy given the null hypothesis is true?”
P-value
Answer: Do not reject the null hypothesis.No evidence that hypertensive smokers have a different mean than general population
34
Decide on statistic:
Determine which values of consonant with the hypothesisthat = 0 and which ones are not.
are
Look at and decide.
Summary
35
Need to set up 2 hypotheses to cover all possibilities for . Choice of 3 possibilities:
1. Two-sidedH0 : = 0
HA : 0
Alternative hypothesis
36
Blood glucose levelof healthy personshas = 9.7 mmol/Land = 2.0 mmol/L
H0 : 9.7
HA : > 9.7
Sample of 64 diabetics yields
Example - One-sided alternative
Do diabetics have blood glucose levels that are higher on averagewhen compared to the general population?
37
Blood glucose levelof healthy personshas = 9.7 mmol/Land = 2.0 mmol/L
H0 : 9.7
HA : > 9.7
n = 64
p-value << 0.001
Example - One-sided alternative
Answer: Reject the null hypothesis.Significant evidence that diabetics have a higher mean level of glucose when compared to the general population
38
Need to set up 2 hypotheses to cover all possibilities for . Choice of 3 possibilities:
Two-sidedH0 : = 0
HA : 0
One-sidedH0 : 0
HA : < 0
One-sidedH0 : 0
HA : > 0
Alternative hypothesis
39
Summary
• Hypothesis testing: – Type I and II errors– Power
• Two sided hypothesis test
• One sided hypothesis test