 Test for Qualitative variables Chi Square Test Dr. Asif Rehman.

Slides:



Advertisements
Similar presentations
CHI-SQUARE(X2) DISTRIBUTION
Advertisements

Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Chi square.  Non-parametric test that’s useful when your sample violates the assumptions about normality required by other tests ◦ All other tests we’ve.
Parametric/Nonparametric Tests. Chi-Square Test It is a technique through the use of which it is possible for all researchers to:  test the goodness.
Bivariate Analysis Cross-tabulation and chi-square.
Hypothesis Testing IV Chi Square.
Chapter 13: The Chi-Square Test
Chi Square Analyses: Comparing Frequency Distributions.
Statistical Tests Karen H. Hagglund, M.S.
Please turn in your signed syllabus. We will be going to get textbooks shortly after class starts. Homework: Reading Guide – Chapter 2: The Chemical Context.
PY 427 Statistics 1Fall 2006 Kin Ching Kong, Ph.D Lecture 12 Chicago School of Professional Psychology.
CJ 526 Statistical Analysis in Criminal Justice
Chi Square: A Nonparametric Test PSYC 230 June 3rd, 2004 Shaun Cook, ABD University of Arizona.
Bivariate Statistics GTECH 201 Lecture 17. Overview of Today’s Topic Two-Sample Difference of Means Test Matched Pairs (Dependent Sample) Tests Chi-Square.
CHI-SQUARE statistic and tests
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Chi-square Goodness of Fit Test
Inferential Statistics
AM Recitation 2/10/11.
Statistical Analysis I have all this data. Now what does it mean?
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
CJ 526 Statistical Analysis in Criminal Justice
For testing significance of patterns in qualitative data Test statistic is based on counts that represent the number of items that fall in each category.
Statistical Analysis I have all this data. Now what does it mean?
Statistics 11 Correlations Definitions: A correlation is measure of association between two quantitative variables with respect to a single individual.
Two Variable Statistics
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Chi-Square. All the tests we’ve learned so far assume that our data is normally distributed z-test t-test We test hypotheses about parameters of these.
Chi-Square X 2. Parking lot exercise Graph the distribution of car values for each parking lot Fill in the frequency and percentage tables.
Statistical test for Non continuous variables. Dr L.M.M. Nunn.
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
CHI SQUARE TESTS.
HYPOTHESIS TESTING BETWEEN TWO OR MORE CATEGORICAL VARIABLES The Chi-Square Distribution and Test for Independence.
Chi Square Classifying yourself as studious or not. YesNoTotal Are they significantly different? YesNoTotal Read ahead Yes.
Chi square analysis Just when you thought statistics was over!!
© aSup-2007 CHI SQUARE   1 The CHI SQUARE Statistic Tests for Goodness of Fit and Independence.
Copyright © 2010 Pearson Education, Inc. Slide
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Inferential Statistics. The Logic of Inferential Statistics Makes inferences about a population from a sample Makes inferences about a population from.
Chapter Outline Goodness of Fit test Test of Independence.
Non-parametric Tests e.g., Chi-Square. When to use various statistics n Parametric n Interval or ratio data n Name parametric tests we covered Tuesday.
Chapter 14 Chi-Square Tests.  Hypothesis testing procedures for nominal variables (whose values are categories)  Focus on the number of people in different.
Making Comparisons All hypothesis testing follows a common logic of comparison Null hypothesis and alternative hypothesis – mutually exclusive – exhaustive.
1 Chi-square Test Dr. T. T. Kachwala. Using the Chi-Square Test 2 The following are the two Applications: 1. Chi square as a test of Independence 2.Chi.
Chi-Square Test (χ 2 ) χ – greek symbol “chi”. Chi-Square Test (χ 2 ) When is the Chi-Square Test used? The chi-square test is used to determine whether.
Chi Squared Statistical test used to see if the results of an experiment support a theory or to check that categorical data is independent of each other.
Bullied as a child? Are you tall or short? 6’ 4” 5’ 10” 4’ 2’ 4”
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
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.
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 &
The Chi-Square Distribution  Chi-square tests for ….. goodness of fit, and independence 1.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Goodness-of-Fit and Contingency Tables Chapter 11.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Chi Square Test Dr. Asif Rehman.
Cross Tabulation with Chi Square
Chapter 9: Non-parametric Tests
Lecture Nine - Twelve Tests of Significance.
Community &family medicine
The Chi-Square Distribution and Test for Independence
Is a persons’ size related to if they were bullied
Testing for Independence
Chi Square Two-way Tables
Is a persons’ size related to if they were bullied
Assistant prof. Dr. Mayasah A. Sadiq FICMS-FM
Parametric versus Nonparametric (Chi-square)
Chapter 18: The Chi-Square Statistic
Quadrat sampling & the Chi-squared test
Quadrat sampling & the Chi-squared test
Presentation transcript:

 Test for Qualitative variables Chi Square Test Dr. Asif Rehman

