SlideShare a Scribd company logo
1 of 54
FK6163 
Analysis of Qualitative 
Data 
Dr Azmi Mohd Tamil 
Dept of Community Health 
Universiti Kebangsaan Malaysia
Statistical Tests - Qualitative
CHI-SQUARE 
TEST
CHI-SQUARE TEST 
 The most basic and common form of 
statistical analysis in the medical 
literature. 
 Data is arranged in a contingency table 
(R X C) comparing 2 qualitative data. 
 R stands for number of rows and C 
stands for number of columns.
CHI-SQUARE TEST 
 There are two different types of chi-square 
(c2) tests, both involve 
categorical data. 
1. The chi-square for goodness of fit 
2. The chi-square test for independence
1. The chi-square for 
goodness of fit 
 Also referred to as one-sample chi-square. 
 It explores the proportion of cases that 
fall into the various categories of a 
single variable, and compares these 
with hypothesized values
1. The chi-square for 
goodness of fit 
 We test that the null hypothesis that the 
observed frequencies, proportion, 
percentage distribution for an 
experiment or a survey follow a certain 
or a given pattern theoretical distribution 
(hypothesized value)
2. The chi-square test for 
independence 
 It is used to determine if two categorical 
variables are related. 
 It compares the frequency of cases 
found in the various categories of one 
variable across the different categories 
of another variable. 
 Each of these variables can have two or 
more categories.
2. The chi-square test for 
independence 
 Example of research questions: 
• Are males more likely to be smokers than 
females? 
• Is the proportion of males that smoke the 
same as the proportion of females? 
– Comparing the rate of smokers between males 
& females. 
• Is there a relationship between gender and 
smoking behaviour?
2. The chi-square test for 
independence 
 Two categorical variables involved (with 
two or more categories in each): 
• Gender (Male / Female) 
• Smoker (Yes / No)
Assumptions for c2 
 Random samples 
 Independent observations. Each 
person or case can only be counted 
once, they cannot appear in more than 
one category or group, and the data 
from one subject cannot influence the 
data from another. 
 Lowest expected frequency in any cell 
should be 5 or more.
CHI-SQUARE TEST 
CRITERIA: 
 Both variables are qualitative data. 
 Sample size of ≥ 20. 
 No cell that has expected value of < 5.
CONTINGENCY TABLE 
INFECTION YES NO TOTAL 
MALE a (rate dis 
exposed) 
b e 
FEMALE c (rate dis 
non 
exposed) 
d f 
TOTAL g h n
Example:
CHI-SQUARE TEST 
 E = expected value 
 Expected value for cell a : 
e X g 
n 
 Expected value for cell b : 
e X h 
n
Why expected value? 
 Expected value is when the rate of the 
disease for both population are the 
same. 
 If the rate of the disease are the same, 
therefore no difference of rate, therefore 
no association between risk factor and 
outcome. Null hypothesis would be 
TRUE.
Observed vs Expected 
Observed Smoking Non-smoking 
Male 20 (40%) 30 50 
Female 5 (10%) 45 50 
25 75 100 
Expected Smoking Non-smoking 
Male 12.5 (25%) 37.5 (75%) 50 
Female 12.5 (25%) 37.5 (75%) 50 
25 75 100
FORMULA 
c2 = å [ (O – E) 2 ] 
E
FORMULA 
Only for 2 x 2 table
The steps for a c2 test 
 Formulate the null and alternative 
hypotheses, and select an α -level. 
 Collect a sample and compute the 
statistic of interest. 
 Determine the degree of freedom 
(R – 1) (C –1 )
The steps for a c2 test 
 Arrange data in contingency table. 
 Calculate expected value for each cell. 
 Calculate c2 test
The steps for a c2 test 
 Determine the critical values of the test 
statistic as determined by the α -level. 
 Compare the test statistic to the critical 
values. If the test statistic is : 
• more than the critical values, reject null 
hypothesis. 
• Equal or less than the critical values, fail to 
reject null hypothesis.
Example:
Example:
 X2 = (29 – 25.44)2 + (24 – 27.56)2 + (67-70.56)2 + (80 – 76.44)2 
25.44 27.56 70.56 76.44 
 X2 = 1.303
Refer to Table 3. 
Look at df = 1. 
X2 = 1.303, larger than 0.45 
(p=0.5) but smaller than 1.32 
(p=0.25). 
0.45 (p=0.5) < 1.303 < 1.32 (p=0.25) 
Therefore if X2 = 1.303, 
0.5>p>0.25. 
Since the calculated p > 0.05, null 
hypothesis not rejected.
Example: 
 X2 = (29 – 25.44)2 + (24 – 27.56)2 + (67-70.56)2 + (80 – 76.44)2 
25.44 27.56 70.56 76.44 
 X2 = 1.303 
 df = (2-1)(2-1) = 1 
 Critical value for df = 1 for p=0.05 is 3.84, 
 The calculated X2 is smaller than the critical 
value, therefore the null hypothesis is not 
rejected. 
 Conclusion: No association between the risk 
factor and the outcome. 
 Hint: Memorise critical values of 3.84 for df=1 
and 5.99 for df=2.
Validity of X2 
 For contingency tables larger than 2x2 
(i.e. 3x2 or 3x3), X2 is valid if less than 
20% of the expected values are less 
than 5 and none are less than one. 
 If there are many expected values of 
less than 5, you can try merging the 
cells with small values to overcome this 
problem.
Examples for Validity of 
X2 
 Only one cell out 
of six cells have 
expected values 
of less than 5, 
which is 3.5. 
 1/6 = 16.67%, 
less than 20%, so 
X2 still valid. 
Observed Stressed Not 
Stressed 
Total 
Underweight 6 14 20 
Normal 50 20 70 
Overweight 9 1 10 
Total 65 35 100 
Expected Stressed Not 
Stressed 
Total 
Underweight 13 7 20 
Normal 46 25 70 
Overweight 6.5 3.5 10 
Total 65 35 100
YATES’ CORRECTION 
 When sample sizes are small, the use of 
