SlideShare a Scribd company logo
KNOWLEDGE FOR THE BENEFIT OF HUMANITY
BIOSTATISTICS (HFS3283)
CATEGORICAL DATA
(CHI-SQUARE & FISHER EXACT TEST)
Dr. Mohd Razif Shahril
School of Nutrition & Dietetics
Faculty of Health Sciences
Universiti Sultan Zainal Abidin
1
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Topic Learning Outcomes
At the end of this lecture, students should be able to;
• identify types of categorical data analysis and their use
• explain assumptions to be met when using chi-square
and fisher exact test
• perform chi-square and fisher exact test using SPSS
• explain how to interpret the SPSS outputs from chi-
square and fisher exact test
2
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
What is categorical data analysis?
3
• Independent (Explanatory) Variable is
Categorical (Nominal or Ordinal)
• Dependent (Response) Variable is Categorical
(Nominal or Ordinal)
• Most common;
– 2x2 (Each variable has 2 levels)
– Nominal/Nominal
– Nominal/Ordinal
– Ordinal/Ordinal
CONTINGENCY
TABLE
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Contingency Table
4
• Tables representing all combinations of levels of
explanatory and response variables
• Numbers in table represent Counts of the
number of cases in each cell
• Row and column totals are called Marginal
counts
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Example of Contingency Table
5
• Response Variable
– Cognitive Level (Low,
High)
• Explanatory Variable
– BMI (Underweight,
Normal, Overweight,
Obese)
BMI
Cognitive
Total
Low High
Underweight 59 232 291
Normal 54 367 421
Overweight 114 101 215
Obese 173 54 227
Total 400 754 1154
Marginal Count
Marginal Count
Counts
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
2 x 2 Contingency Table
6
• Each variable has 2 levels
– Explanatory Variable – Groups (Typically based on
demographics, exposure, or treatment)
– Response Variable – Outcome (Typically presence or
absence of a characteristic)
BMI
Cognitive
Total
Low High
≤ 24.9 113 599 712
> 24.9 287 155 442
Total 400 754 1154
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Chi-Square Test (X2)
7
• Hypothesis;
– Comparing two or more
proportion
– Ho : P1 = P2
• Assumption
– Random samples
– Observations are independent
– The number of cells with
Expected Count (EC) less than
5, must be less than 20% of the
total number of cells.
– The smallest EC must be at least
2.
Based on study design &
method
Calculate expected
count for each cell
(SPSS will do it)
The chi-square test for independence,
also called Pearson's chi-square test or
the chi-square test of association, is
used to discover if there is a
relationship between two categorical
variables.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Example Chi-Square Test (X2) – (1)
8
• Hypothesis;
– Association between gender and Knowledge on
Nutrition (KoN)
– Comparing the proportion of Low KoN between
gender
– Ho : P(KoN)male = P(KoN)femafe
• Assumption
– Random samples [ √ ]
– Observations are independent [ √ ]
– The number of cells with Expected Count (EC) less
than 5, must be less than 20% of the total number of
cells
– The smallest EC must be at least 2
Calculated by SPSS
9
Chi-square using SPSS - procedure:
1
2
3
10
Chi-square using SPSS - procedure:
4
5
6
7
8
9
Chi-square using SPSS - Output:
11
Descriptive statistics for each group
Chi-square statistic = 0.417
df = 1; P-value = 0.518
Must be < 20%
Must be ≥ 2
2 EC
assumptions
is met
Chi-square using SPSS – Table and Interpretation:
12
Variable n
Low KoN
Freq (%)
High KoN
Freq (%)
X2 statistics a
(df)
P-value
Gender
Male 39 19 (48.7) 20 (51.3)
0.417 (1) 0.518
Female 34 14 (41.2) 20 (58.8)
Ethnicity
Malay
Others
Education Level
Low
High
Table 1: Factors (categorical variable) associated with Knowledge on Nutrition
a Chi-square test for independence
The prevalence (proportion) of Low Knowledge on
Nutrition between male and female is not
significantly different (P = 0.518). Therefore, there
is no significant association between gender and
Knowledge on Nutrition.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
What if assumptions were not met?
13
• Combine adjacent columns or/and rows to
increase the EC if possible.
• If still did not meet expected cell assumption,
Fisher’s exact (FE) test can be applied (only
for 2 x 2 table in SPSS).
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Example Chi-Square Test (X2)– (2)
14
• Hypothesis;
– Association between ethnicity and Knowledge on Nutrition
(KoN)
– Comparing the proportion of Low KoN between ethnicity
– Ho : P(KoN)malay=P(KoN)chinese=P(KoN)indian=P(KoN)others
• Assumption
– Random samples [ √ ]
– Observations are independent [ √ ]
– The number of cells with Expected Count (EC) less than
5, must be less than 20% of the total number of cells
– The smallest EC must be at least 2 Calculated by SPSS
Chi-square using SPSS - Output:
Descriptive statistics for each group
4 (50%) cells have EC less than
5. The smallest EC is 1.36.
One remedial maybe to
combine Indian and others, (or
even combing 3 levels) and
call it as “others”.
(Combination should be
interpretable/ meaningful)
15
Must be < 20%
Must be ≥ 2
2 EC
assumptions
is not met
Chi-square using SPSS - Output:
Descriptive statistics for each group
16Must be < 20% Must be ≥ 2
2 EC
assumptions
is met
Chi-square statistic = 0.072
df = 1; P-value = 0.788
If EC assumptions
is still not met
Chi-square using SPSS – Table and Interpretation:
17
Variable n
Low KoN
Freq (%)
High KoN
Freq (%)
X2 statistics a
(df)
P-value
Gender
Male 39 19 (48.7) 20 (51.3)
0.417 (1) 0.518
Female 34 14 (41.2) 20 (58.8)
Ethnicity
Malay 43 20 (46.5) 23 (53.5)
0.072 (1) 0.788
Others 30 13 (43.3) 17 (56.7)
Education Level
Low
High
Table 1: Factors (categorical variable) associated with Knowledge on Nutrition
a Chi-square test for independence
The prevalence (proportion) of Low Knowledge on
Nutrition between Malay and other ethnicity is
not significantly different (P = 0.788). Therefore,
there is no significant association between
ethnicity and Knowledge on Nutrition.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Fisher Exact Test
18
• Fisher’s Exact Test is a test for independence in a 2 X
2 table.
• It is most useful when the total sample size and the
expected values are small.
– Useful when E(cell counts) < 5.
• The output consists of more than one p-values:
– Choose Exact Sig. (2-sided)
Thank You
19

