Chapter 11 Goodness-of-Fit and Contingency Tables

Slides:



Advertisements
Similar presentations
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Lecture Slides Elementary Statistics Tenth Edition and the.
Advertisements

11-2 Goodness-of-Fit In this section, we consider sample data consisting of observed frequency counts arranged in a single row or column (called a one-way.
11-3 Contingency Tables In this section we consider contingency tables (or two-way frequency tables), which include frequency counts for categorical data.
Chi-Square Tests and the F-Distribution
Copyright © 2010, 2007, 2004 Pearson Education, Inc. 1.. Section 11-2 Goodness of Fit.
1 Pertemuan 11 Uji kebaikan Suai dan Uji Independen Mata kuliah : A Statistik Ekonomi Tahun: 2010.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Slide 1 Copyright © 2004 Pearson Education, Inc..
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
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.
Slide 1 Copyright © 2004 Pearson Education, Inc. Chapter 11 Multinomial Experiments and Contingency Tables 11-1 Overview 11-2 Multinomial Experiments:
Goodness-of-Fit and Contingency Tables Chapter 11.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Comparing Counts Chi Square Tests Independence.
Chi-Square hypothesis testing
CHAPTER 11 Inference for Distributions of Categorical Data
Chi-square test or c2 test
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Lecture Slides Essentials of Statistics 5th Edition
Lecture Slides Elementary Statistics Twelfth Edition
Lecture Slides Elementary Statistics Twelfth Edition
Chapter 12 Tests with Qualitative Data
Lecture Slides Elementary Statistics Twelfth Edition
Chapter 25 Comparing Counts.
1) A bicycle safety organization claims that fatal bicycle accidents are uniformly distributed throughout the week. The table shows the day of the week.
Elementary Statistics: Picturing The World
Inference on Categorical Data
Elementary Statistics
The Analysis of Categorical Data and Chi-Square Procedures
Lecture Slides Elementary Statistics Tenth Edition
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Elementary Statistics
Chapter 11: Inference for Distributions of Categorical Data
Chapter 11: Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Contingency Tables: Independence and Homogeneity
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Overview and Chi-Square
Inference on Categorical Data
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 11 Inference for Distributions of Categorical Data
Analyzing the Association Between Categorical Variables
CHAPTER 11 CHI-SQUARE TESTS
Hypothesis Tests for a Standard Deviation
The Analysis of Categorical Data and Goodness of Fit Tests
Chapter 26 Comparing Counts.
Chapter 13: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 11 Inference for Distributions of Categorical Data
Lecture Slides Elementary Statistics Twelfth Edition
Section 11-1 Review and Preview
Chapter 26 Comparing Counts Copyright © 2009 Pearson Education, Inc.
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Chapter 26 Comparing Counts.
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Inference for Distributions of Categorical Data
Presentation transcript:

Chapter 11 Goodness-of-Fit and Contingency Tables

11-2 Goodness-of-Fit

Goodness-of-Fit Test A goodness-of-fit test is used to test the hypothesis that an observed frequency distribution fits (or conforms to) some claimed distribution. Notation O represents the observed frequency of an outcome, found from the sample data. E represents the expected frequency of an outcome, found by assuming that the distribution is as claimed. k represents the number of different categories or cells. n represents the total number of trials.

Goodness-of-Fit Test Requirements The data have been randomly selected. The sample data consist of frequency counts for each of the different categories. For each category, the expected frequency is at least 5. (The expected frequency for a category is the frequency that would occur if the data actually have the distribution that is being claimed. There is no requirement that the observed frequency for each category must be at least 5.)

Hypotheses and Test Statistic Goodness-of-Fit Hypotheses and Test Statistic

P-Values and Critical Values P-values are typically provided by technology, or a range of P-values can be found from Table A-4. Critical Values 1. Found in Table A-4 using k – 1 degrees of freedom, where k = number of categories. 2. Goodness-of-fit hypothesis tests are always right-tailed.

Finding Expected Frequencies If all expected frequencies are assumed equal: If all expected frequencies are assumed not equal:

Goodness-of-Fit Test A close agreement between observed and expected values will lead to a small value of χ2 and a large P-value. A large disagreement between observed and expected values will lead to a large value of χ2 and a small P-value. A significantly large value of χ2 will cause a rejection of the null hypothesis of no difference between the observed and the expected.

Example A random sample of 100 weights of Californians is obtained, and the last digit of those weights are summarized on the next slide. When obtaining weights, it is extremely important to actually measure the weights rather than ask people to self-report them. By analyzing the last digit, we can verify the weights were actually measured since reported weights tend to be rounded to something ending with a 0 or a 5. Test the claim that the sample is from a population of weights in which the last digits do not occur with the same frequency. .