c2 will introduces some bias into the 
calculation, so that the c2 value tends to 
be a little too large. 
 To remove the bias, we use continuity 
correction (Yates’ Correction)
CRITERIA FOR YATES 
CORRECTION 
 Both variables are dichotomous 
qualitative (2 X 2 table). 
 Sample size of ≥ 40. 
 One or more of the cells has expected 
value of < 5.
YATES CORRECTION 
FORMULA 
c2 = å [ (|O – E | – 0.5) 2 ] 
E
FISHER’S EXACT TEST 
CRITERIA: 
 Both variables are dichotomous 
qualitative (2 X 2 table). 
 Sample size of < 20. 
 Sample size of 20 to < 40 but one of the 
cell has expected value of < 5.
FORMULA FOR 
FISHER’S EXACT TEST 
( a + b )! ( a + c )! ( b + d )! ( c + d)! 
N! a! b! c! d! 
Weird since you have to calculate for 
many tables, until one of the cell 
becomes 0, then total up all the p 
values.
Example 
There is an association between the prevalence of underweight and the 
type of vehicle driven by the public vehicle drivers. 
In this analysis, it is a 2 X 2 table, cells with an expected value < 5 (4.67) 
and small sample size, therefore the best type of analysis possible is 
Fisher’s Exact Test.
Step 1 
 ( a + b )! ( a + c )! ( b + d )! ( c + d)! 
N! a! b! c! d! 
 p1 = 19!14!11!22! 
33!8!11!3!11! 
= 4.758 x 1056 = 0.142 
3.3471 x 1057
Step 2 
 Create 3 more extreme tables by deducting 1 
from the smallest value. Continue to do so till 
the cell becomes zero; 
 p2 = 0.0434 
p3 = 0.00668 
p4 = 0.00039
Step 3 
 Total p = 0.142+0.0434+0.00668+0.00039 
= 0.19247 
 This is the p value for single-tailed test. To 
make it the p value for 2 tailed, times the 
value with 2; p = 0.385. 
 p is bigger than 0.05, therefore the null 
hypothesis is not rejected. 
 There is no association between 
occupation and UW ;-)
SPSS Output 
KERJA * OBESITI Crosstabulation 
Count 
OBESITI 
8 11 19 
3 11 14 
11 22 33 
Bus Driver 
Taxi Driver 
KERJA 
Total 
Underweight Normal 
Total 
Chi-Square Tests 
1.551b 1 .213 
.760 1 .383 
1.598 1 .206 
.278 .193 
1.504 1 .220 
33 
Pearson Chi-Square 
Continuity Correctiona 
Likelihood Ratio 
Fisher's Exact Test 
Linear-by-Linear 
Association 
N of Valid Cases 
Value df 
Asymp. Sig. 
(2-sided) 
Exact Sig. 
(2-sided) 
Exact Sig. 
(1-sided) 
a. Computed only for a 2x2 table 
b. 
1 cells (25.0%) have expected count less than 5. The minimum expected count is 
4.67.
McNemar Test 
 It is a test to compare before and after 
findings in the same individual or to 
compare findings in a matched analysis 
(for dichotomous variables) 
 Example: a researcher wanted to 
compare the attitudes of medical 
students toward confidence in statistics 
analysis before and after the intensive 
statistics course.
Data Collected 
Post-course 
+ve -ve Total 
Concordant 
discordant 
Pre- +ve 20 (a) 8(b) 28 
course -ve 22 (c) 150(d) 172 
Total 42 158 200
McNemar 
 SIGNIFICANCE OF DIFFERENCE IN 
EXPOSURE 
X²= (b-c)² / (b + c) (1 df) 
if b + c > 25 
Odds ratio = c / b
Calculation 
 McNemar c2 = ( b – c )2 
 b + c 
 = ( 22 – 8)2 
 22 + 8 
 = 6.5333 
 OR = c/b = 22/8 = 2.75
Calculation of the degree 
of freedom 
df = (R – 1) (C – 1) 
= (2 – 1) (2 – 1) 
= 1
Refer to Table 3. 
Look at df = 1. 
X2 = 6.53, larger than 5.02 
(p=0.025) but smaller than 6.63 
(p=0.01). 
5.02 (p=0.025) < 6.53 < 6.63 (p=0.01) 
Therefore if X2 = 6.53, 
0.01<p<0.025. 
Since the calculated p < 0.05, null 
hypothesis rejected.
Determination of 
the p value 
Value from the chi-square table for 6.53 
on df=1, p < 0.02 (statistically 
significant) 
Interpretation: there is a significant 
change in the attitudes of medical 
students toward confidence in statistics 
analysis before and after the intensive 
statistics course.
Continuity Correction for 
McNemar Test 
McNemar c2 = ( | b – c | - 1)2 
b + c 
When b+c is less than 25
Also use in matched pair 
case-control studies 
Example;
MATCHED PAIR C-C STUDY 
CASES 
Exposed Not exposed 
Exposed 
Not 
exposed 
a b 
(both pairs exposed) ( pairs of controls exposed) 
c d 
(pairs of cases exposed) (both pairs not exposed) 
C 
O 
N 
T 
R 
O 
L
MATCHED PAIRS C-C STUDY 
 SIGNIFICANCE OF DIFFERENCE IN 
EXPOSURE 
X²= (b-c)² / b + c (1 df) 
Odds ratio = c / b
McNemar in SPSS 
 The code for before and after (or case & 
control) must be similar. 
 i.e. if one uses 1 for “Present” for before, 
1 should also means the same for after.
McNemar in SPSS 
 Data should be entered in 