More Related Content

What's hot

Measures Of Association
Measures Of AssociationMeasures Of Association
Measures Of Association
ganesh kumar
 
Odds ratios (Basic concepts)
Odds ratios (Basic concepts)Odds ratios (Basic concepts)
Odds ratios (Basic concepts)
Tarekk Alazabee
 
Survival analysis
Survival analysisSurvival analysis
Survival analysis
Har Jindal
 
Study designs, Epidemiological study design, Types of studies
Study designs, Epidemiological study design, Types of studiesStudy designs, Epidemiological study design, Types of studies
Study designs, Epidemiological study design, Types of studies
Dr Lipilekha Patnaik
 
Research method ch07 statistical methods 1
Research method ch07 statistical methods 1Research method ch07 statistical methods 1
Research method ch07 statistical methods 1naranbatn
 
Normal Distribution
Normal DistributionNormal Distribution
Normal Distribution
CIToolkit
 
Lecture2 hypothesis testing
Lecture2 hypothesis testingLecture2 hypothesis testing
Lecture2 hypothesis testing
o_devinyak
 
Cross sectional study
Cross sectional studyCross sectional study
Cross sectional study
Dr Lipilekha Patnaik
 
Fishers test
Fishers testFishers test
Fishers test
Princy Francis M
 
Case control study – part 1
Case control study – part 1Case control study – part 1
Case control study – part 1Rizwan S A
 
t distribution, paired and unpaired t-test
t distribution, paired and unpaired t-testt distribution, paired and unpaired t-test
t distribution, paired and unpaired t-test
BPKIHS
 
Friedman's test
Friedman's testFriedman's test
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
Azmi Mohd Tamil
 
Test of significance
Test of significanceTest of significance
Test of significance
migom doley
 
1.5.4 measures incidence+incidence density
1.5.4 measures incidence+incidence density1.5.4 measures incidence+incidence density
1.5.4 measures incidence+incidence density
A M
 
Basic survival analysis
Basic survival analysisBasic survival analysis
Basic survival analysis
Mike LaValley
 
Chi square
Chi squareChi square
Chi square
Andi Koentary
 
Standard Error of Proportion & Two Proportions
Standard Error of Proportion & Two ProportionsStandard Error of Proportion & Two Proportions
Standard Error of Proportion & Two Proportions
Jagdish Powar
 

What's hot (20)

P value
P valueP value
P value
 
Measures Of Association
Measures Of AssociationMeasures Of Association
Measures Of Association
 
Odds ratios (Basic concepts)
Odds ratios (Basic concepts)Odds ratios (Basic concepts)
Odds ratios (Basic concepts)
 