Outline  Types of Variables  Quantitative Data Assessment (parametric)  Descriptive assessment  T-test  Qualitative Data Assessment (Non parametric)  Descriptive Assessment  Chi Square test(Fisher Exact test)

Types of Data  Quantitative data or numerical data  Qualitative or Categorical data  Nominal Data(unordered, Do not represent any amount)  Sex (male,female)  Marital status (Married, Unmarried)  Blood group (O, A, AB, B)  Color of eyes (blue, green, brown,Black)  Nationality of a person (Pakistani, American, Turkish)  Ordinal data(ordered)  Measurement of height (tall, medium, short )  Degree of pain (mild, Moderate, severe)  Size of garment (large, medium,small )

Chi square test are done when;  Chi square test is used when both variables are measured on a nominal scale  It can be applied to interval or ratio data that have been categorized in to a small number of groups  It assumes that the observations are randomly sampled from the population  All observations are independent (an individual can appear only once in a table and there are no overlapping categories)

Categorical data assessment  Chi Square test (X 2 ) Compares observed and expected frequencies.  This test is applied to compare two or more than two proportions to test whether there is significant association between two are not  It is non parametric test, but is included in traditional methods of parametric tests

Chi Square test  The chi-square test is always testing what scientists call the Null Hypothesis, which states that there is no significant difference between the expected and observed result.  For estimating how closely an observed distribution matches an expected distribution  For estimating whether two random variables are independent.

Conducting Chi-Square Analysis 1) Make a hypothesis based on your basic research question 2) Determine the expected frequencies 3) Create a table with observed frequencies, expected frequencies, and chi-square values using the formula: (O - E) 2 E 4) Find the degrees of freedom: (C - 1)( R - 1) 5) Find the chi-square statistic in the Chi-Square Distribution table 6) If chi-square statistic > your calculated chi-square value, you do not reject your null hypothesis and vice versa.

Example To see the prophylactic value of Chloroquine, a study was conducted on 3540 persons. Out of 606 persons, who were given Chloroquine prophylactically, only 19 contracted malaria. Among those who were not given prophylactic treatment 193 contracted malaria. Comment on prophylactic value of Chloroquine.

Descriptive frequencies Total study population(n)= 3540 Chloroquine given= developed malaria=19 2. Did not developed malaria=587 Chloroquine not given= Contracted malaria= Did not contract malaria=2741

2x2 contingency table Contracted malaria Did not contract malaria Total Chloroquine given Chloroquine not given Total n=3540

 Null Hypothesis (H 0 )  Chloroquine has no role in prevention of malaria. At the end we have to reject or Accept the hypothesis

Calculation of expected values  E= Row total x Column total/Grand total = RT x CT/GT  E 1 = 606 x 212/3540 = 36  E 2 = 606 x 3328/3540 = 570  E 3 = 2934 x 212/3540 = 176  E 4 = 2934 x 3328/3540 = 2758

2x2 contingency table Contracted malariaDid not contract malaria Total Chloroquine givena (36)b (570) Chloroquine not givenc (176)d (2758) Total Expected  E= Row total x Column total/Grand total = RT x CT/GT  E 1 = 606 x 212/3540 = 36  E 2 = 606 x 3328/3540 = 570  E 3 = 2934 x 212/3540 = 176  E 4 = 2934 x 3328/3540 = 2758

2x2 contingency table Contracted malariaDid not contract malaria Total Chloroquine given Chloroquine not given Total n=3540 Contracted malariaDid not contract malaria Total Chloroquine given36570 Chloroquine not given Total Observed Expected

Calculation of x 2 value Observed value (O) Expected value (E) O-E(O-E) 2 (O-E) 2 /E O 1 =19E 1 = O 2 =587E 2 = O 3 =193E 3 = O 4 =2741E 4 = ∑=10.26

Calculation of degree of freedom Degree of freedom = (R - 1) x (C - 1) = (Rows-1) x (Column-1) = (2 - 1) x (2 - 1) = 1

Calculation of degree of freedom Degree of freedom = 1 Level of significance = 5% (0.05) Value = 3.84

Chi Square Table

Interpretation of results by consulting X 2 Table  Table value of X 2 with 1 degree of freedom, at the significance level of 5% (0.05) is 3.84  Our calculated value of X 2 is which is more than table value of 3.84  So we will reject the null hypothesis and will say that chloroquine does have the prophylactic role in malaria and P <  (the probability of occurrence of difference between two groups of persons only due to chance is <0.05 or 5%.

Exercise Suppose we have two vaccines A and B for the prevention of Measles and we have to decide which vaccine is more effective to be included in National program. We applied vaccine A to 100 children and 20 of them later developed infection. We applied vaccine B in another 100 children and 15 developed infection. Apparently vaccine be is better than A. 1. State your Null Hypothesis and Alternate Hypothesis 2. Make 2 x 2 table 3. Calculate chi square test 4. Interpret the results

THANK YOU