pairs as illustrated on the 
left here.
SPSS – Crosstabs 
Command
SPSS Output 
Before * After Crosstabulation 
Count 
After 
20 8 28 
22 150 172 
42 158 200 
Positive 
Negative 
Before 
Total 
Positive Negative 
Total 
Chi-Square Tests 
.016a 
200 
McNemar Test 
N of Valid Cases 
Value 
Exact Sig. 
(2-sided) 
Binomial a. distribution used.

More Related Content

What's hot

Test of significance in Statistics
Test of significance in StatisticsTest of significance in Statistics
Test of significance in StatisticsVikash Keshri
 
Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSSLNIPE
 
t-TEst. :D
t-TEst. :Dt-TEst. :D
t-TEst. :Dpatatas
 
wilcoxon signed rank test
wilcoxon signed rank testwilcoxon signed rank test
wilcoxon signed rank testraj shekar
 
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
Parametric test  - t Test, ANOVA, ANCOVA, MANOVAParametric test  - t Test, ANOVA, ANCOVA, MANOVA
Parametric test - t Test, ANOVA, ANCOVA, MANOVAPrincy Francis M
 
Multiple Regression and Logistic Regression
Multiple Regression and Logistic RegressionMultiple Regression and Logistic Regression
Multiple Regression and Logistic RegressionKaushik Rajan
 
Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and RegressionShubham Mehta
 
General Linear Model | Statistics
General Linear Model | StatisticsGeneral Linear Model | Statistics
General Linear Model | StatisticsTransweb Global Inc
 
Confidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewConfidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewRizwan S A
 
What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...Smarten Augmented Analytics
 
Inferential statistics.ppt
Inferential statistics.pptInferential statistics.ppt
Inferential statistics.pptNursing Path
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Dr Bryan Mills
 
Survival analysis
Survival analysisSurvival analysis
Survival analysisHar Jindal
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionDrZahid Khan
 

What's hot (20)

Test of significance in Statistics
Test of significance in StatisticsTest of significance in Statistics
Test of significance in Statistics
 
Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSS
 
t-TEst. :D
t-TEst. :Dt-TEst. :D
t-TEst. :D
 
wilcoxon signed rank test
wilcoxon signed rank testwilcoxon signed rank test
wilcoxon signed rank test
 
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
Parametric test  - t Test, ANOVA, ANCOVA, MANOVAParametric test  - t Test, ANOVA, ANCOVA, MANOVA
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
 
Multiple Regression and Logistic Regression
Multiple Regression and Logistic RegressionMultiple Regression and Logistic Regression
Multiple Regression and Logistic Regression
 
Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
 
General Linear Model | Statistics
General Linear Model | StatisticsGeneral Linear Model | Statistics
General Linear Model | Statistics
 
Comparing means
Comparing meansComparing means
Comparing means
 
The mann whitney u test
The mann whitney u testThe mann whitney u test
The mann whitney u test
 
Confidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewConfidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overview
 
What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...
 
Inferential statistics.ppt
Inferential statistics.pptInferential statistics.ppt
Inferential statistics.ppt
 
Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
 
Fishers test
Fishers testFishers test
Fishers test
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
 
T test
T testT test
T test
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
Survival analysis
Survival analysisSurvival analysis
Survival analysis
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 

Viewers also liked

Non-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
Non-parametric analysis: Wilcoxon, Kruskal Wallis & SpearmanNon-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
Non-parametric analysis: Wilcoxon, Kruskal Wallis & SpearmanAzmi Mohd Tamil
 
Penulisan gaya ukm (2011 2012)
Penulisan gaya ukm (2011 2012)Penulisan gaya ukm (2011 2012)
Penulisan gaya ukm (2011 2012)Syahmi Jaafar
 
Pearson Correlation, Spearman Correlation &Linear Regression
Pearson Correlation, Spearman Correlation &Linear RegressionPearson Correlation, Spearman Correlation &Linear Regression
Pearson Correlation, Spearman Correlation &Linear RegressionAzmi Mohd Tamil
 
Data collection & management
Data collection & managementData collection & management
Data collection & managementAzmi Mohd Tamil
 
Prevention of Non-Communicable Diseases in Malaysia
Prevention of Non-Communicable Diseases in MalaysiaPrevention of Non-Communicable Diseases in Malaysia
Prevention of Non-Communicable Diseases in MalaysiaAzmi Mohd Tamil
 
Epidemiology of diseases in Malaysia
Epidemiology of diseases in Malaysia Epidemiology of diseases in Malaysia
Epidemiology of diseases in Malaysia Azmi Mohd Tamil
 
Understanding Malaysian Health Statistics
Understanding Malaysian Health StatisticsUnderstanding Malaysian Health Statistics
Understanding Malaysian Health StatisticsAzmi Mohd Tamil
 
Chronic Disease In Malaysia
Chronic Disease In MalaysiaChronic Disease In Malaysia
Chronic Disease In MalaysiaRashidi Ahmad
 
Running Pearson's Correlation on SPSS
Running Pearson's Correlation on SPSSRunning Pearson's Correlation on SPSS
Running Pearson's Correlation on SPSSAzmi Mohd Tamil
 
Research Methodology - Study Designs
Research Methodology - Study DesignsResearch Methodology - Study Designs
Research Methodology - Study DesignsAzmi Mohd Tamil
 

Viewers also liked (11)

Non-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
Non-parametric analysis: Wilcoxon, Kruskal Wallis & SpearmanNon-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
Non-parametric analysis: Wilcoxon, Kruskal Wallis & Spearman
 
Penulisan gaya ukm (2011 2012)
Penulisan gaya ukm (2011 2012)Penulisan gaya ukm (2011 2012)
Penulisan gaya ukm (2011 2012)
 
Pearson Correlation, Spearman Correlation &Linear Regression
Pearson Correlation, Spearman Correlation &Linear RegressionPearson Correlation, Spearman Correlation &Linear Regression
Pearson Correlation, Spearman Correlation &Linear Regression
 
Data collection & management
Data collection & managementData collection & management
Data collection & management
 
