The goodness-of-fit test Having discussed how to make comparisons between two proportions, we now consider comparisons of multiple proportions.

Similar documents
Chapter 10. Chapter 10. Multinomial Experiments and. Multinomial Experiments and Contingency Tables. Contingency Tables.

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

11-2 Multinomial Experiment

10.2: The Chi Square Test for Goodness of Fit

:the actual population proportion are equal to the hypothesized sample proportions 2. H a

Example. χ 2 = Continued on the next page. All cells

Nominal Data. Parametric Statistics. Nonparametric Statistics. Parametric vs Nonparametric Tests. Greg C Elvers

STA Module 10 Comparing Two Proportions

POLI 443 Applied Political Research

HYPOTHESIS TESTING: THE CHI-SQUARE STATISTIC

hypothesis a claim about the value of some parameter (like p)

Statistical Analysis for QBIC Genetics Adapted by Ellen G. Dow 2017

Parametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami

Quantitative Analysis and Empirical Methods

Ch. 11 Inference for Distributions of Categorical Data

Chapter 26: Comparing Counts (Chi Square)

We know from STAT.1030 that the relevant test statistic for equality of proportions is:

STAT Chapter 13: Categorical Data. Recall we have studied binomial data, in which each trial falls into one of 2 categories (success/failure).

Tables Table A Table B Table C Table D Table E 675

Statistics: revision

Frequency Distribution Cross-Tabulation

10: Crosstabs & Independent Proportions

Chapte The McGraw-Hill Companies, Inc. All rights reserved.

Classroom Activity 7 Math 113 Name : 10 pts Intro to Applied Stats

7.2 One-Sample Correlation ( = a) Introduction. Correlation analysis measures the strength and direction of association between

Lecture 28 Chi-Square Analysis

Statistics for Managers Using Microsoft Excel

The Chi-Square Distributions

χ test statistics of 2.5? χ we see that: χ indicate agreement between the two sets of frequencies.

Study Ch. 13.1, # 1 4 all Study Ch. 13.2, # 9 15, 25, 27, 31 [# 11 17, ~27, 29, ~33]

Topic 21 Goodness of Fit

Testing Independence

Chi-Square. Heibatollah Baghi, and Mastee Badii

Logistic Regression Analysis

Module 10: Analysis of Categorical Data Statistics (OA3102)

Mathematical Notation Math Introduction to Applied Statistics

Inferential statistics

Lecture 22. December 19, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

Degrees of freedom df=1. Limitations OR in SPSS LIM: Knowing σ and µ is unlikely in large

The entire data set consists of n = 32 widgets, 8 of which were made from each of q = 4 different materials.

STAT Chapter 8: Hypothesis Tests

Lecture 9. Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests

LOOKING FOR RELATIONSHIPS

STP 226 ELEMENTARY STATISTICS NOTES

Stats Review Chapter 14. Mary Stangler Center for Academic Success Revised 8/16

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages:

Using SPSS for One Way Analysis of Variance

Chi-Squared Tests. Semester 1. Chi-Squared Tests

Categorical Data Analysis. The data are often just counts of how many things each category has.

8.1-4 Test of Hypotheses Based on a Single Sample

MBA 605, Business Analytics Donald D. Conant, Ph.D. Master of Business Administration

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

STAT 135 Lab 6 Duality of Hypothesis Testing and Confidence Intervals, GLRT, Pearson χ 2 Tests and Q-Q plots. March 8, 2015

The Chi-Square Distributions

9.5 t test: one μ, σ unknown

Chi-Square Analyses Stat 251

10.2 Hypothesis Testing with Two-Way Tables

STT 843 Key to Homework 1 Spring 2018

Business Statistics. Lecture 10: Course Review

PSY 307 Statistics for the Behavioral Sciences. Chapter 20 Tests for Ranked Data, Choosing Statistical Tests

16.3 One-Way ANOVA: The Procedure

Testing Research and Statistical Hypotheses

Chapters 9 and 10. Review for Exam. Chapter 9. Correlation and Regression. Overview. Paired Data

Exam details. Final Review Session. Things to Review

Goodness of Fit Tests

χ L = χ R =

STAT 212 Business Statistics II 1

Chapter 9 Inferences from Two Samples

Statistical Inference: Estimation and Confidence Intervals Hypothesis Testing

Review of Statistics 101