Example - Continued .

Example - Continued Requirement Check: The data come from randomly selected subjects. The data do consist of counts. With 100 sample values and 10 categories that are claimed to be equally likely, each expected frequency is 10, which is greater than 5. All requirements are met to proceed. .

Example - Continued Step 1: The original claim is that the digits do not occur with the same frequency. That is: Step 2: If the original claim is false, then all the probabilities are the same: .

Example - Continued Step 3: The hypotheses can be written as: Step 4: No significance level was specified, so we select α = 0.05. Step 5: We use the goodness-of-fit test with a χ2 distribution. .

Example - Continued Step 6: The calculation of the test statistic is given: .

Example - Continued Step 6: The test statistic is χ2 = 212.800 and the critical value is χ2 = 16.919 (Table A-4). The P-value was found to be less than 0.0001 using technology. .

Example - Continued Step 7: Reject the null hypothesis, since the P-value is small and the test statistic is in the critical region. Step 8: We conclude there is sufficient evidence to support the claim that the last digits do not occur with the same relative frequency. In other words, we have evidence that the weights were self-reported by the subjects, and the subjects were not actually weighed. .

11-3 Contingency Tables

Definition A contingency table (or two-way frequency table) is a table in which frequencies correspond to two variables. (One variable is used to categorize rows, and a second variable is used to categorize columns.) Contingency tables have at least two rows and at least two columns.

Example Below is a contingency table summarizing the results of foot procedures as a success or failure based different treatments.

Definition Test of Independence A test of independence tests the null hypothesis that in a contingency table, the row and column variables are independent. O represents the observed frequency in a cell of a contingency table. E represents the expected frequency in a cell, found by assuming that the row and column variables are independent r represents the number of rows in a contingency table (not including labels). c represents the number of columns in a contingency table (not including labels).

Requirements The sample data are randomly selected. The sample data are represented as frequency counts in a two-way table. For every cell in the contingency table, the expected frequency E is at least 5. (There is no requirement that every observed frequency must be at least 5. Also, there is no requirement that the population must have a normal distribution or any other specific distribution.)

Hypotheses and Test Statistic O is the observed frequency in a cell and E is the expected frequency in a cell.

P-Values and Critical Values P-values are typically provided by technology, or a range of P-values can be found from Table A-4. Critical Values 1. Found in Table A-4 using degrees of freedom = (r – 1)(c – 1) r is the number of rows and c is the number of columns 2. Tests of Independence are always right-tailed.

Expected Frequencies Referring back to slide 6, the observed frequency is 54 successful surgeries. The expected frequency is calculated using the first row total of 66, the first column total of 182, and the grand total of 253.

Example Does it appear that the choice of treatment affects the success of the treatment for the foot procedures? Use a 0.05 level of significance to test the claim that success is independent of treatment group.

Example - Continued Requirement Check: Based on the study, we will treat the subjects as being randomly selected and randomly assigned to the different treatment groups. The results are expressed in frequency counts. The expected frequencies are all over 5. The requirements are all satisfied.

Example - Continued The hypotheses are: The significance level is α = 0.05.

Example - Continued We use a χ2 distribution with this test statistic:

Example - Continued P-Value: If using technology, the P-value is less than 0.0001. Since this value is less than the significance level of 0.05, reject the null hypothesis. Critical Value: The critical value of χ2 = 7.815 is found in Table A-4 with α = 0.05 and degrees of freedom of Because the test statistic does fall in the critical region, we reject the null hypothesis. A graphic of the chi-square distribution is on the next slide.

Example - Continued

Example - Continued Interpretation: It appears that success is dependent on the treatment. Although this test does not tell us which treatment is best, we can see that the success rates of 81.8%, 44.6%, 95.9%, and 77.3% suggest that the best treatment is to use a non-weight-bearing cast for 6 weeks.

Example An obstetrician wants to know whether the proportion of children born on each day of the week is the same. She randomly selects 500 birth records and obtains the data in the following table. Is there reason to believe that the day on which a child is born does not occur with equal frequency at the α = 0.05 level of significance?

Day of Week Frequency Sunday 46 Monday 76 Tuesday 83 Wednesday 81 Thursday Friday 80 Saturday 53

Example A player in a craps game suspects that one of the dice is loaded. A loaded die is one in which all the possibilities are not equally likely. The player throws the die 400 times, records the outcome after each throw, and obtains the following results: Outcome Frequency 1 62 2 76 3 4 5 57 6 67

Example Do you think the that the die is loaded? Use the α = 0.01 level of significance. Why do you think the player might conduct the test at the α = 0.01level of significance rather than say, the α = 0.1 level of significance?