Prevention of Non-Communicable Diseases in Malaysia
Prevention of Non-Communicable Diseases in MalaysiaPrevention of Non-Communicable Diseases in Malaysia
Prevention of Non-Communicable Diseases in Malaysia
 
Epidemiology of diseases in Malaysia
Epidemiology of diseases in Malaysia Epidemiology of diseases in Malaysia
Epidemiology of diseases in Malaysia
 
T test and ANOVA
T test and ANOVAT test and ANOVA
T test and ANOVA
 
Understanding Malaysian Health Statistics
Understanding Malaysian Health StatisticsUnderstanding Malaysian Health Statistics
Understanding Malaysian Health Statistics
 
Chronic Disease In Malaysia
Chronic Disease In MalaysiaChronic Disease In Malaysia
Chronic Disease In Malaysia
 
Running Pearson's Correlation on SPSS
Running Pearson's Correlation on SPSSRunning Pearson's Correlation on SPSS
Running Pearson's Correlation on SPSS
 
Research Methodology - Study Designs
Research Methodology - Study DesignsResearch Methodology - Study Designs
Research Methodology - Study Designs
 

Similar to Chi-square, Yates, Fisher & McNemar

Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptBAGARAGAZAROMUALD2
 
Test of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testTest of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testdr.balan shaikh
 
Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Beamsync
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-testChristina K J
 
Non parametrics tests
Non parametrics testsNon parametrics tests
Non parametrics testsrodrick koome
 
NON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxNON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxDrLasya
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis TestingRyan Herzog
 
Lect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testLect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testRione Drevale
 
Chapter 07 Chi Square
Chapter 07 Chi SquareChapter 07 Chi Square
Chapter 07 Chi Squareghalan
 

Similar to Chi-square, Yates, Fisher & McNemar (20)

Non Parametric Statistics
Non Parametric StatisticsNon Parametric Statistics
Non Parametric Statistics
 
Chapter12
Chapter12Chapter12
Chapter12
 
Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
 
Test of significance
Test of significanceTest of significance
Test of significance
 
Medical statistics2
Medical statistics2Medical statistics2
Medical statistics2
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Topic 1 part 2
Topic 1 part 2Topic 1 part 2
Topic 1 part 2
 
Factorial Experiments
Factorial ExperimentsFactorial Experiments
Factorial Experiments
 
Test of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square testTest of-significance : Z test , Chi square test
Test of-significance : Z test , Chi square test
 
Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9
 
Chisquare Test
Chisquare Test Chisquare Test
Chisquare Test
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-test
 
Non parametrics tests
Non parametrics testsNon parametrics tests
Non parametrics tests
 
Chi square test
Chi square testChi square test
Chi square test
 
Two Variances or Standard Deviations
Two Variances or Standard DeviationsTwo Variances or Standard Deviations
Two Variances or Standard Deviations
 
Chi-square test.pptx
Chi-square test.pptxChi-square test.pptx
Chi-square test.pptx
 
NON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxNON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptx
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Lect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testLect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_test
 
Chapter 07 Chi Square
Chapter 07 Chi SquareChapter 07 Chi Square
Chapter 07 Chi Square
 

More from Azmi Mohd Tamil

Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
Hybrid setup - How to conduct simultaneous face-to-face and online presentati...Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
Hybrid setup - How to conduct simultaneous face-to-face and online presentati...Azmi Mohd Tamil
 
Audiovisual and technicalities from preparation to retrieval how to enhance m...
Audiovisual and technicalities from preparation to retrieval how to enhance m...Audiovisual and technicalities from preparation to retrieval how to enhance m...
Audiovisual and technicalities from preparation to retrieval how to enhance m...Azmi Mohd Tamil
 
Broadcast quality online teaching at zero budget
Broadcast quality online teaching at zero budgetBroadcast quality online teaching at zero budget
Broadcast quality online teaching at zero budgetAzmi Mohd Tamil
 
Video for Teaching & Learning: OBS
Video for Teaching & Learning: OBSVideo for Teaching & Learning: OBS
Video for Teaching & Learning: OBSAzmi Mohd Tamil
 
Bengkel 21-12-2020 - Etika atas Talian & Alat Minima
Bengkel 21-12-2020 - Etika atas Talian & Alat MinimaBengkel 21-12-2020 - Etika atas Talian & Alat Minima
Bengkel 21-12-2020 - Etika atas Talian & Alat MinimaAzmi Mohd Tamil
 
GIS & History of Mapping in Malaya (lecture notes circa 2009)
GIS & History of Mapping in Malaya (lecture notes circa 2009)GIS & History of Mapping in Malaya (lecture notes circa 2009)
GIS & History of Mapping in Malaya (lecture notes circa 2009)Azmi Mohd Tamil
 
Blended e-learning in UKMFolio
Blended e-learning in UKMFolioBlended e-learning in UKMFolio
Blended e-learning in UKMFolioAzmi Mohd Tamil
 
How to Compute & Recode SPSS Data
How to Compute & Recode SPSS DataHow to Compute & Recode SPSS Data
How to Compute & Recode SPSS DataAzmi Mohd Tamil
 
Introduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R StudioIntroduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R StudioAzmi Mohd Tamil
 
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...Azmi Mohd Tamil
 
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...Azmi Mohd Tamil
 
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic EquationCochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic EquationAzmi Mohd Tamil
 
New Emerging And Reemerging Infections circa 2006
New Emerging And Reemerging Infections circa 2006New Emerging And Reemerging Infections circa 2006
New Emerging And Reemerging Infections circa 2006Azmi Mohd Tamil
 
Hacks#36 -Raspberry Pi 4 Mini Computer
Hacks#36 -Raspberry Pi 4 Mini ComputerHacks#36 -Raspberry Pi 4 Mini Computer
Hacks#36 -Raspberry Pi 4 Mini ComputerAzmi Mohd Tamil
 