Survival analysis
Survival analysisSurvival analysis
Survival analysis
 
Study designs, Epidemiological study design, Types of studies
Study designs, Epidemiological study design, Types of studiesStudy designs, Epidemiological study design, Types of studies
Study designs, Epidemiological study design, Types of studies
 
Research method ch07 statistical methods 1
Research method ch07 statistical methods 1Research method ch07 statistical methods 1
Research method ch07 statistical methods 1
 
Normal Distribution
Normal DistributionNormal Distribution
Normal Distribution
 
Lecture2 hypothesis testing
Lecture2 hypothesis testingLecture2 hypothesis testing
Lecture2 hypothesis testing
 
Cross sectional study
Cross sectional studyCross sectional study
Cross sectional study
 
Fishers test
Fishers testFishers test
Fishers test
 
Case control study – part 1
Case control study – part 1Case control study – part 1
Case control study – part 1
 
t distribution, paired and unpaired t-test
t distribution, paired and unpaired t-testt distribution, paired and unpaired t-test
t distribution, paired and unpaired t-test
 
Friedman's test
Friedman's testFriedman's test
Friedman's test
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
Test of significance
Test of significanceTest of significance
Test of significance
 
1.5.4 measures incidence+incidence density
1.5.4 measures incidence+incidence density1.5.4 measures incidence+incidence density
1.5.4 measures incidence+incidence density
 
Basic survival analysis
Basic survival analysisBasic survival analysis
Basic survival analysis
 
Chi square
Chi squareChi square
Chi square
 
Standard Error of Proportion & Two Proportions
Standard Error of Proportion & Two ProportionsStandard Error of Proportion & Two Proportions
Standard Error of Proportion & Two Proportions
 

Viewers also liked

5. Non parametric analysis
5. Non parametric analysis5. Non parametric analysis
5. Non parametric analysis
Razif Shahril
 
1. Introduction to biostatistics
1. Introduction to biostatistics1. Introduction to biostatistics
1. Introduction to biostatistics
Razif Shahril
 
HFS3283 paired t tes-t and anova
HFS3283 paired t tes-t and anovaHFS3283 paired t tes-t and anova
HFS3283 paired t tes-t and anova
wajihahwafa
 
Chi – square test
Chi – square testChi – square test
Chi – square test
Dr.M.Prasad Naidu
 
2. Inferential statistics
2. Inferential statistics2. Inferential statistics
2. Inferential statistics
Razif Shahril
 
8. Correlation
8. Correlation8. Correlation
8. Correlation
Razif Shahril
 
Chi Square Worked Example
Chi Square Worked ExampleChi Square Worked Example
Chi Square Worked Example
John Barlow
 
Non parametric tests
Non parametric testsNon parametric tests
Non parametric tests
Raghavendra Huchchannavar
 
Epidata lecture note
Epidata lecture note Epidata lecture note
Epidata lecture note
Bahir Dar Univerisity
 
Categorical Data Analysis Survey Data
Categorical Data Analysis Survey DataCategorical Data Analysis Survey Data
Categorical Data Analysis Survey Data
guest47a77bd
 
Stat 130 chi-square goodnes-of-fit test
Stat 130   chi-square goodnes-of-fit testStat 130   chi-square goodnes-of-fit test
Stat 130 chi-square goodnes-of-fit test
Aldrin Lozano
 
Malimu statistical significance testing.
Malimu statistical significance testing.Malimu statistical significance testing.
Malimu statistical significance testing.
Miharbi Ignasm
 
14 prueba chi cuadrado
14 prueba chi cuadrado14 prueba chi cuadrado
14 prueba chi cuadradoYerko Bravo
 
Spatial Autocorrelation
Spatial AutocorrelationSpatial Autocorrelation
Spatial Autocorrelation
Ehsan Hamzei
 
Scientific writing
Scientific writingScientific writing
Scientific writing
Razif Shahril
 
1. Prelude + Introduction to Research Methodology
1. Prelude +  Introduction to Research Methodology1. Prelude +  Introduction to Research Methodology
1. Prelude + Introduction to Research Methodology
Razif Shahril
 

Viewers also liked (20)

5. Non parametric analysis
5. Non parametric analysis5. Non parametric analysis
5. Non parametric analysis
 
1. Introduction to biostatistics
1. Introduction to biostatistics1. Introduction to biostatistics
1. Introduction to biostatistics
 
HFS3283 paired t tes-t and anova
HFS3283 paired t tes-t and anovaHFS3283 paired t tes-t and anova
HFS3283 paired t tes-t and anova
 
