You are on page 1of 15

Introduction to Biostatistics

Lecture # 10- Chi-Square Test of Association

Ms. Saba Mughal


Lecturer- Biostatistics
School of Public Health- DUHS
hira.waseem@duhs.edu.pk

What We’ll Cover in This Session


Test of Association
Chi-Square Test…………………………
Fisher Exact’s Test……………………..
Chi-Square Test
Chi-square test is a non-parametric test and
follows a specific distribution known as chi-square
distribution.

This test is also known as Pearson's chi-square


test and is used to discover if there is a
relationship between two categorical variables.
Chi-Square Test
Cross tabulation
A cross tabulation (contingency table) is a joint
frequency distribution of cases based on two or
more categorical variables.

Chi-square Statistic
The joint frequency distribution can be analyzed
with the chi-square statistic 𝜒 2 to determine
whether the variables are statistically independent
or if they are dependent/associated.
Chi-Square Test
The chi-square (𝜒 2 ) statistic compares the observed
count in each table cell to the count which would be
expected (what we expect to see).

Requirement for the test


 Variables must be categorical having O: Observed frequency in a cell

independent groups.
 All expected frequencies are atleast 1.
 At most 20% of the expected frequencies
are less than 5.

E: Expected frequency in a cell, found by assuming


that the row and column variables are independent
Chi-Square Test
Example#01: Following are the results of a study about
(Y) whether a patient having surgery with general
anesthesia experienced a sore throat on waking (0=No,
1=Yes) as a function of the (T) type of device used to
secure the airway (0=Laryngeal mask airway, 1=Tracheal
tube). Check is there any relationship present between
type of device and patient’s sore throat?
Chi-Square test through SPSS
Chi-Square Test Results

OUTPUT
Chi-Square Test
Requirement for the test

(i) Both variables are categorical.

(ii) All expected frequencies are at least 1 and the


minimum expected account is 6.31.

(iii) 0 cells (0%) have expected count less than 5.


Chi-Square Test
1. State Hypothesis:
𝐻𝑜 : There is no statistically significant association between patient’s soar throat
and type of device.
𝐻1 : There is a statistically significant association between patient’s soar throat and
type of device.

2. Level of Significance: 𝛼 = 0.05

3. Test Statistic: Chi-square test of association

4. Computation: P-value = 0.060

5. Critical Region: Reject 𝐻𝑜 if 𝑝 − 𝑣𝑎𝑙𝑢𝑒 ≤ 𝛼

6. Conclusion: Here p-value is greater than 𝛼 so we fail to


reject the null hypothesis and conclude that there is no
statistically significant association between patient’s soar
throat and type of device.
Fisher’s Exact Test
Fisher's Exact test is a way to test the association
between two categorical variables when you have
small cell sizes (expected values less than 5).

Due to small sample size proportion of expected


counts less than five exceeds 20%. In this case we
are restricted to use Chi square test.
Fisher’s Exact Test
Example#02: A researcher wants to investigate the association between past
medical problems and fatigue status among 50 participants. Medical problem
(1=Yes, 2=No) Fatigue (1=Yes, 2=No).
Medical Problem Fatigue Medical Problem Fatigue
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 1 2
1 1 2 1
1 1 2 1
1 1 2 1
1 1 2 1
1 1 2 2
1 1 2 2
Fisher’s Exact Test

OUTPUT
Chi-Square Test
Requirement for the test

(i) Both variables are categorical.

(ii) All expected frequencies are at least 1 and the


minimum expected account is 1.56.

(iii) 2 cells (50%) have expected count less than 5.

Third assumption is violated so Fisher’s Exact test


should be applied.
Fisher’s Exact Test
1. State Hypothesis:
𝐻𝑜 : There is no statistically significant association between fatigue .
and past medical problems.
𝐻1 : There is a statistically significant association between fatigue
and past medical problems.

2. Level of Significance: 𝛼 = 0.05

3. Test Statistic: Fisher’s Exact test of association

4. Computation: P-Value = 0.643

5. Critical Region: Reject 𝐻𝑜 if 𝑝 − 𝑣𝑎𝑙𝑢𝑒 ≤ 𝛼

6. Conclusion: Here p-value is greater than 𝛼 so we fail to reject the


null hypothesis and conclude that there is no statistically significant
association between fatigue and past medical problems.

You might also like