EE290H F05. Spanos. Lecture 5: Comparison of Treatments and ANOVA

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

Statistics for Managers Using Microsoft Excel/SPSS Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests

determine whether or not this relationship is.

AMS7: WEEK 7. CLASS 1. More on Hypothesis Testing Monday May 11th, 2015

Basic Business Statistics, 10/e

Can you tell the relationship between students SAT scores and their college grades?

What is a Hypothesis?

Chi Square Analysis M&M Statistics. Name Period Date

Lecture 41 Sections Mon, Apr 7, 2008

Sociology 6Z03 Review II

Chapter 7. Inference for Distributions. Introduction to the Practice of STATISTICS SEVENTH. Moore / McCabe / Craig. Lecture Presentation Slides

Lecture Slides. Elementary Statistics. by Mario F. Triola. and the Triola Statistics Series

Contingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878

Lecture Slides. Section 13-1 Overview. Elementary Statistics Tenth Edition. Chapter 13 Nonparametric Statistics. by Mario F.

Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution

STATISTICS 141 Final Review

Chapter 24. Comparing Means

DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya

Statistical methods for comparing multiple groups. Lecture 7: ANOVA. ANOVA: Definition. ANOVA: Concepts

Difference between means - t-test /25

Two-Sample Inferential Statistics

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION AND HYPOTHESIS TESTING OF TWO POPULATIONS

Ling 289 Contingency Table Statistics

BMI 541/699 Lecture 22

Section 9.5. Testing the Difference Between Two Variances. Bluman, Chapter 9 1

Psych 230. Psychological Measurement and Statistics

Chi-square (χ 2 ) Tests

Hypothesis Testing hypothesis testing approach

1 Independent Practice: Hypothesis tests for one parameter:

Transcription:

The goodness-of-fit test Having discussed how to make comparisons between two proportions, we now consider comparisons of multiple proportions. A common problem of this type is concerned with determining whether the members of a population are distributed among more than two subcategories according to a hypothesized distribution of percentages. To gather evidence for this, we select a sample from the population and determine how many members of the sample fall into each of the subcategories, and test to see whether the data provide a good fit to the hypothesized distribution. This is why we call it a goodness-of-fit test. The data we collect to study this is a sample of individuals from our population. Each member of the sample falls into exactly one of multiple (more than two) possible categories with respect to a certain categorical variable; we then note the observed cell counts: how many individuals fall into each category. 1

As with our earlier hypothesis tests, there are important independence assumptions and sample size conditions that must be met in order for the test to be reliably carried out... Randomization Condition: the sample should be a SRS 10% Condition: the sample is not so large that it is more than 10% of the size of the population Expected Cell Frequency Condition: the sample is large enough so that each cell contains at least 5 individuals (an analogue of the Success/Failure condition for the situation with only two categories) Suppose that there are k different categories and that the hypothesized distribution of percentages is: p 1 for the first category, p 2 for the second category, etc. If we find the observed cell counts from the sample, we want to compare them against the expected cell counts determined from the null hypothesis H 0 : categories fit the distribution p 1, p 2,..., p k Of course, the alternative hypothesis is H A : categories don t fit the distribution p 1, p 2,..., p k 2

If the null hypothesis is true and our sample size is n, then the expected cell count for the first category should be Exp 1 = p 1 n, the expected cell count for the second category should be Exp 2 = p 2 n, and so on. The test statistic we use is called a chi-square statistic (denoted χ 2 ). It evaluates the discrepancy between the observed cell counts Obs 1, Obs 2,..., Obs k from the data and the expected counts Exp 1, Exp 2,..., Exp k that depend on the hypothesis that χ 2 = (Obs Exp) 2 Exp all cells The chi-square variable is a random variable that follows a special chi-square probability distribution, which, like the t distribution, depends on the number of degrees of freedom df = n 1. [TI-83: STAT DISTR χ 2 -cdf(low, high, df) ] 3

Goodness-of-fit test State hypotheses: Null hypothesis: H 0 : categories fit the distribution p 1, p 2,..., p k Alternative hypothesis: H A : categories don t fit the distribution p 1, p 2,..., p k (Note: There is only one option for H A!) Choose model: A SRS of size n satisfying the 10% Condition is selected and observed counts for each category are tallied (so that each cell count is 5), so a chi-square model applies with test statistic χ 2 = (Obs Exp) 2 and df = n 1 Exp all cells Mechanics: Compute the expected counts, χ 2, and the upper-tailed probability associated with H A : P = P (X 2 χ 2 H 0 ). Conclusion: Assess evidence to reject (or fail to reject) H 0 depending on how small P is. [TI-84: STAT TESTS χ 2 -GOFTest] 4

