AP Statistics Tuesday, 05 April 2016 OBJECTIVE TSW (1) identify the conditions to use a chi-square test; (2) examine the chi- square test for independence;

Slides:



Advertisements
Similar presentations
Chi-square test or c2 test
Advertisements

Chapter 11 Other Chi-Squared Tests
Chi-square test Chi-square test or  2 test. Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate)
 2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent)
AP Statistics Tuesday, 15 April 2014 OBJECTIVE TSW (1) identify the conditions to use a chi-square test; (2) examine the chi-square test for independence;
Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables.
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Goodness-of-Fit Tests.
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Chapter 11 Inference for Distributions of Categorical Data
Chapter 13: Inference for Distributions of Categorical Data
AP Statistics Thursday, 24 April 2014 OBJECTIVE TSW review for tomorrow’s Chi-Square Inference test. DUAL CREDIT FINAL: NEXT WEEK –Everyone will take this.
Chi-square test Chi-square test or  2 test. Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate)
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 14 Analysis of Categorical Data
Chi-square Goodness of Fit Test
Presentation 12 Chi-Square test.
Does your zodiac sign determine how successful you will be? Fortune magazine collected the zodiac signs of 256 heads of the largest 400 companies. Is there.
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Test of Independence.
Chapter 13: Inference for Tables – Chi-Square Procedures
Chapter 26: Comparing Counts AP Statistics. Comparing Counts In this chapter, we will be performing hypothesis tests on categorical data In previous chapters,
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
 2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent)
Chi-Square as a Statistical Test Chi-square test: an inferential statistics technique designed to test for significant relationships between two variables.
Chapter 11: Inference for Distributions of Categorical Data.
Chapter 11: Inference for Distributions of Categorical Data
Chi-square test Chi-square test or  2 test Notes: Page 217, and your own notebook paper 1.Goodness of Fit 2.Independence 3.Homogeneity.
Chi-square test Chi-square test or  2 test. crazy What if we are interested in seeing if my “crazy” dice are considered “fair”? What can I do?
Chi-square test or c2 test
Chi-square test Chi-square test or  2 test Notes: Page Goodness of Fit 2.Independence 3.Homogeneity.
Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests.
1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
+ Chi Square Test Homogeneity or Independence( Association)
Warm up On slide.
Chi-square test Chi-square test or  2 test. crazy What if we are interested in seeing if my “crazy” dice are considered “fair”? What can I do?
Chapter 13 Inference for Counts: Chi-Square Tests © 2011 Pearson Education, Inc. 1 Business Statistics: A First Course.
+ Chapter 11 Inference for Distributions of Categorical Data 11.1Chi-Square Goodness-of-Fit Tests 11.2Inference for Relationships.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Chapter 12 The Analysis of Categorical Data and Goodness of Fit Tests.
Chi-square test Chi-square test or  2 test. Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate)
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
Chi-Squared Test of Homogeneity Are different populations the same across some characteristic?
The χ 2 (Chi-Squared) Test. Crazy Dice? You roll a die 60 times and get: 3 ones, 6 twos, 19 threes, 22 fours, 6 fives, and 4 sixes  Is this a fair die?
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.
Inference for Tables Chi-Square Tests Chi-Square Test Basics Formula for test statistic: Conditions: Data is from a random sample/event. All individual.
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.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8… Where we are going… Significance Tests!! –Ch 9 Tests about a population proportion –Ch 9Tests.
Chapter 12 Lesson 12.2b Comparing Two Populations or Treatments 12.2: Test for Homogeneity and Independence in a Two-way Table.
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 or c2 test
Inference for Tables: Chi-Squares procedures (2 more chapters to go!)
Chi-square test or χ2 test
Chi-square test or c2 test
Chi-squared test or c2 test
Chi-square test or c2 test
Chi-square test or c2 test
Chi-square test or c2 test
Chi-square test or c2 test
The Analysis of Categorical Data and Chi-Square Procedures
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 11: Inference for Distributions of Categorical Data
Chi-square test or c2 test
The Analysis of Categorical Data and Goodness of Fit Tests
The Analysis of Categorical Data and Goodness of Fit Tests
The Analysis of Categorical Data and Goodness of Fit Tests
The Analysis of Categorical Data and Goodness of Fit Tests
Chi-square test or c2 test
Presentation transcript:

