SlideShare a Scribd company logo
1 of 36
HYPOTHESIS TESTINGHYPOTHESIS TESTING
Dr Htin Zaw SoeDr Htin Zaw Soe
MBBS, DFT, MMedSc (P & TM), PhD, DipMedEdMBBS, DFT, MMedSc (P & TM), PhD, DipMedEd
Associate ProfessorAssociate Professor
Department of BiostatisticsDepartment of Biostatistics
University of Public Health, YangonUniversity of Public Health, Yangon
 HypothesisHypothesis: A statement about one or more population: A statement about one or more population
A hospital administrator – Average length of stay (LOS) – 5 daysA hospital administrator – Average length of stay (LOS) – 5 days
A public health nurse – HE program- effectiveA public health nurse – HE program- effective
A physician – Effect of drug in treatment – 90% curedA physician – Effect of drug in treatment – 90% cured
 Types hypothesisTypes hypothesis
- Research hypothesis- Research hypothesis
- Statistical hypothesis- Statistical hypothesis
Research hypothesisResearch hypothesis: The conjecture or supposition that: The conjecture or supposition that
motivates the researchmotivates the research
It directly leads to statistical hypothesisIt directly leads to statistical hypothesis
Statistical hypothesesStatistical hypotheses : Hypotheses that are stated in such a: Hypotheses that are stated in such a
way that they may be evaluated by appropriateway that they may be evaluated by appropriate statisticalstatistical
techniquestechniques
 Steps in Hypothesis Testing:Steps in Hypothesis Testing:
1. Data1. Data
2. Assumption2. Assumption
3. Hypothesis3. Hypothesis
4. Test statistic4. Test statistic
5. Distribution of test statistic5. Distribution of test statistic
6. Decision rule6. Decision rule
7.Calculation of test statistic7.Calculation of test statistic
8. Statistical decision8. Statistical decision
9. Conclusion9. Conclusion
10.10. pp valuevalue
1.1. Data:Data: count or measurecount or measure
2.2. Assumption:Assumption: Normality of pop, equality of variance,Normality of pop, equality of variance,
independence of sampleindependence of sample
3.3. Hypothesis:Hypothesis:
Null Hypothesis is hypothesis to be tested, designated byNull Hypothesis is hypothesis to be tested, designated by HH00
Also called ‘Also called ‘Hypothesis of no differenceHypothesis of no difference’’
Alternative Hypothesis (Research hypothesis) (Alternative Hypothesis (Research hypothesis) (HHAA))
Rule for stating statistical hypothesis:Rule for stating statistical hypothesis:
Can we conclude that a certain pop. mean is not 50?Can we conclude that a certain pop. mean is not 50?
HH00 :: µ = 50µ = 50 HHAA :: µ ≠ 50µ ≠ 50
Can we conclude that a certain pop. mean greater than 50?Can we conclude that a certain pop. mean greater than 50?
HH00 :: µ ≤ 50µ ≤ 50 HHAA :: µ > 50µ > 50
Can we conclude that a certain pop. mean less than 50?Can we conclude that a certain pop. mean less than 50?
HH00 :: µ ≥ 50µ ≥ 50 HHAA :: µ < 50µ < 50
SummarySummary
(a) What you hope or expect is alternative hypothesis(a) What you hope or expect is alternative hypothesis
(b) Null hypothesis should contain statement of equality, either(b) Null hypothesis should contain statement of equality, either
= ,= , ≤, or ≥≤, or ≥
(c)(c) Null hypothesis is hypothesis that is testedNull hypothesis is hypothesis that is tested
(d) Null hypothesis and alternative hypothesis are(d) Null hypothesis and alternative hypothesis are
complementary (ie the two together exhaust all possibilities)complementary (ie the two together exhaust all possibilities)
 A Precaution:A Precaution:
Hypothesis testing / statistical inferenceHypothesis testing / statistical inference ≠ proof of hypothesis in≠ proof of hypothesis in
generalgeneral
Hypothesis is just supported/not supported byHypothesis is just supported/not supported by available dataavailable data
If we fail to rejectIf we fail to reject HH00 wewedo not say it is true, but itdo not say it is true, but it may be truemay be true
4.4. Test statisticTest statistic
-- Statistic computed from data of sampleStatistic computed from data of sample
- Decision maker (reject or not reject depends on magnitude of- Decision maker (reject or not reject depends on magnitude of
test statistic)test statistic)
eg. the quantity ,eg. the quantity , z = x -z = x - µµ00 // σσ √ n√ n
[[µµ00 == hypothesized value of pop. mean]hypothesized value of pop. mean]
General formula for test statisticGeneral formula for test statistic
test statistic = (relevant statistictest statistic = (relevant statistic –– hypothesized parameter) / SEhypothesized parameter) / SE
of relevant statisticof relevant statistic
5.5. Distribution of test statisticDistribution of test statistic
Sampling distribution is the key to statistical inferenceSampling distribution is the key to statistical inference
eg. Distribution ofeg. Distribution of z = x -z = x - µµ00 // σσ √ n√ n follows standard normalfollows standard normal
distribution ifdistribution if HH00 is true and assumptions are metis true and assumptions are met
 6. Decision rule6. Decision rule
Value of test statistic – in rejection region or non-rejectionValue of test statistic – in rejection region or non-rejection
Values of test statistic formingValues of test statistic forming rejection regionrejection region are those valuesare those values
that are less likely to occur ifthat are less likely to occur if HH00 is trueis true
Values of test statistic formingValues of test statistic forming acceptance regionacceptance region are those valuesare those values
that are more likely to occur ifthat are more likely to occur if HH00 is trueis true
Whether reject or not rejectWhether reject or not reject the vthe value of test statistic that wealue of test statistic that we
compute from our samplecompute from our sample
→→ RejectReject the vthe value in rejection regionalue in rejection region
→→ Not rejectNot reject the vthe value in non-rejection regionalue in non-rejection region
 Significant levelSignificant level: The level of significance: The level of significance αα is a probability and,is a probability and,
in fact, isin fact, is the probability of rejecting a true null hypothesisthe probability of rejecting a true null hypothesis
Rejecting a true HRejecting a true H00 →→ an error madean error made →→ SoSo αα is set smallis set small
GenerallyGenerally αα is set 0.01, 0.05 and 0.1is set 0.01, 0.05 and 0.1
 Types of errorsTypes of errors
Condition of Null HypothesisCondition of Null Hypothesis
TrueTrue FalseFalse
PossiblePossible - Fail to reject H- Fail to reject H00 Correct actionCorrect action Type II errorType II error
ActionAction - Reject H- Reject H00 Type I errorType I error Correct actionCorrect action
Type I error =Type I error = αα
Type II error =Type II error = ββ
 7.Calculation of test statistic7.Calculation of test statistic
Using data in a sample, a value of test statistic is computed andUsing data in a sample, a value of test statistic is computed and
compared with rejection and non-rejection regionscompared with rejection and non-rejection regions
 8. Statistical decision8. Statistical decision
RejectReject HH00 if computed value falls in rejection region and viceif computed value falls in rejection region and vice
versaversa
9. Conclusion9. Conclusion
IfIf HH00 is rejected, we conclude thatis rejected, we conclude that HHAA is trueis true
IfIf HH00 is not rejected, we conclude thatis not rejected, we conclude that HH00 may bemay be truetrue
10.10. pp valuevalue
It shows how unusual our sample results are, given thatIt shows how unusual our sample results are, given that HH00 is true.is true.
pp value indicating that sample results are not likely to havevalue indicating that sample results are not likely to have
occurred, ifoccurred, if HH00 is true, provides justification for doubt about truthis true, provides justification for doubt about truth
 Purpose of hypothesis testing:Purpose of hypothesis testing:
To assist administrators and clinicians in making decision.To assist administrators and clinicians in making decision.
Usually administrators and clinicians depend on statisticalUsually administrators and clinicians depend on statistical
decision.decision.
Outcome of statistical test is only one piece of evidences thatOutcome of statistical test is only one piece of evidences that
influences them. Statistical decision should not be interpretedinfluences them. Statistical decision should not be interpreted
as definitive, and consider with other relevant information.as definitive, and consider with other relevant information.
 I. Hypothesis testing: A single population meanI. Hypothesis testing: A single population mean
Hypothesis testingHypothesis testing under three conditionsunder three conditions
(a)(a) Sampling from normally distributed populations:Sampling from normally distributed populations: σσ22
knownknown
(b)(b) Sampling from a normally distributed populations:Sampling from a normally distributed populations: σσ22
unknownunknown
(c)(c) Sampling from aSampling from a non-normallynon-normally distributed populationdistributed population
(a) Sampling from normally distributed populations:(a) Sampling from normally distributed populations: σσ22
knownknown
Example 1Example 1: Researchers interested in mean age of a certain: Researchers interested in mean age of a certain
pop. They are asking the question: Can we conclude that meanpop. They are asking the question: Can we conclude that mean
age of that pop. is different from 30 years?age of that pop. is different from 30 years?
 Answer 1:Answer 1:
1. Data. A random sample of 10 subjects drawn from pop.1. Data. A random sample of 10 subjects drawn from pop.
Sample mean age (x) is 27 yearsSample mean age (x) is 27 years
σσ22
is 20is 20
2. Assumption: The sample comes from pop whose ages are2. Assumption: The sample comes from pop whose ages are
normally distributednormally distributed
3. Hypothesis:3. Hypothesis:
HHoo :: µ = 30µ = 30
HHAA :: µ ≠ 30µ ≠ 30
4. Test statistic:4. Test statistic:
z = (x -z = (x - µ) / (µ) / ( σσ / √/ √ n)n)
 5. Distribution of test statistic: Based on knowledge of sampling5. Distribution of test statistic: Based on knowledge of sampling
dist. anddist. and normal distnormal dist., test statistic is normally distributed with., test statistic is normally distributed with
mean, zero and variance, 1.mean, zero and variance, 1.
 6. Decision rule:6. Decision rule:
αα is set at 0.05is set at 0.05
If the computed value of test statistic is eitherIf the computed value of test statistic is either ≥≥ 1.961.96 oror ≤≤ -1.96-1.96
HHoo will be rejected.will be rejected.
[ Critical value = the value of[ Critical value = the value of test statistic that separate thetest statistic that separate the
rejection region and non-rejection region] [rejection region =rejection region and non-rejection region] [rejection region =
critical region]critical region]
7. Calculation of7. Calculation of test statistic:test statistic:
z = (x -z = (x - µ) / (µ) / ( σσ / √/ √ n)n)
= (27 - 30= (27 - 30) / ( 20) / ( 20 / √ 10/ √ 10))
= - 2.12= - 2.12
8. Statistical decision: Since -2.12 is in rejection region, H8. Statistical decision: Since -2.12 is in rejection region, Hoo isis
rejectedrejected
9. Conclusion: We conclude that9. Conclusion: We conclude that µµ is not equal to 30 yearsis not equal to 30 years
10.10. pp value:value:
pp value is 0.0170 + 0.0170 = 0.0340value is 0.0170 + 0.0170 = 0.0340
Definition:Definition:
TheThe pp value for a hypothesis test is the probability of obtaining,value for a hypothesis test is the probability of obtaining,
whenwhen HHoo isis true, a value of the test statistic as extreme as ortrue, a value of the test statistic as extreme as or
more extreme (in direction supportingmore extreme (in direction supporting HHAA) than the one actually) than the one actually
computed.computed.
 TestingTesting HHoo by means of a confidence intervalby means of a confidence interval
Hypothesis:Hypothesis:
HHoo :: µ = 30µ = 30
HHAA :: µ ≠ 30µ ≠ 30
x ± zx ± z(1-(1-αα/2)/2) σσxx
= 27 ± 1.96= 27 ± 1.96 σσxx
= 27 ± 1.96= 27 ± 1.96 √√σσ22
/n/n
= 27 ± 1.96= 27 ± 1.96 √20√20/10/10
= 27= 27 ± 1.96 (1.412)± 1.96 (1.412)
= 27= 27 ± 2.7718± 2.7718
24.2282, 29.771824.2282, 29.7718
Interval does not include 30. SoInterval does not include 30. So HHoo is rejectedis rejected
 One-sided Hypothesis Tests:One-sided Hypothesis Tests:
 Two-sided testTwo-sided test → rejection region is split into two sides of→ rejection region is split into two sides of
distribution of test statisticdistribution of test statistic
 One-sided testOne-sided test → rejection region is in one or other side of→ rejection region is in one or other side of
distribution of test statisticdistribution of test statistic
 Two or one sided is depend on the nature of question raised by theTwo or one sided is depend on the nature of question raised by the
