The  2 (chi-squared) test for independence. One way of finding out is to perform a  2 (chi-squared) test for independence. We might want to find out.

Slides:



Advertisements
Similar presentations
CHI-SQUARE(X2) DISTRIBUTION
Advertisements

Hypothesis Testing and Comparing Two Proportions Hypothesis Testing: Deciding whether your data shows a “real” effect, or could have happened by chance.
15- 1 Chapter Fifteen McGraw-Hill/Irwin © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved.
Chi Square Example A researcher wants to determine if there is a relationship between gender and the type of training received. The gender question is.
Statistical Inference for Frequency Data Chapter 16.
Chi-Square Test of Independence u Purpose: Test whether two nominal variables are related u Design: Individuals categorized in two ways.
Chapter Goals After completing this chapter, you should be able to:
Cross-Tabulations.
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.
1 of 27 PSYC 4310/6310 Advanced Experimental Methods and Statistics © 2013, Michael Kalsher Michael J. Kalsher Department of Cognitive Science Adv. Experimental.
Chapter 13 Chi-squared hypothesis testing. Summary.
The table shows a random sample of 100 hikers and the area of hiking preferred. Are hiking area preference and gender independent? Hiking Preference Area.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics S eventh Edition By Brase and Brase Prepared by: Lynn Smith.
Material Taken From: Mathematics for the international student Mathematical Studies SL Mal Coad, Glen Whiffen, John Owen, Robert Haese, Sandra Haese and.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
Two Variable Statistics
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Chi-square test Chi-square test or  2 test Notes: Page Goodness of Fit 2.Independence 3.Homogeneity.
A Course In Business Statistics 4th © 2006 Prentice-Hall, Inc. Chap 9-1 A Course In Business Statistics 4 th Edition Chapter 9 Estimation and Hypothesis.
Chi-Square X 2. Parking lot exercise Graph the distribution of car values for each parking lot Fill in the frequency and percentage tables.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Other Chi-Square Tests
Test of Homogeneity Lecture 45 Section 14.4 Wed, Apr 19, 2006.
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.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Test of Goodness of Fit Lecture 43 Section 14.1 – 14.3 Fri, Apr 8, 2005.
CHAPTER INTRODUCTORY CHI-SQUARE TEST Objectives:- Concerning with the methods of analyzing the categorical data In chi-square test, there are 2 methods.
Chi Squared Test for Independence. Hypothesis Testing Null Hypothesis, – States that there is no significant difference between two (population) parameters.
Chapter Outline Goodness of Fit test Test of Independence.
The table shows a random sample of 100 hikers and the area of hiking preferred. Are hiking area preference and gender independent? Hiking Preference Area.
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.
ContentFurther guidance  Hypothesis testing involves making a conjecture (assumption) about some facet of our world, collecting data from a sample,
Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.
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.
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.
Material Taken From: Mathematics for the international student Mathematical Studies SL Mal Coad, Glen Whiffen, John Owen, Robert Haese, Sandra Haese and.
Statistics 300: Elementary Statistics Section 11-3.
Chi-Square Chapter 14. Chi Square Introduction A population can be divided according to gender, age group, type of personality, marital status, religion,
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Seven Steps for Doing  2 1) State the hypothesis 2) Create data table 3) Find  2 critical 4) Calculate the expected frequencies 5) Calculate  2 6)
Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.
Test of independence: Contingency Table
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Testing a Claim About a Mean:  Not Known
1) A bicycle safety organization claims that fatal bicycle accidents are uniformly distributed throughout the week. The table shows the day of the week.
The Chi-Square Distribution and Test for Independence
Is a persons’ size related to if they were bullied
Consider this table: The Χ2 Test of Independence
Contingency Tables: Independence and Homogeneity
Statistical Analysis Chi-Square.
Chi-square test or c2 test
Inference on Categorical Data
Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007
Lecture 42 Section 14.4 Wed, Apr 17, 2007
Lecture 37 Section 14.4 Wed, Nov 29, 2006
The 2 (chi-squared) test for independence
CHI SQUARE TEST OF INDEPENDENCE
Lecture 43 Sections 14.4 – 14.5 Mon, Nov 26, 2007
Looks at differences in frequencies between groups
Chapter Outline Goodness of Fit test Test of Independence.
Quadrat sampling & the Chi-squared test
Quadrat sampling & the Chi-squared test
Lecture 46 Section 14.5 Wed, Apr 13, 2005
Lecture 43 Section 14.1 – 14.3 Mon, Nov 28, 2005
Chapter 11 Lecture 2 Section: 11.3.
What is Chi-Square and its used in Hypothesis? Kinza malik 1.
Presentation transcript:

The  2 (chi-squared) test for independence

One way of finding out is to perform a  2 (chi-squared) test for independence. We might want to find out whether or not there is an association between ‘age-group taught’ and ‘gender’. We first set up a null hypothesis, H 0, and an alternative hypothesis, H 1. H 0 always states that the data sets are independent, and H 1 always states that they are related. To set up the test: A random sample of 200 teachers in higher education, secondary schools and primary schools gave the following numbers of men and women in each sector: Higher Education Secondary Education Primary Education Male Female In this case, H 0 could be “The age-group taught is independent of gender”. H 1 could be “There is an association between age-group taught and gender.”