Chi – square test
Chi – square testChi – square test
Chi – square test
 
Chi square test
Chi square testChi square test
Chi square test
 
2. Inferential statistics
2. Inferential statistics2. Inferential statistics
2. Inferential statistics
 
8. Correlation
8. Correlation8. Correlation
8. Correlation
 
Chi Square Worked Example
Chi Square Worked ExampleChi Square Worked Example
Chi Square Worked Example
 
Non parametric tests
Non parametric testsNon parametric tests
Non parametric tests
 
Non-Parametric Tests
Non-Parametric TestsNon-Parametric Tests
Non-Parametric Tests
 
Epidata lecture note
Epidata lecture note Epidata lecture note
Epidata lecture note
 
Mc Nemar
Mc NemarMc Nemar
Mc Nemar
 
Categorical Data Analysis Survey Data
Categorical Data Analysis Survey DataCategorical Data Analysis Survey Data
Categorical Data Analysis Survey Data
 
Stat 130 chi-square goodnes-of-fit test
Stat 130   chi-square goodnes-of-fit testStat 130   chi-square goodnes-of-fit test
Stat 130 chi-square goodnes-of-fit test
 
Malimu statistical significance testing.
Malimu statistical significance testing.Malimu statistical significance testing.
Malimu statistical significance testing.
 
14 prueba chi cuadrado
14 prueba chi cuadrado14 prueba chi cuadrado
14 prueba chi cuadrado
 
Spatial Autocorrelation
Spatial AutocorrelationSpatial Autocorrelation
Spatial Autocorrelation
 
Goodness of fit (ppt)
Goodness of fit (ppt)Goodness of fit (ppt)
Goodness of fit (ppt)
 
Scientific writing
Scientific writingScientific writing
Scientific writing
 
1. Prelude + Introduction to Research Methodology
1. Prelude +  Introduction to Research Methodology1. Prelude +  Introduction to Research Methodology
1. Prelude + Introduction to Research Methodology
 

Similar to 6. Categorical data analysis - Chi-Square & Fisher Exact Test

Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
BAGARAGAZAROMUALD2
 
Test of significance
Test of significanceTest of significance
Test of significance
Dr. Imran Zaheer
 
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
dr.balan shaikh
 
Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
Long Beach City College
 
Chi squared test
Chi squared test Chi squared test
Chi squared test
Dr Lipilekha Patnaik
 
chi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistanchi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistan
muhammad shahid
 
Chisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsChisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatistics
muhammadahmad00495
 
Chi square test
Chi square testChi square test
Chi square test
AmanRathore54
 
Chapter12
Chapter12Chapter12
Chapter12
Richard Ferreria
 
ChandanChakrabarty_1.pdf
ChandanChakrabarty_1.pdfChandanChakrabarty_1.pdf
ChandanChakrabarty_1.pdf
Dikshathawait
 
Chisquare
ChisquareChisquare
Chisquare
keerthi samuel
 
Tests of statistical significance : chi square and spss
Tests of statistical significance : chi square and spss Tests of statistical significance : chi square and spss
Tests of statistical significance : chi square and spss
Drsnehas2
 
Chi square test
Chi square testChi square test
Chi square test
YASMEEN CHAUDHARI
 
Introduction to Biostatistics
Introduction to BiostatisticsIntroduction to Biostatistics
Introduction to Biostatistics
RamFeg
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
Sneh Kumari
 
Lecture 12 Chi-Square.pptx
Lecture 12 Chi-Square.pptxLecture 12 Chi-Square.pptx
Lecture 12 Chi-Square.pptx
shakirRahman10
 
Parametric & non parametric
Parametric & non parametricParametric & non parametric
Parametric & non parametric
ANCYBS
 
Chi square
Chi square Chi square
Chi square
HemamaliniSakthivel
 
7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics
Jayashritha
 

Similar to 6. Categorical data analysis - Chi-Square & Fisher Exact Test (20)

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
 
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
 
Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
 
Chi square test
Chi square test Chi square test
Chi square test
 
Chi squared test
Chi squared test Chi squared test
Chi squared test
 
chi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistanchi square test lecture for nurses in pakistan
chi square test lecture for nurses in pakistan
 
Chisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsChisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatistics
 
Chi square test
Chi square testChi square test
Chi square test
 
Chapter12
Chapter12Chapter12
Chapter12
 
ChandanChakrabarty_1.pdf
ChandanChakrabarty_1.pdfChandanChakrabarty_1.pdf
ChandanChakrabarty_1.pdf
 
Chisquare
ChisquareChisquare
Chisquare
 
