lecture 9a (significancy test for categorical data)
TRANSCRIPT
![Page 1: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/1.jpg)
Significancy test for Significancy test for categorical and Interval Datacategorical and Interval Data
![Page 2: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/2.jpg)
Learning Objective Learning Objective
• Be able to understand the significance test for categorical and interval data
![Page 3: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/3.jpg)
Hypothesis TestingHypothesis Testing
PARAMETRIC• Compare Mean:
z, t and Anova test
• Association:Correlation
Regression
NONPARAMETRIC• Compare Mean
Mann Whitney, Wilcoxon
• Association:Spearman Correlation
Normally Distributed data Not Normally distributed
![Page 4: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/4.jpg)
HypothesisHypothesis
• Research HypothesisTemporary conclusion based on theory and/or previous study
• Statistical HypothesisHypothesis that going to be testedConsist Null Hypothesis and Alternative Hypothesis
![Page 5: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/5.jpg)
Hypothesis Testing StepsHypothesis Testing Steps
• Define the null and alternative hypothesis
• Collect relevant data• Calculate the value of the test-statistics
specific to Ho• Interpretation the result
![Page 6: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/6.jpg)
Define the null (Ho) and alternative Define the null (Ho) and alternative hypothesis (Ha) hypothesis (Ha)
• Ho assumes no effect or no different or no association
• Ha which hold if the null hypothesis is not
true. It relates more directly to the theory we wish to investigate
![Page 7: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/7.jpg)
Ho and Ha…cont.Ho and Ha…cont.
• If we wish to identify whether the rate of smoking differ by sex
Ho. The smoking rate are the same in men and women in the populationmen = women
Ha. The smoking rate are different in men and women in the populationmen # women
![Page 8: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/8.jpg)
Ho and Ha…cont.Ho and Ha…cont.
• If we wish to identify whether the rate of smoking differ by sex
Ho. The smoking rate are the same or lower among men than among women in the populationmen ≤ women
Ha. The smoking rate are higher among men than among women in the populationmen > women
![Page 9: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/9.jpg)
P valueP value• TERMINOLOGY:
The probability of obtaining the same result or event more extreme, if the null hypothesis is true
• USING THE P VALUE:p ≤ 0,05, there is sufficient evidence to reject the null hypothesisor there is a small chance of the result occurring if the null hypothesis were true and then we say the result are significant
p > 0,05, there is insufficient evidence to reject the null hypothesis and we say that the result are not significant
![Page 10: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/10.jpg)
Error in hypothesis testingError in hypothesis testing
Reject Ho Do not reject Ho
Ho is true Type I error()
No error
Ho is false No error Type II error()
![Page 11: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/11.jpg)
Which test to use?Which test to use?
Depend on:• The design of study
(one sample, two dependent samples, two independent samples)
• The type of variable (categorical, continuous)
• The distribution of data being studied (normal, t, F, Chi square, binomial)
![Page 12: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/12.jpg)
TOPICS • Single proportion analysis• Two proportion analysis
![Page 13: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/13.jpg)
Single ProportionSingle Proportion
Case 1: (DGK Data) Should we conclude that the proportion of
anemia among pregnant mothers is different from 40%
Hypothesis testing used is Binomial Test
IndicationTo compare a proportion of one sample with a test value
![Page 14: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/14.jpg)
POPULATION = p (anemia)
SAMPELp
Could we conclude that is differ from 0,40?
Ho. = 0,40Ha. # 0,40
Compare a sample proportion (p) with a test value (0,40)
![Page 15: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/15.jpg)
Hypothesis: Ho: = 0,40 Ha: # 0,40
Decision rule: Reject Ho, if p Accept Ho, if p >
Binomial Test
Normal 172 ,7 ,4 ,000a
Anemia 59 ,3231 1,0
Group 1Group 2Total
Status Hb. sbl. intervensiCategory N
ObservedProp. Test Prop.
Asymp. Sig.(1-tailed)
Based on Z Approximation.a.
Ho Rejected; which signify that proportion of anemia among pregnant women significantly differ from 40%
![Page 16: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/16.jpg)
Two ProportionsTwo Proportions
Case 2: (DGK Data) Should we conclude that the proportion of
anemia among pregnant mothers in Gianyar and Klungkung are different
Hypothesis testing used is Chi-square
![Page 17: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/17.jpg)
GIANYAR
KARANGASEM
P1 P2
POPULASI
SAMPEL
COMPARE SAMPLE
PROPORTION USING X2 TEST
![Page 18: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/18.jpg)
Hypothesis: Ho: 1 = 2 Ha: 1 # 2
Decision rule: Reject Ho, if p Do not reject Ho, if p >
Kabupaten
Anemia Non anemia
Total
Gianyar a b a+b
Karangasem c d c+d
Total a+c b+d n
Calculate the value of the test statistic
i
ii
EEO
X2
2 5,0
![Page 19: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/19.jpg)
Kabupaten * Status Hb. sbl. intervensi Crosstabulation
33 102 13524,4% 75,6% 100,0%
26 70 9627,1% 72,9% 100,0%
59 172 23125,5% 74,5% 100,0%
Count% within KabupatenCount% within KabupatenCount% within Kabupaten
Gianyar
Karangasem
Kabupaten
Total
Anemia Normal
Status Hb. sbl.intervensi
Total
Chi-Square Tests
,205b 1 ,650,090 1 ,764,205 1 ,651
,650 ,381
,205 1 ,651
231
Pearson Chi-SquareContinuity Correctiona
Likelihood RatioFisher's Exact TestLinear-by-LinearAssociationN of Valid Cases
Value dfAsymp. Sig.
(2-sided)Exact Sig.(2-sided)
Exact Sig.(1-sided)
Computed only for a 2x2 tablea.
0 cells (,0%) have expected count less than 5. The minimum expected count is24,52.
b.
![Page 20: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/20.jpg)
TOPICS • A Single sample• Two independent samples• Two dependent samples• More the two samples
![Page 21: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/21.jpg)
A Single GroupA Single Group
Case 3: (DGK Data) Should we conclude that the mean of
Hemoglobin Pretest is different from 12 g/dl
Hypothesis test used is One sample t-test
![Page 22: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/22.jpg)
POPULATION (Hb)
SAMPELmean
Could we conclude that (Hb) is different from 12?Ho. (Hb) = 12Ha. (Hb) # 12
Compare a sample mean with a test value (12)
![Page 23: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/23.jpg)
Hypothesis: Ho: = 12 Ha: # 12
Decision rule: Reject Ho, if p Do not reject Ho, if p >
nSDXt
/
Calculate the value of the test statistic
![Page 24: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/24.jpg)
Ho rejected, which suggest mean Hb-pre differ significantly from 12 g/dl
One-Sample Statistics
231 11,682 1,0768 ,0708Hb. sbl intervensiN Mean Std. Deviation
Std. ErrorMean
One-Sample Test
-4,491 230 ,000 -,3182 -,458 -,179Hb. sbl intervensit df Sig. (2-tailed)
MeanDifference Lower Upper
95% ConfidenceInterval of the
Difference
Test Value = 12
![Page 25: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/25.jpg)
Two Independent Samples/ GroupsTwo Independent Samples/ Groups
Case 4: (DGK Data) Should we conclude that the Hbpre
between Gianyar and Karangasem are equal.
Hypothesis testing used is Independent samples T-Test
![Page 26: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/26.jpg)
GIANYARμ1
KARANGASEMμ2
mean1 mean2
POPULATION
SAMPLECOMPARE
SAMPLE MEAN USING T- TEST
![Page 27: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/27.jpg)
Hypothesis: Ho: 1 = 2 Ha: 1 # 2
Decision rule: Reject Ho, if p Do not reject Ho, if p >
21
21
1nn
Sp
xxt
21
21
1nn
S
xxt
Equal variance Unequal variance
![Page 28: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/28.jpg)
Ho does not rejected, which suggest that mean Hb-pre Gianyar is not significantly differ from that of Karangasem
Group Statistics
135 11,729 1,0941 ,094296 11,616 1,0541 ,1076
KabupatenGianyarKarangasem
Hb. sbl intervensiN Mean Std. Deviation
Std. ErrorMean
Independent Samples Test
,055 ,815 ,788 229 ,432 ,1133 ,1439 -,1702 ,3968
,793 209,256 ,429 ,1133 ,1430 -,1685 ,3952
Equal variancesassumedEqual variancesnot assumed
Hb. sbl intervensiF Sig.
Levene's Test forEquality of Variances
t df Sig. (2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
![Page 29: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/29.jpg)
Two Dependent GroupsTwo Dependent Groups
Case 4: (DGK Data) Should we conclude that the Hbpre equal
to the Hbpost.
Hypothesis testing used is Paired samples T-Test
Hb-pre Hb-postcompare
![Page 30: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/30.jpg)
Hypothesis: Ho: d = 0 Ha: d # 0
Decision rule: Reject Ho, if p Do not reject Ho, if p >
Calculate the value of the test statistic
nSddt
![Page 31: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/31.jpg)
Ho rejected; mean Hb-pre significantly differ from mean Hb-post
Paired Samples Statistics
11,682 231 1,0768 ,070812,358 231 1,1808 ,0777
Hb. sbl intervensiHb. stl intervensi
Pair1
Mean N Std. DeviationStd. Error
Mean
Paired Samples Test
-,6766 ,8396 ,0552 -,7855 -,5678 -12,248 230 ,000Hb. sbl intervensi -Hb. stl intervensi
Pair1
Mean Std. DeviationStd. Error
Mean Lower Upper
95% ConfidenceInterval of the
Difference
Paired Differences
t df Sig. (2-tailed)
![Page 32: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/32.jpg)
More Then Two GroupsMore Then Two Groups
Case 6: (DGK Data) Should we concluded that the Hbpost
between gestation ages (Trimester) are equal.
Hypothesis testing used is One-way Anova
Hypothesis: Ho: 1 = 2= 3
Ha: not all equal
Decision rule: Reject Ho, if p Do not reject Ho, if p >
![Page 33: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/33.jpg)
Ho rejected,which signify at least mean Hb from one trimester differ significantly from the other trimester
Descriptives
Hb. stl intervensi
14 12,450 1,0450 ,2793 11,847 13,053 10,3 14,1177 12,475 1,1452 ,0861 12,305 12,645 9,7 14,940 11,810 1,2518 ,1979 11,410 12,210 9,5 14,2
231 12,358 1,1808 ,0777 12,205 12,512 9,5 14,9
Trimester ITrimester IITrimester IIITotal
N Mean Std. Deviation Std. Error Lower Bound Upper Bound
95% Confidence Interval forMean
Minimum Maximum
ANOVA
Hb. stl intervensi
14,559 2 7,280 5,422 ,005306,122 228 1,343320,681 230
Between GroupsWithin GroupsTotal
Sum ofSquares df Mean Square F Sig.
![Page 34: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/34.jpg)
Post Hoc Tests
Multiple Comparisons
Dependent Variable: Hb. stl intervensiLSD
-,0251 ,3217 ,938 -,659 ,609,6400 ,3598 ,077 -,069 1,349,0251 ,3217 ,938 -,609 ,659,6651* ,2029 ,001 ,265 1,065
-,6400 ,3598 ,077 -1,349 ,069-,6651* ,2029 ,001 -1,065 -,265
(J) Kelp. umur kehamilanTrimester IITrimester IIITrimester ITrimester IIITrimester ITrimester II
(I) Kelp. umur kehamilanTrimester I
Trimester II
Trimester III
MeanDifference
(I-J) Std. Error Sig. Lower Bound Upper Bound95% Confidence Interval
The mean difference is significant at the .05 level.*.
Mean Hb post women at 1st trimester is not different with the 2nd trimester; but… Mean Hb-post women at 2nd semester different from the 3rd trimester
![Page 35: LECTURE 9a (Significancy Test for Categorical Data)](https://reader036.vdocuments.mx/reader036/viewer/2022062316/577cc7321a28aba711a043b7/html5/thumbnails/35.jpg)