researcherresearcher
Example 2Example 2: Can we conclude that: Can we conclude that µ < 30? (instead of µ ≠ 30)µ < 30? (instead of µ ≠ 30)
1. Data… etc1. Data… etc
2. Assumption… etc2. Assumption… etc
3. Hypothesis3. Hypothesis
HHoo :: µ ≥ 30µ ≥ 30
HHAA :: µ < 30µ < 30
4.4. Test statistic:Test statistic:
z = (x -z = (x - µ) / (µ) / ( σσ / √/ √ n)n)
5. Distribution of test statistic… etc5. Distribution of test statistic… etc
6. Decision6. Decision
One-sided test. SoOne-sided test. So αα is in one side of distribution (at lower tail)is in one side of distribution (at lower tail)
(see fig.)(see fig.)
If computed value is < critical value (- 1.645),If computed value is < critical value (- 1.645), HHoo will be rejectedwill be rejected
7. Calculation of test statistic7. Calculation of test statistic
z = (x -z = (x - µ) / (µ) / (√√ σσ22
// n)n)
= (27 - 30= (27 - 30) / () / (√√ 2020 / 10/ 10))
= - 2.12= - 2.12
8. Statistical decision8. Statistical decision
Since -2.12 is less than – 1.645, HSince -2.12 is less than – 1.645, Hoo is rejectedis rejected
9. Conclusion: We conclude that9. Conclusion: We conclude that µ < 30µ < 30
10. p value: p = 0.017010. p value: p = 0.0170
Example 3Example 3: Can we conclude that: Can we conclude that µ > 30?µ > 30?
 Calculate same process. But rejection region will be onCalculate same process. But rejection region will be on upperupper
tail of the distribution and critical value will be (+1.645)tail of the distribution and critical value will be (+1.645)
 (b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations:
σσ22
unknownunknown
Test statistic should be tTest statistic should be t = (x -= (x - µ) / ( sµ) / ( s / √/ √ n)n)
(c) Sampling from a non-normally distributed population:(c) Sampling from a non-normally distributed population:
Test statistic should be zTest statistic should be z = (x -= (x - µ) / ( sµ) / ( s / √/ √ n)n)
(using Central Limit Theorem)(using Central Limit Theorem)
 II. Hypothesis testing: The difference between two populationII. Hypothesis testing: The difference between two population
meansmeans
1.1. HHoo :: µµ11 - µ- µ22 = 0,= 0, HHAA :: µµ11 - µ- µ22 ≠ 0≠ 0
2.2. HHoo :: µµ11 - µ- µ22 ≥ 0,≥ 0, HHAA :: µµ11 - µ- µ22 < 0< 0
3.3. HHoo :: µµ11 - µ- µ22 ≤ 0,≤ 0, HHAA :: µµ11 - µ- µ22 > 0> 0
Hypothesis testingHypothesis testing under three conditionsunder three conditions
(a) Sampling from normally distributed populations:(a) Sampling from normally distributed populations: σσ22
knownknown
(b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22
unknownunknown
(b1)(b1) σσ22
are equalare equal
(b2)(b2) σσ22
are unequalare unequal
(c) Sampling from a(c) Sampling from a non-normallynon-normally distributed populationdistributed population
 (a) Sampling from normally distributed populations:(a) Sampling from normally distributed populations: σσ22
knownknown
Example 4:Example 4:
1. Data1. Data
Can we conclude that there is a difference between meanCan we conclude that there is a difference between mean
serum uric acid levelserum uric acid level of individuals with Down’s syndrome andof individuals with Down’s syndrome and
that of normal individuals?that of normal individuals?
Based on samples, Individuals with Down’s syndromeBased on samples, Individuals with Down’s syndrome
nn11 = 12, x= 12, x11 = 4.5 mg/100 ml= 4.5 mg/100 ml
Normal individualsNormal individuals
nn11 = 15, x= 15, x22 = 3.4 mg/100 ml= 3.4 mg/100 ml
2. Assumption2. Assumption
Two independent samples each drawn from a normallyTwo independent samples each drawn from a normally
distributed pop (distributed pop (σσ22
11 = 1 and= 1 and σσ22
22 = 1.5 )= 1.5 )
3. Hypothesis:3. Hypothesis: HHoo :: µµ11 - µ- µ22 = 0,= 0, HHAA :: µµ11 - µ- µ22 ≠ 0≠ 0
4. Test statistic4. Test statistic
zz = (x= (x11 - x- x22) – () – ( µµ11 - µ- µ22 ))00 / [/ [√√ ((σσ22
11 // nn11) +) + ((σσ22
22 // nn22)])]
[ note: subscript[ note: subscript 00 indicates that the difference is a hypothesizedindicates that the difference is a hypothesized
parameter]parameter]
5. Distribution of test statistic5. Distribution of test statistic
WhenWhen HHoo is true, test statistic follow standardis true, test statistic follow standard normal distnormal dist..
6. Decision rule6. Decision rule
LetLet αα = 0.05, Critical values are ± 1.96= 0.05, Critical values are ± 1.96
RejectReject HHoo if computed value is < -1.96 or > +1.96if computed value is < -1.96 or > +1.96
7. Calculation of test statistic7. Calculation of test statistic
zz = (4.5 – 3.4) – (0= (4.5 – 3.4) – (0) / [) / [√√ (1(1 / 12/ 12) +) + (1.5(1.5 / 15/ 15)])]
= 1.1 /0.4282 = 2.57= 1.1 /0.4282 = 2.57
8. Statistical decision8. Statistical decision
Reject since 2.57 > 1.96Reject since 2.57 > 1.96
9. Conclusion9. Conclusion
Two pop means are not equalTwo pop means are not equal
10. p value: p = 0.010210. p value: p = 0.0102
(b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22
unknownunknown
(b1)(b1) σσ22
are equalare equal
 Test statistic is:Test statistic is:
t = (xt = (x11 – x– x22) –) – (( µµ11 - µ- µ22 ))00 //√ [(√ [( ss22
pp / n/ n11 ) +) +(( ss22
pp / n/ n22 )])]
(See example in text)(See example in text)
(b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22
unknownunknown
(b2)(b2) σσ22
are unequalare unequal
 Test statistic is:Test statistic is:
t’ = (xt’ = (x11 – x– x22) –) – (( µµ11 - µ- µ22 ))00 //√ [(√ [( ss22
11 / n/ n11 ) +) +(( ss22
22 / n/ n22 )])]
(See example in text)(See example in text)
(c) Sampling from a(c) Sampling from a non-normallynon-normally distributed populationdistributed population
 Test statistic is:Test statistic is:
zz = (x= (x11 - x- x22) – () – ( µµ11 - µ- µ22 ))00 / [/ [√√ ((σσ22
11 // nn11) +) + ((σσ22
22 // nn22)])]
(See example in text)(See example in text)
Alternatives to z and t is NPTs (ie. Mann-Whitey test and MedianAlternatives to z and t is NPTs (ie. Mann-Whitey test and Median
test)test)
 III. Paired comparisonsIII. Paired comparisons
 In previous section, difference bet. two pop. meansIn previous section, difference bet. two pop. means →→ samplessamples
are independent (ie. samples come from different pop)are independent (ie. samples come from different pop)
When samples are non-independentWhen samples are non-independent →→ ??
 Reasons for pairingReasons for pairing: to eliminate a maximum number of: to eliminate a maximum number of
sources of extraneous variation by making the pairs similar withsources of extraneous variation by making the pairs similar with
respect to as many variables as possiblerespect to as many variables as possible
 Example:Example:
In a study to determine the effect of two sunscreens in terms ofIn a study to determine the effect of two sunscreens in terms of
amount of skin damage by sunshineamount of skin damage by sunshine
--Sunscreen ASunscreen A is applied to a simple random sample of subjects.is applied to a simple random sample of subjects.
--Sunscreen BSunscreen B is applied to a simple random sample of anotheris applied to a simple random sample of another
group of subjects (ie.an independent group).group of subjects (ie.an independent group).
-Let both groups expose to sunshine for a certain length of time.-Let both groups expose to sunshine for a certain length of time.
-Check amount of skin damage by sunshine-Check amount of skin damage by sunshine
-Which sunscreen (A or B) is more effective?-Which sunscreen (A or B) is more effective?
-After the experiment those using sunscreen A have less skin-After the experiment those using sunscreen A have less skin
damage. But we cannot definitely say A is more effective than Bdamage. But we cannot definitely say A is more effective than B
because those using sunscreen A may be themselves lessbecause those using sunscreen A may be themselves less
sensitive to sunlight.sensitive to sunlight.
- So to eliminate the- So to eliminate the extraneous factorextraneous factor-- the state of being sensitivethe state of being sensitive
to sunlightto sunlight we change the study design as followwe change the study design as follow
- Apply A to right side and B to left side ofApply A to right side and B to left side of samesame subject’s backsubject’s back
and let him expose to sunshineand let him expose to sunshine
- Then see the skin damage at both sidesThen see the skin damage at both sides
- If the skin area under A show less damage, we can definitelyIf the skin area under A show less damage, we can definitely
say that A is more effective than B in protection againstsay that A is more effective than B in protection against
sunshine (as we’d already eliminated the extraneous factor)sunshine (as we’d already eliminated the extraneous factor)
- Paired or related observation may be obtained by-Paired or related observation may be obtained by-
- (a) Same subjects measured before and after treatment(a) Same subjects measured before and after treatment
- (b) Same subjects measured different observers(b) Same subjects measured different observers
- (c) Litter mates of same sex assigned to different treatments(c) Litter mates of same sex assigned to different treatments
- (d) Pairs of twins or siblings assigned to different treatments(d) Pairs of twins or siblings assigned to different treatments
- (e) Matching individuals on some characteristics(e) Matching individuals on some characteristics
Example 5:Example 5:
 Gallbladder ejection fraction (GBEF) before and after surgeryGallbladder ejection fraction (GBEF) before and after surgery
Preop (%)Preop (%) Postop (%)Postop (%) ddii
22 63.5 41.522 63.5 41.5
63.3 91.5 28.263.3 91.5 28.2
96 59 -37.096 59 -37.0
9.2 37.8 28.69.2 37.8 28.6
3.1 10.1 7.03.1 10.1 7.0
50 19.6 -30.450 19.6 -30.4
33 41 8.033 41 8.0
69 87.8 18.869 87.8 18.8
64 86 22.064 86 22.0
18.8 55 36.218.8 55 36.2
0 88 88.00 88 88.0
34 40 6.034 40 6.0
1.Data: GBEF for 12 subjects before and after surgery given1.Data: GBEF for 12 subjects before and after surgery given
ddii = postop – preop differences calculated= postop – preop differences calculated
2. Assumption: A sample of differences comes from a normally2. Assumption: A sample of differences comes from a normally
distributed pop of differencesdistributed pop of differences
3. Hypothesis:3. Hypothesis:
HH00 :: µµdd ≤ 0 (µ≤ 0 (µdd is pop mean difference)is pop mean difference)
HHAA : µ: µdd > 0> 0
(We expect(We expect ddii is positive ie greater than zero)is positive ie greater than zero)
4. Test statistic:4. Test statistic:
t = d - µt = d - µdodo / s/ sdd
d = mean ofd = mean of ddii ( or sample mean difference)( or sample mean difference)
µµdodo = hypothesized sample mean difference= hypothesized sample mean difference
ssdd = s= sdd //√ n ( n is number of sample difference,√ n ( n is number of sample difference, ssdd is SD of sample meanis SD of sample mean
difference)difference)
5. Distribution of5. Distribution of test statistic:test statistic:
IfIf HH00 is true, test statistic is distributed as student’ t with n-1 dfis true, test statistic is distributed as student’ t with n-1 df
6. Decision rule:6. Decision rule:
LetLet αα = 0.05, Critical value of t is 1.7959= 0.05, Critical value of t is 1.7959
RejectReject HH00 if computed value is greater than or equal to criticalif computed value is greater than or equal to critical
value (see fig.)value (see fig.)
7. Calculation of test statistic:7. Calculation of test statistic:
d = (41.5 + 28.2+……..+ 6.0 ) / 12 = 216.9 / 12 = 18.075d = (41.5 + 28.2+……..+ 6.0 ) / 12 = 216.9 / 12 = 18.075
SS22
dd = ∑ (d= ∑ (dii – d)2 / n-1 = 1068.0930– d)2 / n-1 = 1068.0930
t = d - µt = d - µdodo / s/ sdd
= 18.075 – 0 /= 18.075 – 0 / √ (1068.0930 /12)√ (1068.0930 /12)
= 1.9159= 1.9159
8. Statistical decision:8. Statistical decision:
Reject since 1.9159 is in rejection regionReject since 1.9159 is in rejection region
9. Conclusion: We may conclude that surgery increases GBEF9. Conclusion: We may conclude that surgery increases GBEF
10. p value : 0.025 < p < 0.0510. p value : 0.025 < p < 0.05 (since 1.7959 <1.9159 < 2.2010)(since 1.7959 <1.9159 < 2.2010)
Use of z in paired comparison:Use of z in paired comparison:
Use following test statistic [Use following test statistic [σσ22
is known or large n with unknownis known or large n with unknown
pop distribution (using CLT)]pop distribution (using CLT)]
z = d - µz = d - µdd // σσdd // √ n√ n
 IV. Hypothesis testing : A single population proportionIV. Hypothesis testing : A single population proportion
 Test Procedure -- the same as in pop meanTest Procedure -- the same as in pop mean
 1 or 2 sided test depending on question being asked1 or 2 sided test depending on question being asked
 Large sampleLarge sample →→ apply CLTapply CLT
 Test statistic isTest statistic is z = sample p - pz = sample p - p00 // √√ pp00qqoo / n/ n ( normally( normally
distributed if Hdistributed if H00 is true)is true)
(p(p00 and qand qoo are hypothesized values)are hypothesized values)
Example 6Example 6..
Out of 301 Hispanic women, 24 has impaired fasting glucoseOut of 301 Hispanic women, 24 has impaired fasting glucose
(IFG). Pop proportion (p) of IFG is 6.3%,(IFG). Pop proportion (p) of IFG is 6.3%, cited in an articlecited in an article. Is. Is
there sufficient evidence to indicate that pop of Hispanic womenthere sufficient evidence to indicate that pop of Hispanic women
in a county has a prevalence of IFGin a county has a prevalence of IFG higher than 6.3 %?higher than 6.3 %?
1. Data1. Data
Sample p = 24/301 = 0.080Sample p = 24/301 = 0.080
Pop p = 0.063Pop p = 0.063
n = 301n = 301
2. Assumption2. Assumption
Sample is a simple random and the sampling distribution isSample is a simple random and the sampling distribution is
assumed to be approx. normally distributed (CLT)assumed to be approx. normally distributed (CLT)
3. Hypothesis3. Hypothesis
HH00 : p: p ≤ 0.063≤ 0.063
HHAA : p > 0.063: p > 0.063
4. Test statistic4. Test statistic
z = sample p - pz = sample p - p00 // √√ pp00qqoo / n/ n
5. Distribution of t5. Distribution of test statisticest statistic
If HIf H00 is true,is true, ttest statistic is approx normally distributed with aest statistic is approx normally distributed with a
mean zeromean zero
6. Decision rule6. Decision rule
LetLet αα = 0.05. Critical value (z) is 1.645.= 0.05. Critical value (z) is 1.645.
RejectReject HH00 if computed value z is ≥ 1.645if computed value z is ≥ 1.645
7. Calculation of7. Calculation of ttest statisticest statistic
z = sample p - pz = sample p - p00 // √√ pp00qqoo / n/ n
= 0.080 – 0.063 /= 0.080 – 0.063 / √ (0.063× 0.937 /301)√ (0.063× 0.937 /301)
= 1.21= 1.21
8. Statistical decision8. Statistical decision
Do not rejectDo not reject HH00 since 1.21 < 1.645since 1.21 < 1.645
99.. Conclusion: We cannot conclude that prevalence IFG is higherConclusion: We cannot conclude that prevalence IFG is higher
than 6.3%than 6.3%
10. P value: p = 0.113110. P value: p = 0.1131
V. Hypothesis testing : The difference between two populationV. Hypothesis testing : The difference between two population
proportionsproportions
 Test statistic is:Test statistic is:
z = (sample pz = (sample p11 - sample p- sample p22) – (p) – (p11 – p– p22))00 / SE/ SE
SE is based on pooled estimateSE is based on pooled estimate
SE =SE = √ (pq / n√ (pq / n11) + (pq / n) + (pq / n22))
 (see example in text)(see example in text)
END OF HYPOTHESIS TESTINGEND OF HYPOTHESIS TESTING PART IPART I

More Related Content

What's hot

Chap#9 hypothesis testing (3)
Chap#9 hypothesis testing (3)Chap#9 hypothesis testing (3)
Chap#9 hypothesis testing (3)
shafi khan
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
Jags Jagdish
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Nirajan Bam
 
Chapter 8 – Hypothesis Testing
Chapter 8 – Hypothesis TestingChapter 8 – Hypothesis Testing
Chapter 8 – Hypothesis Testing
guest3720ca
 
One sided or one-tailed tests
One sided or one-tailed testsOne sided or one-tailed tests
One sided or one-tailed tests
Hasnain Baber
 
hypothesis testing
hypothesis testinghypothesis testing
hypothesis testing
msrpt
 
Estimation and hypothesis testing 1 (graduate statistics2)
Estimation and hypothesis testing 1 (graduate statistics2)Estimation and hypothesis testing 1 (graduate statistics2)
Estimation and hypothesis testing 1 (graduate statistics2)
Harve Abella
 

What's hot (20)

Lecture6 Applied Econometrics and Economic Modeling
Lecture6 Applied Econometrics and Economic ModelingLecture6 Applied Econometrics and Economic Modeling
Lecture6 Applied Econometrics and Economic Modeling
 
Chap#9 hypothesis testing (3)
Chap#9 hypothesis testing (3)Chap#9 hypothesis testing (3)
Chap#9 hypothesis testing (3)
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
11 hypothesis testing
11 hypothesis testing11 hypothesis testing
11 hypothesis testing
 
Chapter 8 – Hypothesis Testing
Chapter 8 – Hypothesis TestingChapter 8 – Hypothesis Testing
Chapter 8 – Hypothesis Testing
 
Review & Hypothesis Testing
Review & Hypothesis TestingReview & Hypothesis Testing
Review & Hypothesis Testing
 
Null hypothesis AND ALTERNAT HYPOTHESIS
Null hypothesis AND ALTERNAT HYPOTHESISNull hypothesis AND ALTERNAT HYPOTHESIS
Null hypothesis AND ALTERNAT HYPOTHESIS
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
One sided or one-tailed tests
One sided or one-tailed testsOne sided or one-tailed tests
One sided or one-tailed tests
 
hypothesis testing
hypothesis testinghypothesis testing
hypothesis testing
 
Estimation and hypothesis testing 1 (graduate statistics2)
Estimation and hypothesis testing 1 (graduate statistics2)Estimation and hypothesis testing 1 (graduate statistics2)
Estimation and hypothesis testing 1 (graduate statistics2)
 
Hypothesis
HypothesisHypothesis
Hypothesis
 
Hypothesis testing - Primer
Hypothesis testing - PrimerHypothesis testing - Primer
Hypothesis testing - Primer
 
Test of hypothesis 1
Test of hypothesis 1Test of hypothesis 1
Test of hypothesis 1
 
Hypothesis test
Hypothesis testHypothesis test
Hypothesis test
 
Byrd statistical considerations of the histomorphometric test protocol (1)
Byrd statistical considerations of the histomorphometric test protocol (1)Byrd statistical considerations of the histomorphometric test protocol (1)
Byrd statistical considerations of the histomorphometric test protocol (1)
 
Statistical Analysis with R- III
Statistical Analysis with R- IIIStatistical Analysis with R- III
Statistical Analysis with R- III
 
Hypothesis testing and p values 06
Hypothesis testing and p values  06Hypothesis testing and p values  06
Hypothesis testing and p values 06
 

Similar to L hypo testing

Review Z Test Ci 1
Review Z Test Ci 1Review Z Test Ci 1
Review Z Test Ci 1
shoffma5
 
Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013
calculistictt
 
Formulating hypotheses
Formulating hypothesesFormulating hypotheses
Formulating hypotheses
Aniket Verma
 
Lecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxLecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptx
shakirRahman10
 
Inferential statistics
Inferential statisticsInferential statistics
Inferential statistics
Maria Theresa
 

Similar to L hypo testing (20)

Unit 4 Tests of Significance
Unit 4 Tests of SignificanceUnit 4 Tests of Significance
Unit 4 Tests of Significance
 
Tests of significance
Tests of significanceTests of significance
Tests of significance
 
Review Z Test Ci 1
Review Z Test Ci 1Review Z Test Ci 1
Review Z Test Ci 1
 
Formulatinghypotheses
Formulatinghypotheses Formulatinghypotheses
Formulatinghypotheses
 
4_5875144622430228750.docx
4_5875144622430228750.docx4_5875144622430228750.docx
4_5875144622430228750.docx
 
Testing of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdfTesting of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdf
 
Hypothesis Testing.pptx
Hypothesis Testing.pptxHypothesis Testing.pptx
Hypothesis Testing.pptx
 
Formulating Hypotheses
Formulating Hypotheses Formulating Hypotheses
Formulating Hypotheses
 
Basic of Statistical Inference Part-IV: An Overview of Hypothesis Testing
Basic of Statistical Inference Part-IV: An Overview of Hypothesis TestingBasic of Statistical Inference Part-IV: An Overview of Hypothesis Testing
Basic of Statistical Inference Part-IV: An Overview of Hypothesis Testing
 
20200519073328de6dca404c.pdfkshhjejhehdhd
20200519073328de6dca404c.pdfkshhjejhehdhd20200519073328de6dca404c.pdfkshhjejhehdhd
20200519073328de6dca404c.pdfkshhjejhehdhd
 
Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013Chapter 20 and 21 combined testing hypotheses about proportions 2013
Chapter 20 and 21 combined testing hypotheses about proportions 2013
 
Formulating hypotheses
Formulating hypothesesFormulating hypotheses
Formulating hypotheses
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
HYPOTHESIS TESTING.pptx
HYPOTHESIS TESTING.pptxHYPOTHESIS TESTING.pptx
HYPOTHESIS TESTING.pptx
 
Lecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxLecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptx
 
RESEARCH METHODS LESSON 3
RESEARCH METHODS LESSON 3RESEARCH METHODS LESSON 3
RESEARCH METHODS LESSON 3
 
Hypothesis
HypothesisHypothesis
Hypothesis
 
Inferential statistics
Inferential statisticsInferential statistics
Inferential statistics
 
Testing of Hypothesis.pptx
Testing of Hypothesis.pptxTesting of Hypothesis.pptx
Testing of Hypothesis.pptx
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 

More from Mmedsc Hahm

More from Mmedsc Hahm (20)

Solid waste-management-2858710
Solid waste-management-2858710Solid waste-management-2858710
Solid waste-management-2858710
 
Situation analysis
Situation analysisSituation analysis
Situation analysis
 
Quantification of medicines need
Quantification of medicines needQuantification of medicines need
Quantification of medicines need
 
Quality in hospital
Quality in hospitalQuality in hospital
Quality in hospital
 
Patient satisfaction &amp; quality in health care (16.3.2016) dr.nyunt nyunt wai
Patient satisfaction &amp; quality in health care (16.3.2016) dr.nyunt nyunt waiPatient satisfaction &amp; quality in health care (16.3.2016) dr.nyunt nyunt wai
Patient satisfaction &amp; quality in health care (16.3.2016) dr.nyunt nyunt wai
 
Organising
OrganisingOrganising
Organising
 
Nscbl slide
Nscbl slideNscbl slide
Nscbl slide
 
Introduction to hahm 2017
Introduction to hahm 2017Introduction to hahm 2017
Introduction to hahm 2017
 
Hss lecture 2016 jan
Hss lecture 2016 janHss lecture 2016 jan
Hss lecture 2016 jan
 
Hospital management17
Hospital management17Hospital management17
Hospital management17
 
Hopital stat
Hopital statHopital stat
Hopital stat
 
Health planning approaches hahm 17
Health planning approaches hahm 17Health planning approaches hahm 17
Health planning approaches hahm 17
 
Ephs and nhp
Ephs and nhpEphs and nhp
Ephs and nhp
 
Directing and leading 2017
Directing and leading 2017Directing and leading 2017
Directing and leading 2017
 
Concepts of em
Concepts of emConcepts of em
Concepts of em
 
Access to medicines p pt 17 10-2015
Access to medicines p pt 17 10-2015Access to medicines p pt 17 10-2015
Access to medicines p pt 17 10-2015
 
The dynamics of disease transmission
The dynamics of disease transmissionThe dynamics of disease transmission
The dynamics of disease transmission
 
Study designs dr.wah
Study designs dr.wahStudy designs dr.wah
Study designs dr.wah
 
Standardization dr.wah
Standardization dr.wahStandardization dr.wah
Standardization dr.wah
 
Sdg
SdgSdg
Sdg
 

Recently uploaded

Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...
Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...
Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...
Sheetaleventcompany
 
💚 Low Rate Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...
💚 Low Rate  Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...💚 Low Rate  Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...
💚 Low Rate Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...
Sheetaleventcompany
 
Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...
Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...
Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...
Sheetaleventcompany
 
💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...
💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...
💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...
Sheetaleventcompany
 
Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...
Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...
Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...
Sheetaleventcompany
 
Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...
Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...
Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...
Sheetaleventcompany
 
Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...
Sheetaleventcompany
 
Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...
Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...
Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...
Sheetaleventcompany
 
Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...
Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...
Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...
Sheetaleventcompany
 

Recently uploaded (20)

Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...
Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...
Low Rate Call Girls Ahmedabad {8976398759} ❤️VVIP NISHA Call Girls in Ahmedab...
 
💸Cash Payment No Advance Call Girls Surat 🧿 9332606886 🧿 High Class Call Girl...
💸Cash Payment No Advance Call Girls Surat 🧿 9332606886 🧿 High Class Call Girl...💸Cash Payment No Advance Call Girls Surat 🧿 9332606886 🧿 High Class Call Girl...
💸Cash Payment No Advance Call Girls Surat 🧿 9332606886 🧿 High Class Call Girl...
 
💚 Low Rate Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...
💚 Low Rate  Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...💚 Low Rate  Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...
💚 Low Rate Call Girls In Chandigarh 💯Lucky 📲🔝8868886958🔝Call Girl In Chandig...
 
Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...
Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...
Call Girl Service In Mumbai ❤️🍑 9xx000xx09 👄🫦Independent Escort Service Mumba...
 
💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...
💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...
💚Chandigarh Call Girls Service 💯Jiya 📲🔝8868886958🔝Call Girls In Chandigarh No...
 
💸Cash Payment No Advance Call Girls Kolkata 🧿 9332606886 🧿 High Class Call Gi...
💸Cash Payment No Advance Call Girls Kolkata 🧿 9332606886 🧿 High Class Call Gi...💸Cash Payment No Advance Call Girls Kolkata 🧿 9332606886 🧿 High Class Call Gi...
💸Cash Payment No Advance Call Girls Kolkata 🧿 9332606886 🧿 High Class Call Gi...
 
Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...
Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...
Independent Call Girls In Pune {9142599079} ❤️VVIP ANKITA Call Girl in Pune M...
 
Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...
Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...
Low Rate Call Girls Pune {9142599079} ❤️VVIP NISHA Call Girls in Pune Maharas...
 
❤️ Call Girls service In Panchkula☎️9815457724☎️ Call Girl service in Panchku...
❤️ Call Girls service In Panchkula☎️9815457724☎️ Call Girl service in Panchku...❤️ Call Girls service In Panchkula☎️9815457724☎️ Call Girl service in Panchku...
❤️ Call Girls service In Panchkula☎️9815457724☎️ Call Girl service in Panchku...
 
💸Cash Payment No Advance Call Girls Pune 🧿 9332606886 🧿 High Class Call Girl ...
💸Cash Payment No Advance Call Girls Pune 🧿 9332606886 🧿 High Class Call Girl ...💸Cash Payment No Advance Call Girls Pune 🧿 9332606886 🧿 High Class Call Girl ...
💸Cash Payment No Advance Call Girls Pune 🧿 9332606886 🧿 High Class Call Girl ...
 
Call Girl Hyderabad ❤️7783825323 Niamh@ Hyderabad Call Girls Near Me ❤️♀️@ Se...
Call Girl Hyderabad ❤️7783825323 Niamh@ Hyderabad Call Girls Near Me ❤️♀️@ Se...Call Girl Hyderabad ❤️7783825323 Niamh@ Hyderabad Call Girls Near Me ❤️♀️@ Se...
Call Girl Hyderabad ❤️7783825323 Niamh@ Hyderabad Call Girls Near Me ❤️♀️@ Se...
 
2024 PCP #IMPerative Updates in Rheumatology
2024 PCP #IMPerative Updates in Rheumatology2024 PCP #IMPerative Updates in Rheumatology
2024 PCP #IMPerative Updates in Rheumatology
 
❤️Amritsar Escort Service☎️9815674956☎️ Call Girl service in Amritsar☎️ Amrit...
❤️Amritsar Escort Service☎️9815674956☎️ Call Girl service in Amritsar☎️ Amrit...❤️Amritsar Escort Service☎️9815674956☎️ Call Girl service in Amritsar☎️ Amrit...
❤️Amritsar Escort Service☎️9815674956☎️ Call Girl service in Amritsar☎️ Amrit...
 
Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {9179660964} ❤️VVIP POOJA Call Girls in Bangalor...
 
Panchkula Call Girls Service ❤️🍑 9809698092 👄🫦Independent Escort Service Panc...
Panchkula Call Girls Service ❤️🍑 9809698092 👄🫦Independent Escort Service Panc...Panchkula Call Girls Service ❤️🍑 9809698092 👄🫦Independent Escort Service Panc...
Panchkula Call Girls Service ❤️🍑 9809698092 👄🫦Independent Escort Service Panc...
 
👉Bangalore Call Girl Service👉📞 6378878445 👉📞 Just📲 Call Manisha Call Girls Se...
👉Bangalore Call Girl Service👉📞 6378878445 👉📞 Just📲 Call Manisha Call Girls Se...👉Bangalore Call Girl Service👉📞 6378878445 👉📞 Just📲 Call Manisha Call Girls Se...
👉Bangalore Call Girl Service👉📞 6378878445 👉📞 Just📲 Call Manisha Call Girls Se...
 
💞 Safe And Secure Call Girls gaya 🧿 9332606886 🧿 High Class Call Girl Service...
💞 Safe And Secure Call Girls gaya 🧿 9332606886 🧿 High Class Call Girl Service...💞 Safe And Secure Call Girls gaya 🧿 9332606886 🧿 High Class Call Girl Service...
💞 Safe And Secure Call Girls gaya 🧿 9332606886 🧿 High Class Call Girl Service...
 
Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...
Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...
Gorgeous Call Girls In Chennai {7857862533} ❤️VVIP ANKITA Call Girl in Chenna...
 
💞 Safe And Secure Call Girls Mysore 🧿 9332606886 🧿 High Class Call Girl Servi...
💞 Safe And Secure Call Girls Mysore 🧿 9332606886 🧿 High Class Call Girl Servi...💞 Safe And Secure Call Girls Mysore 🧿 9332606886 🧿 High Class Call Girl Servi...
💞 Safe And Secure Call Girls Mysore 🧿 9332606886 🧿 High Class Call Girl Servi...
 
Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...
Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...
Low Rate Call Girls Nagpur {9xx000xx09} ❤️VVIP NISHA Call Girls in Nagpur Mah...
 

L hypo testing

  • 1. HYPOTHESIS TESTINGHYPOTHESIS TESTING Dr Htin Zaw SoeDr Htin Zaw Soe MBBS, DFT, MMedSc (P & TM), PhD, DipMedEdMBBS, DFT, MMedSc (P & TM), PhD, DipMedEd Associate ProfessorAssociate Professor Department of BiostatisticsDepartment of Biostatistics University of Public Health, YangonUniversity of Public Health, Yangon
  • 2.  HypothesisHypothesis: A statement about one or more population: A statement about one or more population A hospital administrator – Average length of stay (LOS) – 5 daysA hospital administrator – Average length of stay (LOS) – 5 days A public health nurse – HE program- effectiveA public health nurse – HE program- effective A physician – Effect of drug in treatment – 90% curedA physician – Effect of drug in treatment – 90% cured  Types hypothesisTypes hypothesis - Research hypothesis- Research hypothesis - Statistical hypothesis- Statistical hypothesis Research hypothesisResearch hypothesis: The conjecture or supposition that: The conjecture or supposition that motivates the researchmotivates the research It directly leads to statistical hypothesisIt directly leads to statistical hypothesis Statistical hypothesesStatistical hypotheses : Hypotheses that are stated in such a: Hypotheses that are stated in such a way that they may be evaluated by appropriateway that they may be evaluated by appropriate statisticalstatistical techniquestechniques
  • 3.  Steps in Hypothesis Testing:Steps in Hypothesis Testing: 1. Data1. Data 2. Assumption2. Assumption 3. Hypothesis3. Hypothesis 4. Test statistic4. Test statistic 5. Distribution of test statistic5. Distribution of test statistic 6. Decision rule6. Decision rule 7.Calculation of test statistic7.Calculation of test statistic 8. Statistical decision8. Statistical decision 9. Conclusion9. Conclusion 10.10. pp valuevalue
  • 4. 1.1. Data:Data: count or measurecount or measure 2.2. Assumption:Assumption: Normality of pop, equality of variance,Normality of pop, equality of variance, independence of sampleindependence of sample 3.3. Hypothesis:Hypothesis: Null Hypothesis is hypothesis to be tested, designated byNull Hypothesis is hypothesis to be tested, designated by HH00 Also called ‘Also called ‘Hypothesis of no differenceHypothesis of no difference’’ Alternative Hypothesis (Research hypothesis) (Alternative Hypothesis (Research hypothesis) (HHAA)) Rule for stating statistical hypothesis:Rule for stating statistical hypothesis: Can we conclude that a certain pop. mean is not 50?Can we conclude that a certain pop. mean is not 50? HH00 :: µ = 50µ = 50 HHAA :: µ ≠ 50µ ≠ 50 Can we conclude that a certain pop. mean greater than 50?Can we conclude that a certain pop. mean greater than 50? HH00 :: µ ≤ 50µ ≤ 50 HHAA :: µ > 50µ > 50 Can we conclude that a certain pop. mean less than 50?Can we conclude that a certain pop. mean less than 50? HH00 :: µ ≥ 50µ ≥ 50 HHAA :: µ < 50µ < 50
  • 5. SummarySummary (a) What you hope or expect is alternative hypothesis(a) What you hope or expect is alternative hypothesis (b) Null hypothesis should contain statement of equality, either(b) Null hypothesis should contain statement of equality, either = ,= , ≤, or ≥≤, or ≥ (c)(c) Null hypothesis is hypothesis that is testedNull hypothesis is hypothesis that is tested (d) Null hypothesis and alternative hypothesis are(d) Null hypothesis and alternative hypothesis are complementary (ie the two together exhaust all possibilities)complementary (ie the two together exhaust all possibilities)  A Precaution:A Precaution: Hypothesis testing / statistical inferenceHypothesis testing / statistical inference ≠ proof of hypothesis in≠ proof of hypothesis in generalgeneral Hypothesis is just supported/not supported byHypothesis is just supported/not supported by available dataavailable data If we fail to rejectIf we fail to reject HH00 wewedo not say it is true, but itdo not say it is true, but it may be truemay be true
  • 6. 4.4. Test statisticTest statistic -- Statistic computed from data of sampleStatistic computed from data of sample - Decision maker (reject or not reject depends on magnitude of- Decision maker (reject or not reject depends on magnitude of test statistic)test statistic) eg. the quantity ,eg. the quantity , z = x -z = x - µµ00 // σσ √ n√ n [[µµ00 == hypothesized value of pop. mean]hypothesized value of pop. mean] General formula for test statisticGeneral formula for test statistic test statistic = (relevant statistictest statistic = (relevant statistic –– hypothesized parameter) / SEhypothesized parameter) / SE of relevant statisticof relevant statistic 5.5. Distribution of test statisticDistribution of test statistic Sampling distribution is the key to statistical inferenceSampling distribution is the key to statistical inference eg. Distribution ofeg. Distribution of z = x -z = x - µµ00 // σσ √ n√ n follows standard normalfollows standard normal distribution ifdistribution if HH00 is true and assumptions are metis true and assumptions are met
  • 7.  6. Decision rule6. Decision rule Value of test statistic – in rejection region or non-rejectionValue of test statistic – in rejection region or non-rejection Values of test statistic formingValues of test statistic forming rejection regionrejection region are those valuesare those values that are less likely to occur ifthat are less likely to occur if HH00 is trueis true Values of test statistic formingValues of test statistic forming acceptance regionacceptance region are those valuesare those values that are more likely to occur ifthat are more likely to occur if HH00 is trueis true Whether reject or not rejectWhether reject or not reject the vthe value of test statistic that wealue of test statistic that we compute from our samplecompute from our sample →→ RejectReject the vthe value in rejection regionalue in rejection region →→ Not rejectNot reject the vthe value in non-rejection regionalue in non-rejection region
  • 8.  Significant levelSignificant level: The level of significance: The level of significance αα is a probability and,is a probability and, in fact, isin fact, is the probability of rejecting a true null hypothesisthe probability of rejecting a true null hypothesis Rejecting a true HRejecting a true H00 →→ an error madean error made →→ SoSo αα is set smallis set small GenerallyGenerally αα is set 0.01, 0.05 and 0.1is set 0.01, 0.05 and 0.1  Types of errorsTypes of errors Condition of Null HypothesisCondition of Null Hypothesis TrueTrue FalseFalse PossiblePossible - Fail to reject H- Fail to reject H00 Correct actionCorrect action Type II errorType II error ActionAction - Reject H- Reject H00 Type I errorType I error Correct actionCorrect action Type I error =Type I error = αα Type II error =Type II error = ββ
  • 9.  7.Calculation of test statistic7.Calculation of test statistic Using data in a sample, a value of test statistic is computed andUsing data in a sample, a value of test statistic is computed and compared with rejection and non-rejection regionscompared with rejection and non-rejection regions  8. Statistical decision8. Statistical decision RejectReject HH00 if computed value falls in rejection region and viceif computed value falls in rejection region and vice versaversa 9. Conclusion9. Conclusion IfIf HH00 is rejected, we conclude thatis rejected, we conclude that HHAA is trueis true IfIf HH00 is not rejected, we conclude thatis not rejected, we conclude that HH00 may bemay be truetrue 10.10. pp valuevalue It shows how unusual our sample results are, given thatIt shows how unusual our sample results are, given that HH00 is true.is true. pp value indicating that sample results are not likely to havevalue indicating that sample results are not likely to have occurred, ifoccurred, if HH00 is true, provides justification for doubt about truthis true, provides justification for doubt about truth
  • 10.  Purpose of hypothesis testing:Purpose of hypothesis testing: To assist administrators and clinicians in making decision.To assist administrators and clinicians in making decision. Usually administrators and clinicians depend on statisticalUsually administrators and clinicians depend on statistical decision.decision. Outcome of statistical test is only one piece of evidences thatOutcome of statistical test is only one piece of evidences that influences them. Statistical decision should not be interpretedinfluences them. Statistical decision should not be interpreted as definitive, and consider with other relevant information.as definitive, and consider with other relevant information.
  • 11.  I. Hypothesis testing: A single population meanI. Hypothesis testing: A single population mean Hypothesis testingHypothesis testing under three conditionsunder three conditions (a)(a) Sampling from normally distributed populations:Sampling from normally distributed populations: σσ22 knownknown (b)(b) Sampling from a normally distributed populations:Sampling from a normally distributed populations: σσ22 unknownunknown (c)(c) Sampling from aSampling from a non-normallynon-normally distributed populationdistributed population
  • 12. (a) Sampling from normally distributed populations:(a) Sampling from normally distributed populations: σσ22 knownknown Example 1Example 1: Researchers interested in mean age of a certain: Researchers interested in mean age of a certain pop. They are asking the question: Can we conclude that meanpop. They are asking the question: Can we conclude that mean age of that pop. is different from 30 years?age of that pop. is different from 30 years?  Answer 1:Answer 1: 1. Data. A random sample of 10 subjects drawn from pop.1. Data. A random sample of 10 subjects drawn from pop. Sample mean age (x) is 27 yearsSample mean age (x) is 27 years σσ22 is 20is 20 2. Assumption: The sample comes from pop whose ages are2. Assumption: The sample comes from pop whose ages are normally distributednormally distributed 3. Hypothesis:3. Hypothesis: HHoo :: µ = 30µ = 30 HHAA :: µ ≠ 30µ ≠ 30 4. Test statistic:4. Test statistic: z = (x -z = (x - µ) / (µ) / ( σσ / √/ √ n)n)
  • 13.  5. Distribution of test statistic: Based on knowledge of sampling5. Distribution of test statistic: Based on knowledge of sampling dist. anddist. and normal distnormal dist., test statistic is normally distributed with., test statistic is normally distributed with mean, zero and variance, 1.mean, zero and variance, 1.  6. Decision rule:6. Decision rule: αα is set at 0.05is set at 0.05 If the computed value of test statistic is eitherIf the computed value of test statistic is either ≥≥ 1.961.96 oror ≤≤ -1.96-1.96 HHoo will be rejected.will be rejected. [ Critical value = the value of[ Critical value = the value of test statistic that separate thetest statistic that separate the rejection region and non-rejection region] [rejection region =rejection region and non-rejection region] [rejection region = critical region]critical region] 7. Calculation of7. Calculation of test statistic:test statistic: z = (x -z = (x - µ) / (µ) / ( σσ / √/ √ n)n) = (27 - 30= (27 - 30) / ( 20) / ( 20 / √ 10/ √ 10)) = - 2.12= - 2.12
  • 14. 8. Statistical decision: Since -2.12 is in rejection region, H8. Statistical decision: Since -2.12 is in rejection region, Hoo isis rejectedrejected 9. Conclusion: We conclude that9. Conclusion: We conclude that µµ is not equal to 30 yearsis not equal to 30 years 10.10. pp value:value: pp value is 0.0170 + 0.0170 = 0.0340value is 0.0170 + 0.0170 = 0.0340 Definition:Definition: TheThe pp value for a hypothesis test is the probability of obtaining,value for a hypothesis test is the probability of obtaining, whenwhen HHoo isis true, a value of the test statistic as extreme as ortrue, a value of the test statistic as extreme as or more extreme (in direction supportingmore extreme (in direction supporting HHAA) than the one actually) than the one actually computed.computed.
  • 15.  TestingTesting HHoo by means of a confidence intervalby means of a confidence interval Hypothesis:Hypothesis: HHoo :: µ = 30µ = 30 HHAA :: µ ≠ 30µ ≠ 30 x ± zx ± z(1-(1-αα/2)/2) σσxx = 27 ± 1.96= 27 ± 1.96 σσxx = 27 ± 1.96= 27 ± 1.96 √√σσ22 /n/n = 27 ± 1.96= 27 ± 1.96 √20√20/10/10 = 27= 27 ± 1.96 (1.412)± 1.96 (1.412) = 27= 27 ± 2.7718± 2.7718 24.2282, 29.771824.2282, 29.7718 Interval does not include 30. SoInterval does not include 30. So HHoo is rejectedis rejected
  • 16.  One-sided Hypothesis Tests:One-sided Hypothesis Tests:  Two-sided testTwo-sided test → rejection region is split into two sides of→ rejection region is split into two sides of distribution of test statisticdistribution of test statistic  One-sided testOne-sided test → rejection region is in one or other side of→ rejection region is in one or other side of distribution of test statisticdistribution of test statistic  Two or one sided is depend on the nature of question raised by theTwo or one sided is depend on the nature of question raised by the researcherresearcher Example 2Example 2: Can we conclude that: Can we conclude that µ < 30? (instead of µ ≠ 30)µ < 30? (instead of µ ≠ 30) 1. Data… etc1. Data… etc 2. Assumption… etc2. Assumption… etc 3. Hypothesis3. Hypothesis HHoo :: µ ≥ 30µ ≥ 30 HHAA :: µ < 30µ < 30
  • 17. 4.4. Test statistic:Test statistic: z = (x -z = (x - µ) / (µ) / ( σσ / √/ √ n)n) 5. Distribution of test statistic… etc5. Distribution of test statistic… etc 6. Decision6. Decision One-sided test. SoOne-sided test. So αα is in one side of distribution (at lower tail)is in one side of distribution (at lower tail) (see fig.)(see fig.) If computed value is < critical value (- 1.645),If computed value is < critical value (- 1.645), HHoo will be rejectedwill be rejected 7. Calculation of test statistic7. Calculation of test statistic z = (x -z = (x - µ) / (µ) / (√√ σσ22 // n)n) = (27 - 30= (27 - 30) / () / (√√ 2020 / 10/ 10)) = - 2.12= - 2.12 8. Statistical decision8. Statistical decision Since -2.12 is less than – 1.645, HSince -2.12 is less than – 1.645, Hoo is rejectedis rejected 9. Conclusion: We conclude that9. Conclusion: We conclude that µ < 30µ < 30 10. p value: p = 0.017010. p value: p = 0.0170
  • 18. Example 3Example 3: Can we conclude that: Can we conclude that µ > 30?µ > 30?  Calculate same process. But rejection region will be onCalculate same process. But rejection region will be on upperupper tail of the distribution and critical value will be (+1.645)tail of the distribution and critical value will be (+1.645)  (b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22 unknownunknown Test statistic should be tTest statistic should be t = (x -= (x - µ) / ( sµ) / ( s / √/ √ n)n) (c) Sampling from a non-normally distributed population:(c) Sampling from a non-normally distributed population: Test statistic should be zTest statistic should be z = (x -= (x - µ) / ( sµ) / ( s / √/ √ n)n) (using Central Limit Theorem)(using Central Limit Theorem)
  • 19.  II. Hypothesis testing: The difference between two populationII. Hypothesis testing: The difference between two population meansmeans 1.1. HHoo :: µµ11 - µ- µ22 = 0,= 0, HHAA :: µµ11 - µ- µ22 ≠ 0≠ 0 2.2. HHoo :: µµ11 - µ- µ22 ≥ 0,≥ 0, HHAA :: µµ11 - µ- µ22 < 0< 0 3.3. HHoo :: µµ11 - µ- µ22 ≤ 0,≤ 0, HHAA :: µµ11 - µ- µ22 > 0> 0 Hypothesis testingHypothesis testing under three conditionsunder three conditions (a) Sampling from normally distributed populations:(a) Sampling from normally distributed populations: σσ22 knownknown (b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22 unknownunknown (b1)(b1) σσ22 are equalare equal (b2)(b2) σσ22 are unequalare unequal (c) Sampling from a(c) Sampling from a non-normallynon-normally distributed populationdistributed population
  • 20.  (a) Sampling from normally distributed populations:(a) Sampling from normally distributed populations: σσ22 knownknown Example 4:Example 4: 1. Data1. Data Can we conclude that there is a difference between meanCan we conclude that there is a difference between mean serum uric acid levelserum uric acid level of individuals with Down’s syndrome andof individuals with Down’s syndrome and that of normal individuals?that of normal individuals? Based on samples, Individuals with Down’s syndromeBased on samples, Individuals with Down’s syndrome nn11 = 12, x= 12, x11 = 4.5 mg/100 ml= 4.5 mg/100 ml Normal individualsNormal individuals nn11 = 15, x= 15, x22 = 3.4 mg/100 ml= 3.4 mg/100 ml 2. Assumption2. Assumption Two independent samples each drawn from a normallyTwo independent samples each drawn from a normally distributed pop (distributed pop (σσ22 11 = 1 and= 1 and σσ22 22 = 1.5 )= 1.5 ) 3. Hypothesis:3. Hypothesis: HHoo :: µµ11 - µ- µ22 = 0,= 0, HHAA :: µµ11 - µ- µ22 ≠ 0≠ 0
  • 21. 4. Test statistic4. Test statistic zz = (x= (x11 - x- x22) – () – ( µµ11 - µ- µ22 ))00 / [/ [√√ ((σσ22 11 // nn11) +) + ((σσ22 22 // nn22)])] [ note: subscript[ note: subscript 00 indicates that the difference is a hypothesizedindicates that the difference is a hypothesized parameter]parameter] 5. Distribution of test statistic5. Distribution of test statistic WhenWhen HHoo is true, test statistic follow standardis true, test statistic follow standard normal distnormal dist.. 6. Decision rule6. Decision rule LetLet αα = 0.05, Critical values are ± 1.96= 0.05, Critical values are ± 1.96 RejectReject HHoo if computed value is < -1.96 or > +1.96if computed value is < -1.96 or > +1.96 7. Calculation of test statistic7. Calculation of test statistic zz = (4.5 – 3.4) – (0= (4.5 – 3.4) – (0) / [) / [√√ (1(1 / 12/ 12) +) + (1.5(1.5 / 15/ 15)])] = 1.1 /0.4282 = 2.57= 1.1 /0.4282 = 2.57
  • 22. 8. Statistical decision8. Statistical decision Reject since 2.57 > 1.96Reject since 2.57 > 1.96 9. Conclusion9. Conclusion Two pop means are not equalTwo pop means are not equal 10. p value: p = 0.010210. p value: p = 0.0102
  • 23. (b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22 unknownunknown (b1)(b1) σσ22 are equalare equal  Test statistic is:Test statistic is: t = (xt = (x11 – x– x22) –) – (( µµ11 - µ- µ22 ))00 //√ [(√ [( ss22 pp / n/ n11 ) +) +(( ss22 pp / n/ n22 )])] (See example in text)(See example in text) (b) Sampling from a normally distributed populations:(b) Sampling from a normally distributed populations: σσ22 unknownunknown (b2)(b2) σσ22 are unequalare unequal  Test statistic is:Test statistic is: t’ = (xt’ = (x11 – x– x22) –) – (( µµ11 - µ- µ22 ))00 //√ [(√ [( ss22 11 / n/ n11 ) +) +(( ss22 22 / n/ n22 )])] (See example in text)(See example in text)
  • 24. (c) Sampling from a(c) Sampling from a non-normallynon-normally distributed populationdistributed population  Test statistic is:Test statistic is: zz = (x= (x11 - x- x22) – () – ( µµ11 - µ- µ22 ))00 / [/ [√√ ((σσ22 11 // nn11) +) + ((σσ22 22 // nn22)])] (See example in text)(See example in text) Alternatives to z and t is NPTs (ie. Mann-Whitey test and MedianAlternatives to z and t is NPTs (ie. Mann-Whitey test and Median test)test)
  • 25.  III. Paired comparisonsIII. Paired comparisons  In previous section, difference bet. two pop. meansIn previous section, difference bet. two pop. means →→ samplessamples are independent (ie. samples come from different pop)are independent (ie. samples come from different pop) When samples are non-independentWhen samples are non-independent →→ ??  Reasons for pairingReasons for pairing: to eliminate a maximum number of: to eliminate a maximum number of sources of extraneous variation by making the pairs similar withsources of extraneous variation by making the pairs similar with respect to as many variables as possiblerespect to as many variables as possible  Example:Example: In a study to determine the effect of two sunscreens in terms ofIn a study to determine the effect of two sunscreens in terms of amount of skin damage by sunshineamount of skin damage by sunshine --Sunscreen ASunscreen A is applied to a simple random sample of subjects.is applied to a simple random sample of subjects. --Sunscreen BSunscreen B is applied to a simple random sample of anotheris applied to a simple random sample of another group of subjects (ie.an independent group).group of subjects (ie.an independent group). -Let both groups expose to sunshine for a certain length of time.-Let both groups expose to sunshine for a certain length of time. -Check amount of skin damage by sunshine-Check amount of skin damage by sunshine
  • 26. -Which sunscreen (A or B) is more effective?-Which sunscreen (A or B) is more effective? -After the experiment those using sunscreen A have less skin-After the experiment those using sunscreen A have less skin damage. But we cannot definitely say A is more effective than Bdamage. But we cannot definitely say A is more effective than B because those using sunscreen A may be themselves lessbecause those using sunscreen A may be themselves less sensitive to sunlight.sensitive to sunlight. - So to eliminate the- So to eliminate the extraneous factorextraneous factor-- the state of being sensitivethe state of being sensitive to sunlightto sunlight we change the study design as followwe change the study design as follow - Apply A to right side and B to left side ofApply A to right side and B to left side of samesame subject’s backsubject’s back and let him expose to sunshineand let him expose to sunshine - Then see the skin damage at both sidesThen see the skin damage at both sides - If the skin area under A show less damage, we can definitelyIf the skin area under A show less damage, we can definitely say that A is more effective than B in protection againstsay that A is more effective than B in protection against sunshine (as we’d already eliminated the extraneous factor)sunshine (as we’d already eliminated the extraneous factor)
  • 27. - Paired or related observation may be obtained by-Paired or related observation may be obtained by- - (a) Same subjects measured before and after treatment(a) Same subjects measured before and after treatment - (b) Same subjects measured different observers(b) Same subjects measured different observers - (c) Litter mates of same sex assigned to different treatments(c) Litter mates of same sex assigned to different treatments - (d) Pairs of twins or siblings assigned to different treatments(d) Pairs of twins or siblings assigned to different treatments - (e) Matching individuals on some characteristics(e) Matching individuals on some characteristics
  • 28. Example 5:Example 5:  Gallbladder ejection fraction (GBEF) before and after surgeryGallbladder ejection fraction (GBEF) before and after surgery Preop (%)Preop (%) Postop (%)Postop (%) ddii 22 63.5 41.522 63.5 41.5 63.3 91.5 28.263.3 91.5 28.2 96 59 -37.096 59 -37.0 9.2 37.8 28.69.2 37.8 28.6 3.1 10.1 7.03.1 10.1 7.0 50 19.6 -30.450 19.6 -30.4 33 41 8.033 41 8.0 69 87.8 18.869 87.8 18.8 64 86 22.064 86 22.0 18.8 55 36.218.8 55 36.2 0 88 88.00 88 88.0 34 40 6.034 40 6.0
  • 29. 1.Data: GBEF for 12 subjects before and after surgery given1.Data: GBEF for 12 subjects before and after surgery given ddii = postop – preop differences calculated= postop – preop differences calculated 2. Assumption: A sample of differences comes from a normally2. Assumption: A sample of differences comes from a normally distributed pop of differencesdistributed pop of differences 3. Hypothesis:3. Hypothesis: HH00 :: µµdd ≤ 0 (µ≤ 0 (µdd is pop mean difference)is pop mean difference) HHAA : µ: µdd > 0> 0 (We expect(We expect ddii is positive ie greater than zero)is positive ie greater than zero) 4. Test statistic:4. Test statistic: t = d - µt = d - µdodo / s/ sdd d = mean ofd = mean of ddii ( or sample mean difference)( or sample mean difference) µµdodo = hypothesized sample mean difference= hypothesized sample mean difference ssdd = s= sdd //√ n ( n is number of sample difference,√ n ( n is number of sample difference, ssdd is SD of sample meanis SD of sample mean difference)difference)
  • 30. 5. Distribution of5. Distribution of test statistic:test statistic: IfIf HH00 is true, test statistic is distributed as student’ t with n-1 dfis true, test statistic is distributed as student’ t with n-1 df 6. Decision rule:6. Decision rule: LetLet αα = 0.05, Critical value of t is 1.7959= 0.05, Critical value of t is 1.7959 RejectReject HH00 if computed value is greater than or equal to criticalif computed value is greater than or equal to critical value (see fig.)value (see fig.) 7. Calculation of test statistic:7. Calculation of test statistic: d = (41.5 + 28.2+……..+ 6.0 ) / 12 = 216.9 / 12 = 18.075d = (41.5 + 28.2+……..+ 6.0 ) / 12 = 216.9 / 12 = 18.075 SS22 dd = ∑ (d= ∑ (dii – d)2 / n-1 = 1068.0930– d)2 / n-1 = 1068.0930 t = d - µt = d - µdodo / s/ sdd = 18.075 – 0 /= 18.075 – 0 / √ (1068.0930 /12)√ (1068.0930 /12) = 1.9159= 1.9159
  • 31. 8. Statistical decision:8. Statistical decision: Reject since 1.9159 is in rejection regionReject since 1.9159 is in rejection region 9. Conclusion: We may conclude that surgery increases GBEF9. Conclusion: We may conclude that surgery increases GBEF 10. p value : 0.025 < p < 0.0510. p value : 0.025 < p < 0.05 (since 1.7959 <1.9159 < 2.2010)(since 1.7959 <1.9159 < 2.2010) Use of z in paired comparison:Use of z in paired comparison: Use following test statistic [Use following test statistic [σσ22 is known or large n with unknownis known or large n with unknown pop distribution (using CLT)]pop distribution (using CLT)] z = d - µz = d - µdd // σσdd // √ n√ n
  • 32.  IV. Hypothesis testing : A single population proportionIV. Hypothesis testing : A single population proportion  Test Procedure -- the same as in pop meanTest Procedure -- the same as in pop mean  1 or 2 sided test depending on question being asked1 or 2 sided test depending on question being asked  Large sampleLarge sample →→ apply CLTapply CLT  Test statistic isTest statistic is z = sample p - pz = sample p - p00 // √√ pp00qqoo / n/ n ( normally( normally distributed if Hdistributed if H00 is true)is true) (p(p00 and qand qoo are hypothesized values)are hypothesized values)
  • 33. Example 6Example 6.. Out of 301 Hispanic women, 24 has impaired fasting glucoseOut of 301 Hispanic women, 24 has impaired fasting glucose (IFG). Pop proportion (p) of IFG is 6.3%,(IFG). Pop proportion (p) of IFG is 6.3%, cited in an articlecited in an article. Is. Is there sufficient evidence to indicate that pop of Hispanic womenthere sufficient evidence to indicate that pop of Hispanic women in a county has a prevalence of IFGin a county has a prevalence of IFG higher than 6.3 %?higher than 6.3 %? 1. Data1. Data Sample p = 24/301 = 0.080Sample p = 24/301 = 0.080 Pop p = 0.063Pop p = 0.063 n = 301n = 301 2. Assumption2. Assumption Sample is a simple random and the sampling distribution isSample is a simple random and the sampling distribution is assumed to be approx. normally distributed (CLT)assumed to be approx. normally distributed (CLT) 3. Hypothesis3. Hypothesis HH00 : p: p ≤ 0.063≤ 0.063 HHAA : p > 0.063: p > 0.063
  • 34. 4. Test statistic4. Test statistic z = sample p - pz = sample p - p00 // √√ pp00qqoo / n/ n 5. Distribution of t5. Distribution of test statisticest statistic If HIf H00 is true,is true, ttest statistic is approx normally distributed with aest statistic is approx normally distributed with a mean zeromean zero 6. Decision rule6. Decision rule LetLet αα = 0.05. Critical value (z) is 1.645.= 0.05. Critical value (z) is 1.645. RejectReject HH00 if computed value z is ≥ 1.645if computed value z is ≥ 1.645 7. Calculation of7. Calculation of ttest statisticest statistic z = sample p - pz = sample p - p00 // √√ pp00qqoo / n/ n = 0.080 – 0.063 /= 0.080 – 0.063 / √ (0.063× 0.937 /301)√ (0.063× 0.937 /301) = 1.21= 1.21 8. Statistical decision8. Statistical decision Do not rejectDo not reject HH00 since 1.21 < 1.645since 1.21 < 1.645
  • 35. 99.. Conclusion: We cannot conclude that prevalence IFG is higherConclusion: We cannot conclude that prevalence IFG is higher than 6.3%than 6.3% 10. P value: p = 0.113110. P value: p = 0.1131 V. Hypothesis testing : The difference between two populationV. Hypothesis testing : The difference between two population proportionsproportions  Test statistic is:Test statistic is: z = (sample pz = (sample p11 - sample p- sample p22) – (p) – (p11 – p– p22))00 / SE/ SE SE is based on pooled estimateSE is based on pooled estimate SE =SE = √ (pq / n√ (pq / n11) + (pq / n) + (pq / n22))  (see example in text)(see example in text)
  • 36. END OF HYPOTHESIS TESTINGEND OF HYPOTHESIS TESTING PART IPART I