AP Statistics Tuesday, 05 April 2016 OBJECTIVE TSW (1) identify the conditions to use a chi-square test; (2) examine the chi- square test for independence; and (3) develop an understanding for a chi-square test for homogeneity.

Chi-square test Chi-square test or  2 test

fuzzy Suppose we are interested in seeing if some “fuzzy” dice are considered “fair”? What can we do?

Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate) –Independence (bivariate) –Homogeneity (univariate with two samples)

 2 distribution – df=3 df=5 df=10

 2 distribution – Different df have different curves Skewed right normal curveAs df increases, curve shifts toward right & becomes more like a normal curve

 2 assumptions SRSSRS – reasonably random sample countsHave counts of categorical data & we expect each category to happen at least once Sample sizeSample size – to ensure that the sample size is large enough we should expect at least five in each category. ***Be sure to list expected counts!! Combine these together: All expected counts are at least 5.

 2 formula

 2 Goodness of fit test Uses univariate data We want to see how well the observed counts “fit” what we expect the counts to be  2 cdf function p-valuesUse  2 cdf function on the calculator to find p-values Based on df – df = number of categories - 1

Hypotheses – written in words H 0 : the observed counts equal the expected counts H a : the observed counts are not equal to the expected counts Be sure to write in context!

Let’s test our dice! No, let’s skip this part.

AP Statistics Wednesday, 06 April 2016 OBJECTIVE TSW (1) identify the conditions to use a chi-square goodness of fit test; (2) examine the chi-square test for independence; and (3) develop an understanding for a chi-square test for homogeneity. TODAY’S ASSIGNMENT –WS Chi-Square Goodness of Fit Everyone needs a calculator.

Example 1 Does your zodiac sign determine how successful you will be? Fortune magazine collected the zodiac signs of 256 heads of the largest 400 companies. Is there sufficient evidence to claim that successful people are more likely to be born under some signs than others? Aries 23Libra18Leo20 Taurus20Scorpio21Virgo19 Gemini18Sagittarius19Aquarius24 Cancer23Capricorn22Pisces29 How many would you expect in each sign if there were no difference between them? How many degrees of freedom? I would expect CEOs to be equally born under all signs. So 256/12 = Since there are 12 signs – df = 12 – 1 = 11

Assumptions: Have a random sample of CEO’s All expected counts are greater than 5. (I expect CEO’s to be born in each sign.) H 0 : The number of CEO’s born under each sign is the same. H a : The number of CEO’s born under each sign is different. P-value =  2 cdf(5.094, 10^99, 11) =  = 0.05 Since p-value > , I fail to reject H 0. There is not sufficient evidence to suggest that the number of CEOs born under each sign is different.

Example 2 A company says its premium mixture of nuts contains 10% Brazil nuts, 20% cashews, 20% almonds, 10% hazelnuts and 40% peanuts. You buy a large can and separate the nuts. Upon weighing them, you find there are 112 g Brazil nuts, 183 g of cashews, 207 g of almonds, 71 g of hazelnuts, and 446 g of peanuts. You wonder whether your mix is significantly different from what the company advertises. Why is the chi-square goodness-of-fit test NOT appropriate here? What might you do instead of weighing the nuts in order to use chi-square? counts Because we do NOT have counts of the type of nuts. count We could count the number of each type of nut and then perform a  2 test.

Example 3 Offspring of certain fruit flies may have yellow or ebony bodies and normal wings or short wings. Genetic theory predicts that these traits will appear in the ratio 9:3:3:1 (yellow & normal, yellow & short, ebony & normal, ebony & short) A researcher checks 100 such flies and finds the distribution of traits to be 59, 20, 11, and 10, respectively. What are the expected counts? df? Are the results consistent with the theoretical distribution predicted by the genetic model? Expected counts: Y & N = Y & S = E & N = E & S = 6.25 We expect 9/16 of the 100 flies to have yellow and normal wings. (Y & N) Since there are 4 categories, df = 4 – 1 = 3

