Chi Square Test

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

Chi Square Test

Chi Square (χ 2) Tests


• χ 2 is one of the more commonly used non-parametric tests used in
analyzing frequency data in health care
• Chi square is used to compare observed frequencies with expected
frequencies
• Contingency tables are used to display the data
2x2 Contingency Table for
Displaying Frequency Data
Professional Credentials by Geographic Location
Credential
location Health tech Health asst Total
Urban/suburban 30 76 106
Rural 55 37 92
Total 85 113 198
χ 2 Test of Independence
• χ 2 test of independence is used to determine if there is a relationship
between two variables
• If the variables are independent, a change in one variable does not
have any effect on the other, thus they are not related
• Null and alternative hypotheses
• H O: There is no association between the two variables of interest
(i.e. the variables are independent)
• H A: There is an association between the two variables of interest
χ 2 Test of Independence
• The χ 2 test of independence compares observed frequencies with
expected frequencies; the expected frequency of any given cell is
generated by:
• Expected Frequencies= row total x column total /grand total
• To calculate x2

x2= ∑(O-E) 2 / E

• Where O equals the


observed
frequencies, and E
equals the expected
frequencies

x2 Test of Independence
χ 2 test of Independence
• In the example we want to determine if there is a relationship between
professional credentials and geographic location. The null
and alternative hypotheses are:
• H O : there is no association between credentials and geographic
location
• H A : there is an association between credential and geographic
location
• alpha =0.05
χ 2 Test of Independence
to calculate χ 2
Credential
Health tech Health Asst
Location O E (O-E)2/E O E (O-E)2/E
Urban/sub 30 45.5 5.28 76 60.5 3.97
Rural 55 39.5 6.08 37 52.5 4.48
Total 85 85 113 113
χ 2 Test of Independence
• To calculate:χ 2=∑[(O-E)]2/E
• =5.28+60.8+3.97+4.58
• = 19.91
• χ 2=19.91
• χ 2 crit = 3.841, df = 1, p = .05
• Since the calculated value, 19.91, is > the critical value,
• 3.841, we reject the null hypothesis and conclude that there is a
relationship between professional credential and geographic location.
χ 2 Test of Independence
• Degrees of Freedom for Chi Square Test:
• df = (No of Rows – 1) x (No of Columns -1)
• So for a 2x2 it would be : 1
Conditions of Chi Square
• Should be actual number – Chi Square does not work on percentages
and proportions
• Expected Frequency for any given cell should not be less than 1
• 20% of total cells should not have less than 5 each expected frequency
• Yates correction factor
χ 2 Goodness of Fit Test

• χ 2 Goodness of Fit Test also compares observed frequencies with


expected frequencies
• However, the expected frequencies are based on knowledge of the
population under study
• If the physician population in XYZ hospital is composed of 75%
men and 25% women, we “expect” to draw a sample composed of 75%
men and 25% women
• The simple random (without stratification) sample will not exactly
match the population proportions, but we want to know if the
sample proportions differ significantly from the population
proportions
Faculty Dilemmas
• HEC requires that the ratio of various cadres of teaching faculty at Post
Graduate Institutes should be 1 : 2 : 3 : 4 among
Professors : Associate Professors : Assistant Professors : Lecturers
• In the Medical Colleges of three main cities of Punjab the total numbers of
such faculty was as follows:
• Professors 63
• Associate Professors 81
• Assistant Professors 168
• Lecturers 188
• Find out if the observed numbers conform to the HEC’s requirements
Faculty Dilemmas
• Expected Ratios (As given)
• 1 : 2 : 3 : 4 (1/10, 2/10, 3/10, 4/10)
• Observed Frequencies (As given)
• 63 + 81 + 168 + 188 = 500
Expected Frequencies = (Expected Fraction x Observed Total)
• 50 + 100 + 150 + 200 = 500
• O–E
• 13, -19, 18, -12
• (O – E) 2 = 169, 361, 324, 144
• (O – E) 2 / E = 3.38 + 3.61 + 2.16 + 0.72
• ∑ (O-E) 2 /E = 9.87
Faculty Dilemmas
• Degrees of Freedom for Chi Square
• Goodness of Fit
• Number of categories – 1
• 4–1=3
• χ 2 calc = 9.87
• χ 2 crit = 7.815, df = 3, p = 0.05
• Since the calculated chi square value is more than the critical value of
chi square for df=3 and p=0.05 we will?
EXERCISE
SOLUTION
Summary
• The χ 2 Test of Independence is a non parametric procedure that
compare observed frequencies in a contingency table with the
expected frequencies.
• The χ 2 Goodness of Fit Test is used to determine how well a sample
matches a population on “some” variable of interest.
Maternal Education & Under 5
Nutrition
• A survey was conducted to study the effect of maternal education o
malnutrition in children less than 5 years of age. A total of 460
mothers were included in the survey. 240 were educated whereas 220
were uneducated. Twenty of 240 educated mothers had a malnourished
child in her household as compared to 80 out of 220 uneducated
mothers.
• Determine if Maternal Education has a statistically significant effect
on Under 5 Nutrition?
• You may keep your level significance to be 0.05
PRACTICE PROBLEM

Does Maternal Education has an effect


on Childhood Malnutrition?
PRACTICE PROBLEM

• Which approach to hysterectomy results in


lesser infection rate?
Abdominal or Vaginal Hysterectomy
• A gynecologist wants to compare the two surgical approaches for
hysterectomy with regards to their infection rates. Data collected on
400 patients who had undergone Vaginal Hysterectomy showed 40 to
have experience post op infection where as 20 out of hundred patients
with abdominal hysterectomy developed infection.
• Find out if there is a significant difference in post op infection rates
between the two techniques.
• Alpha : 0.05

You might also like