Tests of statistical significance : chi square and spss
Tests of statistical significance : chi square and spss Tests of statistical significance : chi square and spss
Tests of statistical significance : chi square and spss
 
Chi square test
Chi square testChi square test
Chi square test
 
Introduction to Biostatistics
Introduction to BiostatisticsIntroduction to Biostatistics
Introduction to Biostatistics
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Lecture 12 Chi-Square.pptx
Lecture 12 Chi-Square.pptxLecture 12 Chi-Square.pptx
Lecture 12 Chi-Square.pptx
 
Parametric & non parametric
Parametric & non parametricParametric & non parametric
Parametric & non parametric
 
Chi square
Chi square Chi square
Chi square
 
7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics
 

More from Razif Shahril

9. Regression
9. Regression9. Regression
9. Regression
Razif Shahril
 
10. Ethical issues
10. Ethical issues10. Ethical issues
10. Ethical issues
Razif Shahril
 
11. Processing and displaying data
11. Processing and displaying data11. Processing and displaying data
11. Processing and displaying data
Razif Shahril
 
9. Selecting a sample
9. Selecting a sample9. Selecting a sample
9. Selecting a sample
Razif Shahril
 
8. validity and reliability of research instruments
8. validity and reliability of research instruments8. validity and reliability of research instruments
8. validity and reliability of research instruments
Razif Shahril
 
8. Preparing the report
8. Preparing the report8. Preparing the report
8. Preparing the report
Razif Shahril
 
7. Selecting a data collection method
7. Selecting a data collection method7. Selecting a data collection method
7. Selecting a data collection method
Razif Shahril
 
6. Selecting a study design
6. Selecting a study design6. Selecting a study design
6. Selecting a study design
Razif Shahril
 
5. Identifying variables and constructing hypothesis
5. Identifying variables and constructing hypothesis5. Identifying variables and constructing hypothesis
5. Identifying variables and constructing hypothesis
Razif Shahril
 
4. Formulating research problems
4. Formulating research problems4. Formulating research problems
4. Formulating research problems
Razif Shahril
 
3. Reviewing the literature
3. Reviewing the literature3. Reviewing the literature
3. Reviewing the literature
Razif Shahril
 
5. Case control
5. Case control5. Case control
5. Case control
Razif Shahril
 
6. Randomised controlled trial
6. Randomised controlled trial6. Randomised controlled trial
6. Randomised controlled trial
Razif Shahril
 
4. Cohort
4. Cohort4. Cohort
4. Cohort
Razif Shahril
 
3. Cross sectional
3. Cross sectional3. Cross sectional
3. Cross sectional
Razif Shahril
 
2. Case study and case series
2. Case study and case series2. Case study and case series
2. Case study and case series
Razif Shahril
 
1. Introduction to epidemiological study designs
1. Introduction to epidemiological study designs1. Introduction to epidemiological study designs
1. Introduction to epidemiological study designs
Razif Shahril
 
6. Glycemic index
6. Glycemic index6. Glycemic index
6. Glycemic index
Razif Shahril
 
5. Nutrition in emergencies
5. Nutrition in emergencies5. Nutrition in emergencies
5. Nutrition in emergencies
Razif Shahril
 
4. World Hunger
4. World Hunger4. World Hunger
4. World Hunger
Razif Shahril
 

More from Razif Shahril (20)

9. Regression
9. Regression9. Regression
9. Regression
 
10. Ethical issues
10. Ethical issues10. Ethical issues
10. Ethical issues
 
11. Processing and displaying data
11. Processing and displaying data11. Processing and displaying data
11. Processing and displaying data
 
9. Selecting a sample
9. Selecting a sample9. Selecting a sample
9. Selecting a sample
 
8. validity and reliability of research instruments
8. validity and reliability of research instruments8. validity and reliability of research instruments
8. validity and reliability of research instruments
 
8. Preparing the report
8. Preparing the report8. Preparing the report
8. Preparing the report
 
7. Selecting a data collection method
7. Selecting a data collection method7. Selecting a data collection method
7. Selecting a data collection method
 
6. Selecting a study design
6. Selecting a study design6. Selecting a study design
6. Selecting a study design
 
5. Identifying variables and constructing hypothesis
5. Identifying variables and constructing hypothesis5. Identifying variables and constructing hypothesis
5. Identifying variables and constructing hypothesis
 
4. Formulating research problems
4. Formulating research problems4. Formulating research problems
4. Formulating research problems
 
3. Reviewing the literature
3. Reviewing the literature3. Reviewing the literature
3. Reviewing the literature
 
5. Case control
5. Case control5. Case control
5. Case control
 