Higher Education Secondary Education Primary Education Male Female We put the data into a table. The elements in the table are our observed data and the table is known as a contingency table.

Higher Education Secondary Education Primary Education TOTAL Male Female TOTAL We put the data into a table. The elements in the table are our observed data and the table is known as a contingency table

Higher Education Secondary Education Primary Education TOTAL Male Female TOTAL From the observed data we can calculate the expected frequencies. The expected frequency for each cell will be: row total x column total total sample size Higher Education Secondary Education Primary Education TOTAL Male 80 Female 120 TOTAL  We put the data into tables. The elements in the table are our observed data and the table is known as a contingency table

The expected frequency for each cell will be: row total x column total total sample size Higher Education Secondary Education Primary Education TOTAL Male 80 Female 120 TOTAL In fact for this table we only need to actually work out two of the expected values, and the rest will follow from the totals. This gives us the degree of freedom for this table - it is 2

Higher Education Secondary Education Primary Education TOTAL Male 80 Female 120 TOTAL In fact for this table we only need to actually work out two of the expected values, and the rest will follow from the totals This tells us that the degree of freedom for this table is 2 You can always find the degree of freedom by going back to the original table (without the totals). Crossing off one column and one row, and the number of cells left is the degree of freedom. (No. of columns – 1) x (No. of rows – 1) Higher Education Secondary Education Primary Education Male Female df = 2

Higher Education Secondary Education Primary Education Male Female Higher Education Secondary Education Primary Education Male Female Contingency Table – Observed DataExpected Frequencies Now we are ready to calculate the  2 value using the formula:  2 calc f o is the observed value f e is the expected value  2 calc Finally use the table of critical values at the back of your formulae booklet. If the  2 calc value is less than the critical value, we accept H 0, the null hypothesis. If the  2 calc value is more than the critical value, we do not accept the null hypothesis, so we accept H 1 In this case the  2 calc value is 11.3, and the critical value at 5% is So we do not accept H 0, the null hypothesis. There is an association between age-group taught and gender.

If the  2 calc value is less than the critical value, we do accept H 0, the null hypothesis. If the  2 calc value is more than the critical value, we do not accept the null hypothesis, so we accept H 1 If the p- value is less than the significance level, we do not accept H 0, the null hypothesis. If the p- value is more than the significance level, we do accept the null hypothesis, so we accept H 1

 2 is given to you. p is the probability df is the degree of freedom You can do all this on the GDC: Enter the data into a Matrix MATRIXENTER [EDIT] Enter the size of your matrix ; in this case 2 x 3 (2 rows, 3 columns) Enter your data, pressing after every value. ENTER STAT [TESTS] Scroll up to find  2 ENTER You will now see where your table of expected values will be ; change it if you wish. Otherwise scroll down to Calculate and ENTER To see the table of expected values: Finally use the table of critical values at the back of your formulae booklet. If the  2 calc value is less than the critical value, we accept the null hypothesis. If the  2 calc value is more than the critical value, we do not accept the null hypothesis, so we accept H 1 ENTER MATRIX

One way of finding out is to perform a  2 (chi-squared) test for independence. We may want to find out whether favourite colour of car and gender are independent or related. We first set up a null hypothesis, H 0, and an alternative hypothesis, H 1. H 0 always states that the data sets are independent, and H 1 always states that they are related. To set up the test: Suppose we collect data on the favourite colour of car for men and women. BlackWhiteRedBlue Male Female In this case, H 0 could be “The favourite colour of car is independent of gender”. H 1 could be “There is an association between favourite colour of car and gender.”

BlackWhiteRedBlue TOTAL Male Female TOTAL

BlackWhiteRedBlue TOTAL Male 130 Female 130 TOTAL From the observed data we can calculate the expected frequencies. The expected frequency for each cell will be: row total x column total total sample size 4829 BlackWhiteRedBlue TOTAL Male Female TOTAL

BlackWhiteRedBlue TOTAL Male Female 130 TOTAL The expected frequency for each cell will be: row total x column total total sample size In fact for this table we only need to actually work out three of the expected values, and the rest will follow from the totals. This gives us the degree of freedom for this table - it is

BlackWhiteRedBlue TOTAL Male Female TOTAL In fact for this table we only need to actually work out two of the expected values, and the rest will follow from the totals. This tells us that the degree of freedom for this table is 2 You can always find the degree of freedom by going back to the original table (without the totals). Crossing off one column and one row, and the number of cells left is the degree of freedom. (No. of columns – 1) x (No. of rows – 1) df = 3 BlackWhiteRedBlue Male Female

Contingency Table – Observed DataExpected Frequencies Now we are ready to calculate the  2 value using the formula: f o is the observed value f e is the expected value  2 calc Finally use the table of critical values at the back of your formulae booklet. If the  2 calc value is less than the critical value, we accept H 0, the null hypothesis. If the  2 calc value is more than the critical value, we do not accept the null hypothesis, so we accept H 1 In this case the  2 calc value is 6.13, and the critical value at 5% is So we do accept H 0, the null hypothesis. There is no association between favourite colour of car and gender. BlackWhiteRedBlue Male Female BlackWhiteRedBlue Male Female  2 calc