Chi square test and its types
-
Upload
rizwan-s-a -
Category
Health & Medicine
-
view
29 -
download
0
Transcript of Chi square test and its types
Chi square test and its variations Dr. S. A. Rizwan, M.D.
Public Health Specialist
SBCM, Joint Program – Riyadh
Ministry of Health, Kingdom of Saudi Arabia
Learning objectives
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Describe the conditions in which this test is used • Describe the assumptions for this test • Describe the steps involved in calculating this test • Interpret the test result • Describe the types of this test χ2
Introduction
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Chi square test, also called Pearson’s chi square test
• First investigated by Karl Pearson in 1900
Applications of chi square test
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Goodness of fit - whether an observed frequency distribution differs from a theoretical distribution.
• Homogeneity - compares the distribution of counts for two or more groups using the same categorical variable
• Independence (most commonly used) - assesses whether unpaired observations on two variables are independent of each other
• Others
Applications – example 1
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• A 6-sided die is thrown 60 times. The number of times it lands with 1, 2, 3, 4, 5 and 6 face up is 5, 8, 9, 8, 10 and 20, respectively. Is the die biased, according to the Pearson's chi-squared test at a significance level of 95%
Applications – example 2
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• A random sample of 100 people has been drawn from a population in which men and women are equal in frequency, the observed number of men and women would be compared to the theoretical frequencies of 50 men and 50 women
Applications – example 2.1
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• A random sample of 100 persons been drawn from men and 100 persons from among women. They were asked about smoking habits. Compare the percentage of smokers among men and women.
Men Women Total
Smoker 40 20 60
Non-smoker 60 80 140
Total 100 100 200
Applications – example 3
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• A city of 1 million residents with four neighborhoods: A, B, C, and D. A random sample of 650 residents of the city is taken and their occupation is recorded as "white collar", "blue collar", or "no collar". The null hypothesis is that each person's neighborhood of residence is independent of the person's occupational classification
Types / variations
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Test for goodness of fit • Test for Homogeneity • Test of Independence • Cochran–Mantel–Haenszel test • Test for Trend
* Advanced learning: What is Yate’s correction?
Assumptions
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Simple random sample • Data in the cells should be frequencies, or counts
of cases • Categories of the variables are mutually exclusive • Study groups must be independent • Value of cell expecteds should be 5 or more in at
least 80% of the cells • No cell should have an expected of less than one
Steps in Chi square test for independence
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Recall the general steps
1. Null hypothesis 2. Alternative hypothesis 3. Level of significance 4. Test statistic 5. Critical value 6. Decision & interpretation
Steps in Chi square test for independence
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Draw the contingency table
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Calculate totals for each row and column
Steps in Chi square test for independence
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Calculated expected frequencies for each cell
Steps in Chi square test for independence
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Calculate Chi square value using the formula and degree of freedom
Steps in Chi square test for independence
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Look at a chi-square table, for a 0.05 level of significance & 2 df, what is the critical chi-square value and make the conclusion
Steps in Chi square test for independence
Summary
Demystifying statistics! – Lecture 7 SBCM, Joint Program – Riyadh
• With computers, these tests are performed easily
• There are many situations where chi square is incorrectly applied
• It is important to know when to and when not to use them
Take home messages
Demystifying statistics! – Lecture 8 SBCM, Joint Program – Riyadh
• Chi square is one of the most used statistical tests
• Remember the different types of tests and their applications
• Remember the assumptions and always check for violations before interpreting the results
Thank you! Email your queries to [email protected]