THE CHI-SQUARE TEST BACKGROUND AND NEED OF THE TEST Data collected in the field of medicine is often qualitative. --- For example, the presence or absence.

Slides:



Advertisements
Similar presentations
CHI-SQUARE(X2) DISTRIBUTION
Advertisements

Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Lecture Slides Elementary Statistics Tenth Edition and the.
15- 1 Chapter Fifteen McGraw-Hill/Irwin © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved.
The Chi-Square Test for Association
Text books: (1)Medical Statistics A commonsense approach A commonsense approach By By Michael J. Campbell & David Machin Michael J. Campbell & David Machin.
Statistical Tests Karen H. Hagglund, M.S.
Analysis of frequency counts with Chi square
Copyright ©2011 Brooks/Cole, Cengage Learning More about Inference for Categorical Variables Chapter 15 1.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Categorical Variables Chapter 15.
ChiSq Tests: 1 Chi-Square Tests of Association and Homogeneity.
Applications of the Chi-Square Statistic Introduction to Business Statistics, 5e Kvanli/Guynes/Pavur (c)2000 South-Western College Publishing.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
1 Nominal Data Greg C Elvers. 2 Parametric Statistics The inferential statistics that we have discussed, such as t and ANOVA, are parametric statistics.
Presentation 12 Chi-Square test.
The Chi-Square Test Used when both outcome and exposure variables are binary (dichotomous) or even multichotomous Allows the researcher to calculate a.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
GOODNESS OF FIT TEST & CONTINGENCY TABLE
Analysis of Categorical Data
1 Psych 5500/6500 Chi-Square (Part Two) Test for Association Fall, 2008.
Dr.Shaikh Shaffi Ahamed Ph.D., Dept. of Family & Community Medicine
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
1 Chi-Square Heibatollah Baghi, and Mastee Badii.
Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests.
CHAPTER 5 INTRODUCTORY CHI-SQUARE TEST This chapter introduces a new probability distribution called the chi-square distribution. This chi-square distribution.
Introduction Many experiments result in measurements that are qualitative or categorical rather than quantitative. Humans classified by ethnic origin Hair.
The binomial applied: absolute and relative risks, chi-square.
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
Chapter-8 Chi-square test. Ⅰ The mathematical properties of chi-square distribution  Types of chi-square tests  Chi-square test  Chi-square distribution.
Chi- square test x 2. Chi Square test Symbolized by Greek x 2 pronounced “Ki square” A Test of STATISTICAL SIGNIFICANCE for TABLE data.
Analysis of Qualitative Data Dr Azmi Mohd Tamil Dept of Community Health Universiti Kebangsaan Malaysia FK6163.
Learning Objectives Copyright © 2002 South-Western/Thomson Learning Statistical Testing of Differences CHAPTER fifteen.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
The exam is of 2 hours & Marks :40 The exam is of two parts ( Part I & Part II) Part I is of 20 questions. Answer any 15 questions Each question is of.
CHAPTER INTRODUCTORY CHI-SQUARE TEST Objectives:- Concerning with the methods of analyzing the categorical data In chi-square test, there are 2 methods.
Inferential Statistics. Coin Flip How many heads in a row would it take to convince you the coin is unfair? 1? 10?
Chapter Outline Goodness of Fit test Test of Independence.
Copyright © Cengage Learning. All rights reserved. Chi-Square and F Distributions 10.
12/23/2015Slide 1 The chi-square test of independence is one of the most frequently used hypothesis tests in the social sciences because it can be used.
More Contingency Tables & Paired Categorical Data Lecture 8.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Types of Categorical Data Qualitative/Categorical Data Nominal CategoriesOrdinal Categories.
CHAPTER INTRODUCTORY CHI-SQUARE TEST Objectives:- Concerning with the methods of analyzing the categorical data In chi-square test, there are 3 methods.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Introduction to Biostatistics, Harvard Extension School, Fall, 2005 © Scott Evans, Ph.D.1 Contingency Tables.
Dr.Shaikh Shaffi Ahamed Ph.D., Dept. of Family & Community Medicine
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
©2006 Thomson/South-Western 1 Chapter 12 – Analysis of Categorical Data Slides prepared by Jeff Heyl Lincoln University ©2006 Thomson/South-Western Concise.
Chi Square Test Dr. Asif Rehman.
CHI-SQUARE(X2) DISTRIBUTION
Chapter 9: Non-parametric Tests
Presentation 12 Chi-Square test.
Lecture8 Test forcomparison of proportion
5.1 INTRODUCTORY CHI-SQUARE TEST
CHAPTER 11 CHI-SQUARE TESTS
Chapter Fifteen McGraw-Hill/Irwin
The binomial applied: absolute and relative risks, chi-square
Hypothesis Testing Review
Qualitative data – tests of association
Lecture Slides Elementary Statistics Tenth Edition
Hypothesis testing. Chi-square test
Contingency Tables: Independence and Homogeneity
Overview and Chi-Square
Chapter 13 – Applications of the Chi-Square Statistic
CHAPTER 11 CHI-SQUARE TESTS
What are their purposes? What kinds?
Parametric versus Nonparametric (Chi-square)
Presentation transcript:

THE CHI-SQUARE TEST BACKGROUND AND NEED OF THE TEST Data collected in the field of medicine is often qualitative. --- For example, the presence or absence of a symptom, classification of pregnancy as ‘high risk’ or ‘non- high risk’, the degree of severity of a disease (mild, moderate, severe)

The measure computed in each instance is a proportion, corresponding to the mean in the case of quantitative data such as height, weight, BMI, serum cholesterol. Comparison between two or more proportions, and the test of significance employed for such purposes is called the “Chi-square test”

KARL PEARSON IN 1889, DEVISED AN INDEX OF DISPERSION OR TEST CRITERIOR DENOTED AS “CHI-SQUARE “. (  2 ). KARL PEARSON IN 1889, DEVISED AN INDEX OF DISPERSION OR TEST CRITERIOR DENOTED AS “CHI-SQUARE “. (  2 ).

Introduction  What is the  2 test?   2 is a non-parametric test of statistical significance for bivariate tabular analysis.  Any appropriately performed test of statistical significance lets you know that degree of confidence you can have in accepting or rejecting a hypothesis.

Introduction  What is the  2 test?  The hypothesis tested with chi square is whether or not two different samples are different enough in some characteristics or aspects of their behavior that we can generalize from our samples that the populations from which our samples are drawn are also different in the behavior or characteristic.

Introduction  What is the  2 test?  The  2 test is used to test a distribution observed in the field against another distribution determined by a null hypothesis.  Being a statistical test,  2 can be expressed as a formula. When written in mathematical notation the formula looks like this:

Chi- Square   ( o - e ) 2 e X = X 2 = Figure for Each Cell

reject H o if  2 >  2. ,df where df = (r-1)(c-1)  2 = ∑ (O - E) 2 E 3.E is the expected frequency ^ E =E =E =E = ^ (total of all cells) total of row in which the cell lies total of column in which the cell lies 1.The summation is over all cells of the contingency table consisting of r rows and c columns 2.O is the observed frequency 4.The degrees of freedom are df = (r-1)(c-1)

Chi-square test Test statistics

Introduction  When using the chi square test, the researcher needs a clear idea of what is being investigate.  It is customary to define the object of the research by writing an hypothesis.  Chi square is then used to either prove or disprove the hypothesis.

Hypothesis  The hypothesis is the most important part of a research project. It states exactly what the researcher is trying to establish. It must be written in a clear and concise way so that other people can easily understand the aims of the research project.

Chi-square test Purpose To find out whether the association between two categorical variables are statistically significant Null Hypothesis There is no association between two variables

Requirements  Prior to using the chi square test, there are certain requirements that must be met.  The data must be in the form of frequencies counted in each of a set of categories. Percentages cannot be used.  The total number observed must be exceed 20.

Requirements  The expected frequency under the H 0 hypothesis in any one fraction must not normally be less than 5.  All the observations must be independent of each other. In other words, one observation must not have an influence upon another observation.

APPLICATION OF CHI-SQUARE TEST  TESTING INDEPENDCNE (or ASSOCATION)  TESTING FOR HOMOGENEITY  TESTING OF GOODNESS-OF- FIT