6. Randomised controlled trial
6. Randomised controlled trial6. Randomised controlled trial
6. Randomised controlled trial
 
4. Cohort
4. Cohort4. Cohort
4. Cohort
 
3. Cross sectional
3. Cross sectional3. Cross sectional
3. Cross sectional
 
2. Case study and case series
2. Case study and case series2. Case study and case series
2. Case study and case series
 
1. Introduction to epidemiological study designs
1. Introduction to epidemiological study designs1. Introduction to epidemiological study designs
1. Introduction to epidemiological study designs
 
6. Glycemic index
6. Glycemic index6. Glycemic index
6. Glycemic index
 
5. Nutrition in emergencies
5. Nutrition in emergencies5. Nutrition in emergencies
5. Nutrition in emergencies
 
4. World Hunger
4. World Hunger4. World Hunger
4. World Hunger
 

Recently uploaded

Temporomandibular Joint By RABIA INAM GANDAPORE.pptx
Temporomandibular Joint By RABIA INAM GANDAPORE.pptxTemporomandibular Joint By RABIA INAM GANDAPORE.pptx
Temporomandibular Joint By RABIA INAM GANDAPORE.pptx
Dr. Rabia Inam Gandapore
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Dr. Rabia Inam Gandapore
 
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptxTriangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Dr. Rabia Inam Gandapore
 
ABDOMINAL TRAUMA in pediatrics part one.
ABDOMINAL TRAUMA in pediatrics part one.ABDOMINAL TRAUMA in pediatrics part one.
ABDOMINAL TRAUMA in pediatrics part one.
drhasanrajab
 
Best Ayurvedic medicine for Gas and Indigestion
Best Ayurvedic medicine for Gas and IndigestionBest Ayurvedic medicine for Gas and Indigestion
Best Ayurvedic medicine for Gas and Indigestion
Swastik Ayurveda
 
Colonic and anorectal physiology with surgical implications
Colonic and anorectal physiology with surgical implicationsColonic and anorectal physiology with surgical implications
Colonic and anorectal physiology with surgical implications
Dr Maria Tamanna
 
Ophthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE examOphthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE exam
KafrELShiekh University
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
vimalpl1234
 
Role of Mukta Pishti in the Management of Hyperthyroidism
Role of Mukta Pishti in the Management of HyperthyroidismRole of Mukta Pishti in the Management of Hyperthyroidism
Role of Mukta Pishti in the Management of Hyperthyroidism
Dr. Jyothirmai Paindla
 
Journal Article Review on Rasamanikya
Journal Article Review on RasamanikyaJournal Article Review on Rasamanikya
Journal Article Review on Rasamanikya
Dr. Jyothirmai Paindla
 
Chapter 11 Nutrition and Chronic Diseases.pptx
Chapter 11 Nutrition and Chronic Diseases.pptxChapter 11 Nutrition and Chronic Diseases.pptx
Chapter 11 Nutrition and Chronic Diseases.pptx
Earlene McNair
 
NVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control programNVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control program
Sapna Thakur
 
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...
Oleg Kshivets
 
Adv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMS
Adv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMSAdv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMS
Adv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMS
AkankshaAshtankar
 
Pictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdfPictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdf
Dr. Rabia Inam Gandapore
 
Top Effective Soaps for Fungal Skin Infections in India
Top Effective Soaps for Fungal Skin Infections in IndiaTop Effective Soaps for Fungal Skin Infections in India
Top Effective Soaps for Fungal Skin Infections in India
SwisschemDerma
 
Aortic Association CBL Pilot April 19 – 20 Bern
Aortic Association CBL Pilot April 19 – 20 BernAortic Association CBL Pilot April 19 – 20 Bern
Aortic Association CBL Pilot April 19 – 20 Bern
suvadeepdas911
 
A Classical Text Review on Basavarajeeyam
A Classical Text Review on BasavarajeeyamA Classical Text Review on Basavarajeeyam
A Classical Text Review on Basavarajeeyam
Dr. Jyothirmai Paindla
 
Cervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptxCervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptx
Dr. Rabia Inam Gandapore
 
ARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTS
ARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTSARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTS
ARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTS
Dr. Vinay Pareek
 

Recently uploaded (20)

Temporomandibular Joint By RABIA INAM GANDAPORE.pptx
Temporomandibular Joint By RABIA INAM GANDAPORE.pptxTemporomandibular Joint By RABIA INAM GANDAPORE.pptx
Temporomandibular Joint By RABIA INAM GANDAPORE.pptx
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
 
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptxTriangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
 
