Assistant prof. Dr. Mayasah A. Sadiq FICMS-FM

Slides:



Advertisements
Similar presentations
CHI-SQUARE(X2) DISTRIBUTION
Advertisements

Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Hypothesis Testing IV Chi Square.
Chapter 13: The Chi-Square Test
PY 427 Statistics 1Fall 2006 Kin Ching Kong, Ph.D Lecture 12 Chicago School of Professional Psychology.
Ch 15 - Chi-square Nonparametric Methods: Chi-Square Applications
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
Chapter 13 Chi-Square Tests. The chi-square test for Goodness of Fit allows us to determine whether a specified population distribution seems valid. The.
Cross Tabulation and Chi-Square Testing. Cross-Tabulation While a frequency distribution describes one variable at a time, a cross-tabulation describes.
Statistics for the Behavioral Sciences (5 th ed.) Gravetter & Wallnau Chapter 17 The Chi-Square Statistic: Tests for Goodness of Fit and Independence University.
Chapter 26: Comparing Counts AP Statistics. Comparing Counts In this chapter, we will be performing hypothesis tests on categorical data In previous chapters,
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
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.
Chi-Square as a Statistical Test Chi-square test: an inferential statistics technique designed to test for significant relationships between two variables.
Chi-square (χ 2 ) Fenster Chi-Square Chi-Square χ 2 Chi-Square χ 2 Tests of Statistical Significance for Nominal Level Data (Note: can also be used for.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
1 In this case, each element of a population is assigned to one and only one of several classes or categories. Chapter 11 – Test of Independence - Hypothesis.
Analysis of Qualitative Data Dr Azmi Mohd Tamil Dept of Community Health Universiti Kebangsaan Malaysia FK6163.
CHI SQUARE TESTS.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
Chapter Outline Goodness of Fit test Test of Independence.
11.2 Tests Using Contingency Tables When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using.
State the ‘null hypothesis’ State the ‘alternative hypothesis’ State either one-tailed or two-tailed test State the chosen statistical test with reasons.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
ContentFurther guidance  Hypothesis testing involves making a conjecture (assumption) about some facet of our world, collecting data from a sample,
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.
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.
Statistics 300: Elementary Statistics Section 11-3.
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.
Comparing Observed Distributions A test comparing the distribution of counts for two or more groups on the same categorical variable is called a chi-square.
Chi Square Test Dr. Asif Rehman.
Comparing Counts Chi Square Tests Independence.
I. ANOVA revisited & reviewed
Test of independence: Contingency Table
Chapter 11 – Test of Independence - Hypothesis Test for Proportions of a Multinomial Population In this case, each element of a population is assigned.
Chapter 9: Non-parametric Tests
Chi-square test or c2 test
5.1 INTRODUCTORY CHI-SQUARE TEST
INTRODUCTORY STATISTICS FOR CRIMINAL JUSTICE
Association between two categorical variables
Hypothesis Testing Review
Community &family medicine
Chapter 25 Comparing Counts.
Hypothesis Testing Using the Chi Square (χ2) Distribution
Data Analysis for Two-Way Tables
Chi-Square Test.
Is a persons’ size related to if they were bullied
Chi Square Two-way Tables
Econ 3790: Business and Economics Statistics
Chi-Square Test.
Is a persons’ size related to if they were bullied
Contingency Tables: Independence and Homogeneity
Chi-Square Test.
Lesson 11 - R Chapter 11 Review:
CHI SQUARE TEST OF INDEPENDENCE
Analyzing the Association Between Categorical Variables
Chapter 26 Comparing Counts.
Chi-square = 2.85 Chi-square crit = 5.99 Achievement is unrelated to whether or not a child attended preschool.
Chapter 26 Comparing Counts.
Chapter 26 Comparing Counts Copyright © 2009 Pearson Education, Inc.
Inference for Two Way Tables
UNIT V CHISQUARE DISTRIBUTION
S.M.JOSHI COLLEGE, HADAPSAR
Chapter 18: The Chi-Square Statistic
Chapter 26 Comparing Counts.
Hypothesis Testing - Chi Square
What is Chi-Square and its used in Hypothesis? Kinza malik 1.
Presentation transcript:

Assistant prof. Dr. Mayasah A. Sadiq FICMS-FM The Chi-Square test Assistant prof. Dr. Mayasah A. Sadiq FICMS-FM 2

DATA QUALITATIVE QUANTITATIVE CHI SQUARE TEST T-TEST

The most obvious difference between the chi‑square tests and the other hypothesis tests we have considered (T test) is the nature of the data. For chi‑square, the data are frequencies rather than numerical scores.

For testing significance of patterns in qualitative data. Chi-squared Tests 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 Test statistics measures the agreement between actual counts(observed) and expected counts assuming the null hypothesis

Chi Square FORMULA:

Chi square distribution

Applications of Chi-square test: Goodness-of-fit The 2 x 2 chi-square test (contingency table, four fold table) The a x b chi-square test (r x c chi-square test)

Steps of CHI hypothesis testing 1. Data :counts or proportion. 2. Assumption: random sample selected from a population. 3. HO :no sign. Difference in proportion no significant association. HA: sign. Difference in proportion significant association.

4. level of sign. df 1st application=k-1(k is no. of groups) df 2nd &3rd application=(column-1)(row-1) IN 2nd application(conengency table) Df=1, tab. Chi= 3.841 always Graph is one side (only +ve)

5. apply appropriate test of significance

6. Statistical decision & 7. Conclusion Calculated chi <tabulated chi P>0.05 Accept HO,(may be true) If calculated chi> tabulated chi P<0.05 Reject HO& accept HA.

The Chi-Square Test for Goodness-of-Fit The chi-square test for goodness-of-fit uses frequency data from a sample to test hypotheses about the shape or proportions of a population. The data, called observed frequencies, simply count how many individuals from the sample are in each category.

Example Eye colour in a sample of 40 Blue 12,brown 21,green 3,others 4 Eye colour in population Brown 80% Blue 10% Green 2% Others 8% Is there any difference between proportion of sample to that of population .use α0.05

Observed counts(frequency) Figure 18.1 Distribution of eye colors for a sample of n = 40 individuals. The same frequency distribution is shown as a bar graph, as a table, and with the frequencies written in a series of boxes.

Expected counts(frequency) Expected blue10/100*40=4 Expected brown=80/100*40=32 Expexcted green=2/100*40=0.8 Expected others=8/100*40=3

1. Data Represents the eye colour of 40 person in the following distribution Brown=21 person,blue=12 person,green=3,others=4

2. Assumption Sample is randomly selected from the population.

3. Hypothesis Null hypothesis: there is no significant difference in proportion of eye colour of sample to that of the population. Alternative hypothesis: there is significant difference in proportion of eye colour of sample to that of the population.

4. Level of significance; (α =0.05); 5% Chance factor effect area 95% Influencing factor effect area d.f.(degree of freedom)=K-1; (K=Number of subgroups) =4-1=3 D.f. for 0.5=7.81

7.81 Accept Ho Influencing factor effect area 95% Reject Ho Chance factor effect area 5% 5%

Figure 18.4 For Example 18.1, the critical region begins at a chi-square value of 7.81.

5. Apply a proper test of significance

Chi Square FORMULA:

Observed counts(frequency) Figure 18.1 Distribution of eye colors for a sample of n = 40 individuals. The same frequency distribution is shown as a bar graph, as a table, and with the frequencies written in a series of boxes.

Expected counts(frequency) Expected blue=10/100*40=4 Expected brown=80/100*40=32 Expexcted green=2/100*40=0.8 Expected others=8/100*40=3

=(12-4)² (21-32)² (3-0.8)² (4-3)² ------------ +---------- +----------- + -------- 4 32 0.8 3 =(64/4) + (121/32)+(4.8/0.8)+(1/3) =16+3.78+6+0.3= Calculated chi =26.08

7.81 Accept Ho Influencing factor effect area 95% Reject Ho Chance factor effect area 5% 5%

6. Statistical decision Calculated chi> tabulated chi P<0.5

7. Conclusion We reject H0 &accept HA: there is significant difference in proportion of eye colour of sample to that of the population.

Applications of Chi-square test: Goodness-of-fit The 2 x 2 chi-square test (contingency table, four fold table) The a x b chi-square test (r x c chi-square test)

The Chi-Square Test for Independence The second chi-square test, the chi-square test for independence, can be used and interpreted in two different ways: 1. Testing hypotheses about the relationship between two variables in a population, or(2×2) 2. Testing hypotheses about differences between proportions for two or more populations.(a×b)

The Chi-Square Test for Independence (cont.) The data, called observed frequencies, simply show how many individuals from the sample are in each cell of the matrix. The null hypothesis for this test states that there is no relationship between the two variables; that is, the two variables are independent.

2× 2 chi square (contingency table )  

The Chi-Square Test for Independence (cont.) The calculation of chi-square is the same for all chi-square tests:

Chi Square FORMULA:

2nd application

Example A total 1500 workers on 2 operators(A&B) Were classified as deaf & non-deaf according to the following table.is there association between deafness & type of operator .let α 0.05

Result not deaf. deaf total Operator A 100 900 1000 B 60 440 500 total 160 1340 1500

Operator Result A B deaf not deaf. total 100 900 1000 60 440 500 160 1340 1500 Total number of items=1500 Total number of defective items=160

 

Operator Result A B def not def. total 100 900 1000 60 440 500 160 1340 1500 Expected deaf from Operator A = 1000 * 160/1500 = 106.7 (expected not deaf=1000-106.7=893.3) Expected deaf from Operator B = 500 * 160/1500 = 53.3

Result Operator A B def not def. total 100 900 1000 60 440 500 160 1340 1500 Operator Expected A B def not def. total 106.7 893.3 53.3 446.7

1. Data Represent 1500 workers,1000 on operator A 100 of them were deaf while 500 on operator B 60 of them were deaf

2. Assumption Sample is randomly selected from the population.

3. Hypothesis HO: there is no significant association between type of operator & deafness. HA:there is significant association between type of operator & deafness.

4. Level of significance; (α = 0.05); 5% Chance factor effect area 95% Influencing factor effect area d.f.(degree of freedom)=(r-1)(c-1) =(2-1)(2-1)=1 D.f. 1 for 0.05=3.841

3.841 Accept Ho Influencing factor effect area 95% Reject Ho Chance factor effect area 5% 5%

5. Apply a proper test of significance

=(100-106.7)² ( 900-893.3)² (60-53.3)² --------------- + ---------------- + -------------- 106.7 893.3 53.3 +(440-446.7)² ---------------= 446.7 =0.42+0.05+o.84+0.10 =1.41

3.841 Accept Ho Influencing factor effect area 95% Reject Ho Chance factor effect area 5% 5%

6. Statistical decision Calculated chi< tabulated chi P>0.5

7. Conclusion We accept H0 HO may be true There is no significant association between type of operator & deafness.

Applications of Chi-square test: Goodness-of-fit The 2 x 2 chi-square test (contingency table, four fold table) The a x b chi-square test (r x c chi-square test)

aₓ b SA A NO D SD Gr 1 12 18 4 8 12 Gr2 48 22 10 8 10 Gr3 10 4 12 10 12

 

Degree of freedom The d.f depends on colunms number & rows number. or (r-1 ) (c-1) i.e. if 3 row ,4 colunms Df=(3-1)(4-1) df =6 If 3 rows,3 colunms Df=(3-1)(3-1) Df=4

Yates Correction When we apply 2x2 chi-square test and one of the expected cells was <5 Or when we apply axb chi-square test and one of the expected cells was <2, Or when the grand total is <40 we have to apply Yates' correction formula;

YATES = ∑ -------------------------------------

Note When 2x2 chi-square test have a zero cell (one of the four cells is zero) we can not apply chi-square test because we have what is called a complete dependence criteria. But for axb chi-square test and one of the cells is zero when can not apply the test unless we do proper categorization to get rid of the zero cell.

12 3    Or 5 6 7 11 12 3    5 6 7 13