Test for homogeneity A common variant of the goodness-of-fit test looks to compare the distribution of percentages of certain categories across multiple populations to see whether there is evidence to claim a difference in the distributions of the categories among the populations. Here, the null hypothesis is an assumption of homogeneity among the populations: that is, we assume that the percentage distribution of the categories is the same for each population. The assumptions and necessary conditions for use of a test for homogeneity are identical with those for a goodnessof-fit test (Randomization Condition, 10% Condition, Expected Cell Frequency Condition), but now, since we need to count categories across multiple groups, we arrange the data in a contingency table with the categories arranged by row and the different groups by column. Each cell records an Obs count. If our null hypothesis that all the groups have the same distribution across categories is true, then we expect each Obs count in the table to be close to the expected count Exp = (row total) (column total). table total 5

We then use a chi-square statistic to assess how likely it is that the Obs data differs from their Exp values: χ 2 = (Obs Exp) 2 Exp all cells Here, however, we use a number of degrees of freedom equal to df = (R 1)(C 1), where the contingency table has R rows and C columns. The chi-square probability model now allows us to determine a P -value associated with the test. 6

Test for homogeneity State hypotheses: Null hypothesis: H 0 :C groups have equal distributions over R categories Alternative hypothesis: H A : groups have unequal distributions over categories Choose model: A SRS of size n satisfying the 10% Condition is selected and observed counts for each category are tallied (so that each cell count is 5), so a chi-square model applies with test statistic χ 2 = (Obs Exp) 2 and df = (R 1)(C 1) Exp all cells Mechanics: Compute the expected counts, χ 2, and the upper-tailed probability associated with H A : P = P (X 2 χ 2 H 0 ). Conclusion: Assess evidence to reject (or fail to reject) H 0 depending on how small P is. [TI-83: MATRX EDIT [A], STAT TESTS χ 2 -Test] 7

Chi-square residuals Whenever we decide to reject the null hypothesis, it is a good idea to examine the chi-square standardized residuals for each cell; these can often provide information about the underlying patterns of difference between categories in the case of a goodness-of-fit test, or of differences between groups in the case of a test for homogeneity. The residuals are the square roots of the components that sum to χ 2 ; in particular, if a cell has observed count Obs and expected count Exp, then its residual is Obs Exp c =. Exp Since these are standardized values, cells whose observed counts are much larger than expected will have large positive residuals and cells whose observed counts are much smaller than expected will have large negative residuals. 8

Test for independence We have used contingency tables to investigate the association between two categorical variables. We can use a chi-square model to develop a test for independence of two variables. We use the contingency table data to evaluate the hypothesis of independence between the row categorical variable and the column categorical variable. If this hypothesis is true, then we should observe no association between the variables, so that the Obs values in each cell should be close to the Exp values (as determined for a test for homogeneity): Exp = (row total) (column total). table total The same assumptions and conditions apply as for a test for homogeneity. 9

Test for independence of two categorical variables State hypotheses: Null hypothesis: H 0 :C the two categorical variables are independent Alternative hypothesis: H A : the two categorical variables are not independent Choose model: A SRS of size n satisfying the 10% Condition is selected and observed counts for each category are tallied (so that each cell count is 5), so a chi-square model applies with test statistic χ 2 = (Obs Exp) 2 and df = (R 1)(C 1) Exp all cells Mechanics: Compute the expected counts, χ 2, and the upper-tailed probability associated with H A : P = P (X 2 χ 2 H 0 ). Conclusion: Assess evidence to reject (or fail to reject) H 0 depending on how small P is. [TI-83: MATRX EDIT [A], STAT TESTS χ 2 -Test] 10

Deducing causation Dependence of one variable on another means that there is an association between them. It also suggests that there might be a causal link between them, but it does not prove that such a link must exist. So when you reject a null hypothesis that claims the independence of two categorical variables, that doesn t mean that there is a causal link between them. Examining the residuals can help to tease out any underlying patterns that exist. 11