ABDOMINAL TRAUMA in pediatrics part one.
ABDOMINAL TRAUMA in pediatrics part one.ABDOMINAL TRAUMA in pediatrics part one.
ABDOMINAL TRAUMA in pediatrics part one.
 
Best Ayurvedic medicine for Gas and Indigestion
Best Ayurvedic medicine for Gas and IndigestionBest Ayurvedic medicine for Gas and Indigestion
Best Ayurvedic medicine for Gas and Indigestion
 
Colonic and anorectal physiology with surgical implications
Colonic and anorectal physiology with surgical implicationsColonic and anorectal physiology with surgical implications
Colonic and anorectal physiology with surgical implications
 
Ophthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE examOphthalmology Clinical Tests for OSCE exam
Ophthalmology Clinical Tests for OSCE exam
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
 
Role of Mukta Pishti in the Management of Hyperthyroidism
Role of Mukta Pishti in the Management of HyperthyroidismRole of Mukta Pishti in the Management of Hyperthyroidism
Role of Mukta Pishti in the Management of Hyperthyroidism
 
Journal Article Review on Rasamanikya
Journal Article Review on RasamanikyaJournal Article Review on Rasamanikya
Journal Article Review on Rasamanikya
 
Chapter 11 Nutrition and Chronic Diseases.pptx
Chapter 11 Nutrition and Chronic Diseases.pptxChapter 11 Nutrition and Chronic Diseases.pptx
Chapter 11 Nutrition and Chronic Diseases.pptx
 
NVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control programNVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control program
 
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...
 
Adv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMS
Adv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMSAdv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMS
Adv. biopharm. APPLICATION OF PHARMACOKINETICS : TARGETED DRUG DELIVERY SYSTEMS
 
Pictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdfPictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdf
 
Top Effective Soaps for Fungal Skin Infections in India
Top Effective Soaps for Fungal Skin Infections in IndiaTop Effective Soaps for Fungal Skin Infections in India
Top Effective Soaps for Fungal Skin Infections in India
 
Aortic Association CBL Pilot April 19 – 20 Bern
Aortic Association CBL Pilot April 19 – 20 BernAortic Association CBL Pilot April 19 – 20 Bern
Aortic Association CBL Pilot April 19 – 20 Bern
 
A Classical Text Review on Basavarajeeyam
A Classical Text Review on BasavarajeeyamA Classical Text Review on Basavarajeeyam
A Classical Text Review on Basavarajeeyam
 
Cervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptxCervical & Brachial Plexus By Dr. RIG.pptx
Cervical & Brachial Plexus By Dr. RIG.pptx
 
ARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTS
ARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTSARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTS
ARTHROLOGY PPT NCISM SYLLABUS AYURVEDA STUDENTS
 