Hack#35 How to FB Live using a Video Encoder
Hack#35 How to FB Live using a Video EncoderHack#35 How to FB Live using a Video Encoder
Hack#35 How to FB Live using a Video EncoderAzmi Mohd Tamil
 
Hack#34 - Online Teaching with Microsoft Teams
Hack#34 - Online Teaching with Microsoft TeamsHack#34 - Online Teaching with Microsoft Teams
Hack#34 - Online Teaching with Microsoft TeamsAzmi Mohd Tamil
 
Skype for Business for UKM
Skype for Business for UKM Skype for Business for UKM
Skype for Business for UKM Azmi Mohd Tamil
 
Introduction to Structural Equation Modeling
Introduction to Structural Equation ModelingIntroduction to Structural Equation Modeling
Introduction to Structural Equation ModelingAzmi Mohd Tamil
 
Safe computing (circa 2004)
Safe computing (circa 2004)Safe computing (circa 2004)
Safe computing (circa 2004)Azmi Mohd Tamil
 

More from Azmi Mohd Tamil (20)

Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
Hybrid setup - How to conduct simultaneous face-to-face and online presentati...Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
 
Audiovisual and technicalities from preparation to retrieval how to enhance m...
Audiovisual and technicalities from preparation to retrieval how to enhance m...Audiovisual and technicalities from preparation to retrieval how to enhance m...
Audiovisual and technicalities from preparation to retrieval how to enhance m...
 
Broadcast quality online teaching at zero budget
Broadcast quality online teaching at zero budgetBroadcast quality online teaching at zero budget
Broadcast quality online teaching at zero budget
 
Video for Teaching & Learning: OBS
Video for Teaching & Learning: OBSVideo for Teaching & Learning: OBS
Video for Teaching & Learning: OBS
 
Bengkel 21-12-2020 - Etika atas Talian & Alat Minima
Bengkel 21-12-2020 - Etika atas Talian & Alat MinimaBengkel 21-12-2020 - Etika atas Talian & Alat Minima
Bengkel 21-12-2020 - Etika atas Talian & Alat Minima
 
GIS & History of Mapping in Malaya (lecture notes circa 2009)
GIS & History of Mapping in Malaya (lecture notes circa 2009)GIS & History of Mapping in Malaya (lecture notes circa 2009)
GIS & History of Mapping in Malaya (lecture notes circa 2009)
 
Blended e-learning in UKMFolio
Blended e-learning in UKMFolioBlended e-learning in UKMFolio
Blended e-learning in UKMFolio
 
How to Compute & Recode SPSS Data
How to Compute & Recode SPSS DataHow to Compute & Recode SPSS Data
How to Compute & Recode SPSS Data
 
Introduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R StudioIntroduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R Studio
 
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
 
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
 
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic EquationCochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
 
New Emerging And Reemerging Infections circa 2006
New Emerging And Reemerging Infections circa 2006New Emerging And Reemerging Infections circa 2006
New Emerging And Reemerging Infections circa 2006
 
Hacks#36 -Raspberry Pi 4 Mini Computer
Hacks#36 -Raspberry Pi 4 Mini ComputerHacks#36 -Raspberry Pi 4 Mini Computer
Hacks#36 -Raspberry Pi 4 Mini Computer
 
Hack#35 How to FB Live using a Video Encoder
Hack#35 How to FB Live using a Video EncoderHack#35 How to FB Live using a Video Encoder
Hack#35 How to FB Live using a Video Encoder
 
Hack#34 - Online Teaching with Microsoft Teams
Hack#34 - Online Teaching with Microsoft TeamsHack#34 - Online Teaching with Microsoft Teams
Hack#34 - Online Teaching with Microsoft Teams
 
Hack#33 How To FB-Live
Hack#33 How To FB-LiveHack#33 How To FB-Live
Hack#33 How To FB-Live
 
Skype for Business for UKM
Skype for Business for UKM Skype for Business for UKM
Skype for Business for UKM
 
Introduction to Structural Equation Modeling
Introduction to Structural Equation ModelingIntroduction to Structural Equation Modeling
Introduction to Structural Equation Modeling
 
Safe computing (circa 2004)
Safe computing (circa 2004)Safe computing (circa 2004)
Safe computing (circa 2004)
 

Recently uploaded

MedMatch: Your Health, Our Mission. Pitch deck.
MedMatch: Your Health, Our Mission. Pitch deck.MedMatch: Your Health, Our Mission. Pitch deck.
MedMatch: Your Health, Our Mission. Pitch deck.whalesdesign
 
DNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptx
DNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptxDNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptx
DNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptxMAsifAhmad
 
SGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdf
SGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdfSGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdf
SGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdfHongBiThi1
 
Mental health Team. Dr Senthil Thirusangu
Mental health Team. Dr Senthil ThirusanguMental health Team. Dr Senthil Thirusangu
Mental health Team. Dr Senthil Thirusangu Medical University
 
AUTONOMIC NERVOUS SYSTEM organization and functions
AUTONOMIC NERVOUS SYSTEM organization and functionsAUTONOMIC NERVOUS SYSTEM organization and functions
AUTONOMIC NERVOUS SYSTEM organization and functionsMedicoseAcademics
 
Generative AI in Health Care a scoping review and a persoanl experience.
Generative AI in Health Care a scoping review and a persoanl experience.Generative AI in Health Care a scoping review and a persoanl experience.
Generative AI in Health Care a scoping review and a persoanl experience.Vaikunthan Rajaratnam
 
Bulimia nervosa ( Eating Disorders) Mental Health Nursing.
Bulimia nervosa ( Eating Disorders) Mental Health Nursing.Bulimia nervosa ( Eating Disorders) Mental Health Nursing.
Bulimia nervosa ( Eating Disorders) Mental Health Nursing.aarjukhadka22
 
Neurological history taking (2024) .
Neurological  history  taking  (2024)  .Neurological  history  taking  (2024)  .
Neurological history taking (2024) .Mohamed Rizk Khodair
 