Assumptions: Have a random sample of fruit flies All expected counts are greater than 5. Expected counts: Y & N = 56.25, Y & S = 18.75, E & N = 18.75, E & S = 6.25 H 0 : The distribution of fruit flies is the same as the theoretical model. H a : The distribution of fruit flies is not the same as the theoretical model. P-value =  2 cdf(5.671, 10^99, 3) =  =.05 Since p-value > , I fail to reject H 0. There is not sufficient evidence to suggest that the distribution of fruit flies is not the same as the theoretical model.

Assignment WS Chi Square Goodness of Fit –Due before you leave today.

 2 Test For Independence

 2 test for independence Used with categorical, bivariate data from ONE sample Used to determine if the two categorical variables are associated (dependent) or not associated (independent)

Assumptions & formula remain the same!

Hypotheses – written in words H 0 : are independent H a : are dependent Be sure to write in context! Do NOT just write: “The two variables are independent / The two variables are dependent.”

Expected Counts Assuming H 0 is true,

Degrees of freedom Or cover up one row & one column & count the number of cells remaining!

Example 4 A beef distributor wishes to determine whether there is a relationship between geographic region and cut of meat preferred. If there is no relationship, we will say that beef preference is independent of geographic region. Suppose that, in a random sample of 500 customers, 300 are from the North and 200 are from the South. Also, 150 prefer cut A, 275 prefer cut B, and 75 prefer cut C.

If beef preference is independent of geographic region, how would we expect this table to be filled in? NorthSouthTotal Cut A150 Cut B275 Cut C75 Total

Now suppose that in the actual sample of 500 consumers the observed numbers were as follows: (on your paper) Is there sufficient evidence to suggest that geographic regions and beef preference are not independent? (Is there a difference between the expected and observed counts?)

Assumptions: Have a random sample of people All expected counts are greater than 5.  approximately normal distribution H 0 : geographic region and beef preference are independent H a : geographic region and beef preference are dependent P-value = df = 2  = 0.05 Since p-value < , I reject H 0. There is sufficient evidence to suggest that geographic region and beef preference are dependent. Expected Counts: N S A90 60 B C45 30

Assignment WS Chi-Square Independence –Due on Thursday, 16 April WS Chi-Square Goodness of Fit –Due by the end of the period today.

AP Statistics Monday, 11 April 2016 OBJECTIVE TSW (1) identify the conditions to use a chi-square test; (2) examine the chi-square test for independence; and (3) develop an understanding for a chi- square test for homogeneity. ASSIGNMENT DUE –WS Chi-Square Independence  wire basket QUIZ: Chi-Square is on Wednesday, 13 April –We will have ‘C’ lunch on Wednesday. TEST: Chi-Square Inference is on Monday, 18 April Everyone needs a calculator.

 2 Test For Homogeneity

 2 test for homogeneity single categorical two (or more) independent samplesUsed with a single categorical variable from two (or more) independent samples Used to determine if the two populations are the same (homogeneous)

Assumptions & formula remain the same! Expected counts & df are found the same way as the chi-square test for independence. only The only change is the hypotheses!

Hypotheses – written in words H 0 :The two (or more) distributions of are the same. H a :The distributions of are different. Be sure to write in context!

Example 5 The following data is on drinking behavior for independently chosen random samples of male and female students. Does there appear to be a gender difference with respect to drinking behavior? (Note: low = 1-7 drinks/wk, moderate = 8-24 drinks/wk, high = 25 or more drinks/wk) Assignment: Get together with the people in your row and complete this example (full write-up) on one piece of notebook paper AND copy this in your notes. Hand to me when your group finishes.

Assumptions ▪ 2 independent random samples ▪ Expected counts: all expected counts ≥ 5  approximately normal distribution H 0 :Drinking behavior is the same for male and female students. H a :Drinking behavior is different for male and female students. χ 2 = p = df = 3 α = 0.05 p < α  Reject H 0. There is sufficient evidence to suggest that drinking behavior is different for male and female students. MenWomen None Low Moderate High

Assignments WS Chi-Square –Due on Wednesday, 13 April WS Mixed Hypothesis Review #2 –Due on Wednesday, 13 April  you will get this tomorrow! WS Mixed Hypothesis Review #3 –Due on Monday, 18 April  you will get this tomorrow! WS AP Review Chi-Square  you will get this on Friday, 04/15/16! QUIZ: Chi-Square is on Wednesday, 13 April TEST: Chi-Square Inference is on Monday, 18 April 2016.