Chi-square test  Objective : Smoking is a risk factor for MI  Null Hypothesis: Smoking does not cause MI D (MI)D-(No MI)Total Smokers Non-smokers Total

Chi-SquareChi-Square E O 29 E O 21 E O 16 E O 34 MINon-MI Smoker Non-Smoker

Chi-SquareChi-Square E O 29 E O 21 E O 16 E O 34 MINon-MI Smoker Non-smoker

Estimating the Expected Frequencies E =E =E =E = ^ (row total for this cell)(column total for this cell) n Classification 1 Classification c r 123 C1C1C1C1 C2C2C2C2 C3C3C3C3 C4C4C4C4 CcCcCcCc R1R1R1R1 R2R2R2R2 R3R3R3R3 RrRrRrRr E =E =E =E = ^ R2C3R2C3nnR2C3R2C3nnn

Chi-SquareChi-Square E O 29 E O 21 E O 16 E O 34 MINon-MI Smoker Non-smoker X = 22.5

Chi-SquareChi-Square E O 29 E O 21 E O 16 E O 34 AloneOthers Males Females

Chi-SquareChi-Square  Degrees of Freedom df = (r-1) (c-1) = (2-1) (2-1) =1  Critical Value (Table A.6) = 3.84  Critical Value (Table A.6) = 3.84  X 2 = 6.84  Calculated value(6.84) is greater than critical (table) value (3.84) at 0.05 level with 1 d.f.f  Hence we reject our Ho and conclude that there is highly statistically significant association between smoking and MI.

Chi square table dfά = 0.05 ά = 0.01 ά =

Age Gender 45Total Male 60 (60)20 (30)40 (30)120 Female 40 (40)30 (20)10 (20)80 Total Chi- square test Find out whether the gender is equally distributed among each age group

Test for Homogeneity (Similarity) To test similarity between frequency distribution or group. It is used in assessing the similarity between non-responders and responders in any survey Age (yrs)RespondersNon-respondersTotal <2076 (82)20 (14)96 20 – (289)50 (49) (310)51 (53) (185)30 (32)217 >5077 (73) 9 (13) 86 Total

What to do when we have a paired samples and both the exposure and outcome variables are qualitative variables (Binary). What to do when we have a paired samples and both the exposure and outcome variables are qualitative variables (Binary).

Problem  A researcher has done a matched case- control study of endometrial cancer (cases) and exposure to conjugated estrogens (exposed).  In the study cases were individually matched 1:1 to a non-cancer hospital- based control, based on age, race, date of admission, and hospital.

Data

 can’t use a chi-squared test - observations are not independent - they’re paired.  we must present the 2 x 2 table differently  each cell should contain a count of the number of pairs with certain criteria, with the columns and rows respectively referring to each of the subjects in the matched pair  the information in the standard 2 x 2 table used for unmatched studies is insufficient because it doesn’t say who is in which pair - ignoring the matching

Data

McNemar’s test Situation:  Two paired binary variables that form a particular type of 2 x 2 table  e.g. matched case-control study or cross-over trial

We construct a matched 2 x 2 table:

The odds ratio is: f/g The test is: Formula Compare this to the  2 distribution on 1 df

P <0.001, Odds Ratio = 43/7 = 6.1 p 1 - p 2 = (55/183) – (19/183) = (20%) s.e.(p 1 - p 2 ) = % CI: 0.12 to 0.27 (or 12% to 27%)

 Degrees of Freedom df = (r-1) (c-1) = (2-1) (2-1) =1  Critical Value (Table A.6) = 3.84  Critical Value (Table A.6) = 3.84  X 2 =  Calculated value(25.92) is greater than critical (table) value (3.84) at 0.05 level with 1 d.f.f  Hence we reject our Ho and conclude that there is highly statistically significant association between Endometrial cancer and Estrogens.

| Controls | Cases | Exposed Unexposed | Total Exposed | | 55 Unexposed | | Total | | 183 McNemar's chi2(1) = Prob > chi2 = Exact McNemar significance probability = Proportion with factor Cases Controls [95% Conf. Interval] difference ratio rel. diff odds ratio (exact) Stata Output