Female Reproductive Physiology Before Pregnancy
Female Reproductive Physiology Before PregnancyFemale Reproductive Physiology Before Pregnancy
Female Reproductive Physiology Before PregnancyMedicoseAcademics
 
ANATOMICAL FAETURES OF BONES FOR NURSING STUDENTS .pptx
ANATOMICAL FAETURES OF BONES  FOR NURSING STUDENTS .pptxANATOMICAL FAETURES OF BONES  FOR NURSING STUDENTS .pptx
ANATOMICAL FAETURES OF BONES FOR NURSING STUDENTS .pptxWINCY THIRUMURUGAN
 
High-Performance Thin-Layer Chromatography (HPTLC)
High-Performance Thin-Layer Chromatography (HPTLC)High-Performance Thin-Layer Chromatography (HPTLC)
High-Performance Thin-Layer Chromatography (HPTLC)kishan singh tomar
 
SGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA .pdf
SGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA    .pdfSGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA    .pdf
SGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA .pdfHongBiThi1
 
AORTIC DISSECTION and management of aortic dissection
AORTIC DISSECTION and management of aortic dissectionAORTIC DISSECTION and management of aortic dissection
AORTIC DISSECTION and management of aortic dissectiondrhanifmohdali
 
Using Data Visualization in Public Health Communications
Using Data Visualization in Public Health CommunicationsUsing Data Visualization in Public Health Communications
Using Data Visualization in Public Health Communicationskatiequigley33
 
ayurvedic formulations herbal drug technologyppt
ayurvedic formulations herbal drug technologypptayurvedic formulations herbal drug technologyppt
ayurvedic formulations herbal drug technologypptPradnya Wadekar
 
Different drug regularity bodies in different countries.
Different drug regularity bodies in different countries.Different drug regularity bodies in different countries.
Different drug regularity bodies in different countries.kishan singh tomar
 
Trustworthiness of AI based predictions Aachen 2024
Trustworthiness of AI based predictions Aachen 2024Trustworthiness of AI based predictions Aachen 2024
Trustworthiness of AI based predictions Aachen 2024EwoutSteyerberg1
 
pA2 value, Schild plot and pD2 values- applications in pharmacology
pA2 value, Schild plot and pD2 values- applications in pharmacologypA2 value, Schild plot and pD2 values- applications in pharmacology
pA2 value, Schild plot and pD2 values- applications in pharmacologyDeepakDaniel9
 
SGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdf
SGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdfSGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdf
SGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdfHongBiThi1
 

Recently uploaded (20)

MedMatch: Your Health, Our Mission. Pitch deck.
MedMatch: Your Health, Our Mission. Pitch deck.MedMatch: Your Health, Our Mission. Pitch deck.
MedMatch: Your Health, Our Mission. Pitch deck.
 
DNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptx
DNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptxDNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptx
DNA nucleotides Blast in NCBI and Phylogeny using MEGA Xi.pptx
 
SGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdf
SGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdfSGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdf
SGK LEUKEMIA KINH DÒNG BẠCH CÂU HẠT HAY.pdf
 
Mental health Team. Dr Senthil Thirusangu
Mental health Team. Dr Senthil ThirusanguMental health Team. Dr Senthil Thirusangu
Mental health Team. Dr Senthil Thirusangu
 
AUTONOMIC NERVOUS SYSTEM organization and functions
AUTONOMIC NERVOUS SYSTEM organization and functionsAUTONOMIC NERVOUS SYSTEM organization and functions
AUTONOMIC NERVOUS SYSTEM organization and functions
 
Generative AI in Health Care a scoping review and a persoanl experience.
Generative AI in Health Care a scoping review and a persoanl experience.Generative AI in Health Care a scoping review and a persoanl experience.
Generative AI in Health Care a scoping review and a persoanl experience.
 
Bulimia nervosa ( Eating Disorders) Mental Health Nursing.
Bulimia nervosa ( Eating Disorders) Mental Health Nursing.Bulimia nervosa ( Eating Disorders) Mental Health Nursing.
Bulimia nervosa ( Eating Disorders) Mental Health Nursing.
 
Neurological history taking (2024) .
Neurological  history  taking  (2024)  .Neurological  history  taking  (2024)  .
Neurological history taking (2024) .
 
Female Reproductive Physiology Before Pregnancy
Female Reproductive Physiology Before PregnancyFemale Reproductive Physiology Before Pregnancy
Female Reproductive Physiology Before Pregnancy
 
ANATOMICAL FAETURES OF BONES FOR NURSING STUDENTS .pptx
ANATOMICAL FAETURES OF BONES  FOR NURSING STUDENTS .pptxANATOMICAL FAETURES OF BONES  FOR NURSING STUDENTS .pptx
ANATOMICAL FAETURES OF BONES FOR NURSING STUDENTS .pptx
 
High-Performance Thin-Layer Chromatography (HPTLC)
High-Performance Thin-Layer Chromatography (HPTLC)High-Performance Thin-Layer Chromatography (HPTLC)
High-Performance Thin-Layer Chromatography (HPTLC)
 
SGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA .pdf
SGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA    .pdfSGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA    .pdf
SGK NGẠT NƯỚC ĐHYHN RẤT LÀ HAY NHA .pdf
 
AORTIC DISSECTION and management of aortic dissection
AORTIC DISSECTION and management of aortic dissectionAORTIC DISSECTION and management of aortic dissection
AORTIC DISSECTION and management of aortic dissection
 
Using Data Visualization in Public Health Communications
Using Data Visualization in Public Health CommunicationsUsing Data Visualization in Public Health Communications
Using Data Visualization in Public Health Communications
 
ayurvedic formulations herbal drug technologyppt
ayurvedic formulations herbal drug technologypptayurvedic formulations herbal drug technologyppt
ayurvedic formulations herbal drug technologyppt
 
Different drug regularity bodies in different countries.
Different drug regularity bodies in different countries.Different drug regularity bodies in different countries.
Different drug regularity bodies in different countries.
 