6. Categorical data analysis - Chi-Square & Fisher Exact Test

  • 1. KNOWLEDGE FOR THE BENEFIT OF HUMANITY BIOSTATISTICS (HFS3283) CATEGORICAL DATA (CHI-SQUARE & FISHER EXACT TEST) Dr. Mohd Razif Shahril School of Nutrition & Dietetics Faculty of Health Sciences Universiti Sultan Zainal Abidin 1
  • 2. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Topic Learning Outcomes At the end of this lecture, students should be able to; • identify types of categorical data analysis and their use • explain assumptions to be met when using chi-square and fisher exact test • perform chi-square and fisher exact test using SPSS • explain how to interpret the SPSS outputs from chi- square and fisher exact test 2
  • 3. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N What is categorical data analysis? 3 • Independent (Explanatory) Variable is Categorical (Nominal or Ordinal) • Dependent (Response) Variable is Categorical (Nominal or Ordinal) • Most common; – 2x2 (Each variable has 2 levels) – Nominal/Nominal – Nominal/Ordinal – Ordinal/Ordinal CONTINGENCY TABLE
  • 4. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Contingency Table 4 • Tables representing all combinations of levels of explanatory and response variables • Numbers in table represent Counts of the number of cases in each cell • Row and column totals are called Marginal counts
  • 5. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Example of Contingency Table 5 • Response Variable – Cognitive Level (Low, High) • Explanatory Variable – BMI (Underweight, Normal, Overweight, Obese) BMI Cognitive Total Low High Underweight 59 232 291 Normal 54 367 421 Overweight 114 101 215 Obese 173 54 227 Total 400 754 1154 Marginal Count Marginal Count Counts
  • 6. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N 2 x 2 Contingency Table 6 • Each variable has 2 levels – Explanatory Variable – Groups (Typically based on demographics, exposure, or treatment) – Response Variable – Outcome (Typically presence or absence of a characteristic) BMI Cognitive Total Low High ≤ 24.9 113 599 712 > 24.9 287 155 442 Total 400 754 1154
  • 7. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Chi-Square Test (X2) 7 • Hypothesis; – Comparing two or more proportion – Ho : P1 = P2 • Assumption – Random samples – Observations are independent – The number of cells with Expected Count (EC) less than 5, must be less than 20% of the total number of cells. – The smallest EC must be at least 2. Based on study design & method Calculate expected count for each cell (SPSS will do it) The chi-square test for independence, also called Pearson's chi-square test or the chi-square test of association, is used to discover if there is a relationship between two categorical variables.
  • 8. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Example Chi-Square Test (X2) – (1) 8 • Hypothesis; – Association between gender and Knowledge on Nutrition (KoN) – Comparing the proportion of Low KoN between gender – Ho : P(KoN)male = P(KoN)femafe • Assumption – Random samples [ √ ] – Observations are independent [ √ ] – The number of cells with Expected Count (EC) less than 5, must be less than 20% of the total number of cells – The smallest EC must be at least 2 Calculated by SPSS
  • 9. 9 Chi-square using SPSS - procedure: 1 2 3
  • 10. 10 Chi-square using SPSS - procedure: 4 5 6 7 8 9
  • 11. Chi-square using SPSS - Output: 11 Descriptive statistics for each group Chi-square statistic = 0.417 df = 1; P-value = 0.518 Must be < 20% Must be ≥ 2 2 EC assumptions is met
  • 12. Chi-square using SPSS – Table and Interpretation: 12 Variable n Low KoN Freq (%) High KoN Freq (%) X2 statistics a (df) P-value Gender Male 39 19 (48.7) 20 (51.3) 0.417 (1) 0.518 Female 34 14 (41.2) 20 (58.8) Ethnicity Malay Others Education Level Low High Table 1: Factors (categorical variable) associated with Knowledge on Nutrition a Chi-square test for independence The prevalence (proportion) of Low Knowledge on Nutrition between male and female is not significantly different (P = 0.518). Therefore, there is no significant association between gender and Knowledge on Nutrition.
  • 13. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N What if assumptions were not met? 13 • Combine adjacent columns or/and rows to increase the EC if possible. • If still did not meet expected cell assumption, Fisher’s exact (FE) test can be applied (only for 2 x 2 table in SPSS).
  • 14. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Example Chi-Square Test (X2)– (2) 14 • Hypothesis; – Association between ethnicity and Knowledge on Nutrition (KoN) – Comparing the proportion of Low KoN between ethnicity – Ho : P(KoN)malay=P(KoN)chinese=P(KoN)indian=P(KoN)others • Assumption – Random samples [ √ ] – Observations are independent [ √ ] – The number of cells with Expected Count (EC) less than 5, must be less than 20% of the total number of cells – The smallest EC must be at least 2 Calculated by SPSS
  • 15. Chi-square using SPSS - Output: Descriptive statistics for each group 4 (50%) cells have EC less than 5. The smallest EC is 1.36. One remedial maybe to combine Indian and others, (or even combing 3 levels) and call it as “others”. (Combination should be interpretable/ meaningful) 15 Must be < 20% Must be ≥ 2 2 EC assumptions is not met
  • 16. Chi-square using SPSS - Output: Descriptive statistics for each group 16Must be < 20% Must be ≥ 2 2 EC assumptions is met Chi-square statistic = 0.072 df = 1; P-value = 0.788 If EC assumptions is still not met
  • 17. Chi-square using SPSS – Table and Interpretation: 17 Variable n Low KoN Freq (%) High KoN Freq (%) X2 statistics a (df) P-value Gender Male 39 19 (48.7) 20 (51.3) 0.417 (1) 0.518 Female 34 14 (41.2) 20 (58.8) Ethnicity Malay 43 20 (46.5) 23 (53.5) 0.072 (1) 0.788 Others 30 13 (43.3) 17 (56.7) Education Level Low High Table 1: Factors (categorical variable) associated with Knowledge on Nutrition a Chi-square test for independence The prevalence (proportion) of Low Knowledge on Nutrition between Malay and other ethnicity is not significantly different (P = 0.788). Therefore, there is no significant association between ethnicity and Knowledge on Nutrition.
  • 18. S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N Fisher Exact Test 18 • Fisher’s Exact Test is a test for independence in a 2 X 2 table. • It is most useful when the total sample size and the expected values are small. – Useful when E(cell counts) < 5. • The output consists of more than one p-values: – Choose Exact Sig. (2-sided)