Trustworthiness of AI based predictions Aachen 2024
Trustworthiness of AI based predictions Aachen 2024Trustworthiness of AI based predictions Aachen 2024
Trustworthiness of AI based predictions Aachen 2024
 
pA2 value, Schild plot and pD2 values- applications in pharmacology
pA2 value, Schild plot and pD2 values- applications in pharmacologypA2 value, Schild plot and pD2 values- applications in pharmacology
pA2 value, Schild plot and pD2 values- applications in pharmacology
 
American College of physicians ACP high value care recommendations in rheumat...
American College of physicians ACP high value care recommendations in rheumat...American College of physicians ACP high value care recommendations in rheumat...
American College of physicians ACP high value care recommendations in rheumat...
 
SGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdf
SGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdfSGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdf
SGK RỐI LOẠN KALI MÁU CỰC KỲ QUAN TRỌNG.pdf
 

Chi-square, Yates, Fisher & McNemar

  • 1. FK6163 Analysis of Qualitative Data Dr Azmi Mohd Tamil Dept of Community Health Universiti Kebangsaan Malaysia
  • 2. Statistical Tests - Qualitative
  • 4. CHI-SQUARE TEST  The most basic and common form of statistical analysis in the medical literature.  Data is arranged in a contingency table (R X C) comparing 2 qualitative data.  R stands for number of rows and C stands for number of columns.
  • 5. CHI-SQUARE TEST  There are two different types of chi-square (c2) tests, both involve categorical data. 1. The chi-square for goodness of fit 2. The chi-square test for independence
  • 6. 1. The chi-square for goodness of fit  Also referred to as one-sample chi-square.  It explores the proportion of cases that fall into the various categories of a single variable, and compares these with hypothesized values
  • 7. 1. The chi-square for goodness of fit  We test that the null hypothesis that the observed frequencies, proportion, percentage distribution for an experiment or a survey follow a certain or a given pattern theoretical distribution (hypothesized value)
  • 8. 2. The chi-square test for independence  It is used to determine if two categorical variables are related.  It compares the frequency of cases found in the various categories of one variable across the different categories of another variable.  Each of these variables can have two or more categories.
  • 9. 2. The chi-square test for independence  Example of research questions: • Are males more likely to be smokers than females? • Is the proportion of males that smoke the same as the proportion of females? – Comparing the rate of smokers between males & females. • Is there a relationship between gender and smoking behaviour?
  • 10. 2. The chi-square test for independence  Two categorical variables involved (with two or more categories in each): • Gender (Male / Female) • Smoker (Yes / No)
  • 11. Assumptions for c2  Random samples  Independent observations. Each person or case can only be counted once, they cannot appear in more than one category or group, and the data from one subject cannot influence the data from another.  Lowest expected frequency in any cell should be 5 or more.
  • 12. CHI-SQUARE TEST CRITERIA:  Both variables are qualitative data.  Sample size of ≥ 20.  No cell that has expected value of < 5.
  • 13. CONTINGENCY TABLE INFECTION YES NO TOTAL MALE a (rate dis exposed) b e FEMALE c (rate dis non exposed) d f TOTAL g h n
  • 15. CHI-SQUARE TEST  E = expected value  Expected value for cell a : e X g n  Expected value for cell b : e X h n
  • 16. Why expected value?  Expected value is when the rate of the disease for both population are the same.  If the rate of the disease are the same, therefore no difference of rate, therefore no association between risk factor and outcome. Null hypothesis would be TRUE.
  • 17. Observed vs Expected Observed Smoking Non-smoking Male 20 (40%) 30 50 Female 5 (10%) 45 50 25 75 100 Expected Smoking Non-smoking Male 12.5 (25%) 37.5 (75%) 50 Female 12.5 (25%) 37.5 (75%) 50 25 75 100
  • 18. FORMULA c2 = å [ (O – E) 2 ] E
  • 19. FORMULA Only for 2 x 2 table
  • 20. The steps for a c2 test  Formulate the null and alternative hypotheses, and select an α -level.  Collect a sample and compute the statistic of interest.  Determine the degree of freedom (R – 1) (C –1 )
  • 21. The steps for a c2 test  Arrange data in contingency table.  Calculate expected value for each cell.  Calculate c2 test
  • 22. The steps for a c2 test  Determine the critical values of the test statistic as determined by the α -level.  Compare the test statistic to the critical values. If the test statistic is : • more than the critical values, reject null hypothesis. • Equal or less than the critical values, fail to reject null hypothesis.
  • 25.  X2 = (29 – 25.44)2 + (24 – 27.56)2 + (67-70.56)2 + (80 – 76.44)2 25.44 27.56 70.56 76.44  X2 = 1.303
  • 26. Refer to Table 3. Look at df = 1. X2 = 1.303, larger than 0.45 (p=0.5) but smaller than 1.32 (p=0.25). 0.45 (p=0.5) < 1.303 < 1.32 (p=0.25) Therefore if X2 = 1.303, 0.5>p>0.25. Since the calculated p > 0.05, null hypothesis not rejected.
  • 27. Example:  X2 = (29 – 25.44)2 + (24 – 27.56)2 + (67-70.56)2 + (80 – 76.44)2 25.44 27.56 70.56 76.44  X2 = 1.303  df = (2-1)(2-1) = 1  Critical value for df = 1 for p=0.05 is 3.84,  The calculated X2 is smaller than the critical value, therefore the null hypothesis is not rejected.  Conclusion: No association between the risk factor and the outcome.  Hint: Memorise critical values of 3.84 for df=1 and 5.99 for df=2.
  • 28. Validity of X2  For contingency tables larger than 2x2 (i.e. 3x2 or 3x3), X2 is valid if less than 20% of the expected values are less than 5 and none are less than one.  If there are many expected values of less than 5, you can try merging the cells with small values to overcome this problem.
  • 29. Examples for Validity of X2  Only one cell out of six cells have expected values of less than 5, which is 3.5.  1/6 = 16.67%, less than 20%, so X2 still valid. Observed Stressed Not Stressed Total Underweight 6 14 20 Normal 50 20 70 Overweight 9 1 10 Total 65 35 100 Expected Stressed Not Stressed Total Underweight 13 7 20 Normal 46 25 70 Overweight 6.5 3.5 10 Total 65 35 100
  • 30. YATES’ CORRECTION  When sample sizes are small, the use of c2 will introduces some bias into the calculation, so that the c2 value tends to be a little too large.  To remove the bias, we use continuity correction (Yates’ Correction)
  • 31. CRITERIA FOR YATES CORRECTION  Both variables are dichotomous qualitative (2 X 2 table).  Sample size of ≥ 40.  One or more of the cells has expected value of < 5.
  • 32. YATES CORRECTION FORMULA c2 = å [ (|O – E | – 0.5) 2 ] E
  • 33. FISHER’S EXACT TEST CRITERIA:  Both variables are dichotomous qualitative (2 X 2 table).  Sample size of < 20.  Sample size of 20 to < 40 but one of the cell has expected value of < 5.
  • 34. FORMULA FOR FISHER’S EXACT TEST ( a + b )! ( a + c )! ( b + d )! ( c + d)! N! a! b! c! d! Weird since you have to calculate for many tables, until one of the cell becomes 0, then total up all the p values.
  • 35. Example There is an association between the prevalence of underweight and the type of vehicle driven by the public vehicle drivers. In this analysis, it is a 2 X 2 table, cells with an expected value < 5 (4.67) and small sample size, therefore the best type of analysis possible is Fisher’s Exact Test.
  • 36. Step 1  ( a + b )! ( a + c )! ( b + d )! ( c + d)! N! a! b! c! d!  p1 = 19!14!11!22! 33!8!11!3!11! = 4.758 x 1056 = 0.142 3.3471 x 1057
  • 37. Step 2  Create 3 more extreme tables by deducting 1 from the smallest value. Continue to do so till the cell becomes zero;  p2 = 0.0434 p3 = 0.00668 p4 = 0.00039
  • 38. Step 3  Total p = 0.142+0.0434+0.00668+0.00039 = 0.19247  This is the p value for single-tailed test. To make it the p value for 2 tailed, times the value with 2; p = 0.385.  p is bigger than 0.05, therefore the null hypothesis is not rejected.  There is no association between occupation and UW ;-)
  • 39. SPSS Output KERJA * OBESITI Crosstabulation Count OBESITI 8 11 19 3 11 14 11 22 33 Bus Driver Taxi Driver KERJA Total Underweight Normal Total Chi-Square Tests 1.551b 1 .213 .760 1 .383 1.598 1 .206 .278 .193 1.504 1 .220 33 Pearson Chi-Square Continuity Correctiona Likelihood Ratio Fisher's Exact Test Linear-by-Linear Association N of Valid Cases Value df Asymp. Sig. (2-sided) Exact Sig. (2-sided) Exact Sig. (1-sided) a. Computed only for a 2x2 table b. 1 cells (25.0%) have expected count less than 5. The minimum expected count is 4.67.
  • 40. McNemar Test  It is a test to compare before and after findings in the same individual or to compare findings in a matched analysis (for dichotomous variables)  Example: a researcher wanted to compare the attitudes of medical students toward confidence in statistics analysis before and after the intensive statistics course.
  • 41. Data Collected Post-course +ve -ve Total Concordant discordant Pre- +ve 20 (a) 8(b) 28 course -ve 22 (c) 150(d) 172 Total 42 158 200
  • 42. McNemar  SIGNIFICANCE OF DIFFERENCE IN EXPOSURE X²= (b-c)² / (b + c) (1 df) if b + c > 25 Odds ratio = c / b
  • 43. Calculation  McNemar c2 = ( b – c )2  b + c  = ( 22 – 8)2  22 + 8  = 6.5333  OR = c/b = 22/8 = 2.75
  • 44. Calculation of the degree of freedom df = (R – 1) (C – 1) = (2 – 1) (2 – 1) = 1
  • 45. Refer to Table 3. Look at df = 1. X2 = 6.53, larger than 5.02 (p=0.025) but smaller than 6.63 (p=0.01). 5.02 (p=0.025) < 6.53 < 6.63 (p=0.01) Therefore if X2 = 6.53, 0.01<p<0.025. Since the calculated p < 0.05, null hypothesis rejected.
  • 46. Determination of the p value Value from the chi-square table for 6.53 on df=1, p < 0.02 (statistically significant) Interpretation: there is a significant change in the attitudes of medical students toward confidence in statistics analysis before and after the intensive statistics course.
  • 47. Continuity Correction for McNemar Test McNemar c2 = ( | b – c | - 1)2 b + c When b+c is less than 25
  • 48. Also use in matched pair case-control studies Example;
  • 49. MATCHED PAIR C-C STUDY CASES Exposed Not exposed Exposed Not exposed a b (both pairs exposed) ( pairs of controls exposed) c d (pairs of cases exposed) (both pairs not exposed) C O N T R O L
  • 50. MATCHED PAIRS C-C STUDY  SIGNIFICANCE OF DIFFERENCE IN EXPOSURE X²= (b-c)² / b + c (1 df) Odds ratio = c / b
  • 51. McNemar in SPSS  The code for before and after (or case & control) must be similar.  i.e. if one uses 1 for “Present” for before, 1 should also means the same for after.
  • 52. McNemar in SPSS  Data should be entered in pairs as illustrated on the left here.
  • 54. SPSS Output Before * After Crosstabulation Count After 20 8 28 22 150 172 42 158 200 Positive Negative Before Total Positive Negative Total Chi-Square Tests .016a 200 McNemar Test N of Valid Cases Value Exact Sig. (2-sided) Binomial a. distribution used.