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

Similar documents
3. Nonparametric methods

Testing Independence

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

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

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

STAT 135 Lab 11 Tests for Categorical Data (Fisher s Exact test, χ 2 tests for Homogeneity and Independence) and Linear Regression

Lecture 28 Chi-Square Analysis

Department of Economics. Business Statistics. Chapter 12 Chi-square test of independence & Analysis of Variance ECON 509. Dr.

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

11-2 Multinomial Experiment

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

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

TA: Sheng Zhgang (Th 1:20) / 342 (W 1:20) / 343 (W 2:25) / 344 (W 12:05) Haoyang Fan (W 1:20) / 346 (Th 12:05) FINAL EXAM

Chapter 8 Student Lecture Notes 8-1. Department of Economics. Business Statistics. Chapter 12 Chi-square test of independence & Analysis of Variance

10.2: The Chi Square Test for Goodness of Fit

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

Hypothesis testing. Data to decisions

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

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

Ling 289 Contingency Table Statistics

Chapter 10: Chi-Square and F Distributions

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

Statistics for Managers Using Microsoft Excel

Lecture 41 Sections Mon, Apr 7, 2008

Lecture 14: Introduction to Poisson Regression

Modelling counts. Lecture 14: Introduction to Poisson Regression. Overview

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

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL - MAY 2005 EXAMINATIONS STA 248 H1S. Duration - 3 hours. Aids Allowed: Calculator

8.1-4 Test of Hypotheses Based on a Single Sample

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

Inferential Statistics

Frequency Distribution Cross-Tabulation

13.1 Categorical Data and the Multinomial Experiment

POLI 443 Applied Political Research

Non-parametric Hypothesis Testing

Psych 230. Psychological Measurement and Statistics

Class 24. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700

Chapter 11. Hypothesis Testing (II)

Lecture 45 Sections Wed, Nov 19, 2008

GROUPED DATA E.G. FOR SAMPLE OF RAW DATA (E.G. 4, 12, 7, 5, MEAN G x / n STANDARD DEVIATION MEDIAN AND QUARTILES STANDARD DEVIATION

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

HYPOTHESIS TESTING: THE CHI-SQUARE STATISTIC

4.1. Introduction: Comparing Means

Rama Nada. -Ensherah Mokheemer. 1 P a g e

Chapter 22. Comparing Two Proportions. Bin Zou STAT 141 University of Alberta Winter / 15

Goodness of Fit Tests

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

Math 58. Rumbos Fall More Review Problems Solutions

Difference between means - t-test /25

Unit 9: Inferences for Proportions and Count Data

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

TUTORIAL 8 SOLUTIONS #

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

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1)

Contingency Tables. Contingency tables are used when we want to looking at two (or more) factors. Each factor might have two more or levels.

Chapter Fifteen. Frequency Distribution, Cross-Tabulation, and Hypothesis Testing

CBA4 is live in practice mode this week exam mode from Saturday!

The t-test: A z-score for a sample mean tells us where in the distribution the particular mean lies

Unit 9: Inferences for Proportions and Count Data

CIVL /8904 T R A F F I C F L O W T H E O R Y L E C T U R E - 8

Basic Business Statistics, 10/e

10: Crosstabs & Independent Proportions

STAC51: Categorical data Analysis

15: CHI SQUARED TESTS

12.10 (STUDENT CD-ROM TOPIC) CHI-SQUARE GOODNESS- OF-FIT TESTS

Chi-square (χ 2 ) Tests

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

This is a multiple choice and short answer practice exam. It does not count towards your grade. You may use the tables in your book.

(x t. x t +1. TIME SERIES (Chapter 8 of Wilks)

Statistics 3858 : Contingency Tables

Chi-square (χ 2 ) Tests

MATH5745 Multivariate Methods Lecture 07

Unit 14: Nonparametric Statistical Methods

STATISTICS AND NUMERICAL METHODS QUESTION I APRIL / MAY 2010

Chapter 26: Comparing Counts (Chi Square)

Chi Square Analysis M&M Statistics. Name Period Date

Six Sigma Black Belt Study Guides

# of 6s # of times Test the null hypthesis that the dice are fair at α =.01 significance

STA102 Class Notes Chapter Logistic Regression

Analysis of Categorical Data Three-Way Contingency Table

Relax and good luck! STP 231 Example EXAM #2. Instructor: Ela Jackiewicz

Chapter 3. Comparing two populations

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

Chapter 8. The analysis of count data. This is page 236 Printer: Opaque this

Data Analysis: Agonistic Display in Betta splendens I. Betta splendens Research: Parametric or Non-parametric Data?

Chapter 8. Inferences Based on a Two Samples Confidence Intervals and Tests of Hypothesis

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

MAT 2379, Introduction to Biostatistics, Sample Calculator Questions 1. MAT 2379, Introduction to Biostatistics

Module 10: Analysis of Categorical Data Statistics (OA3102)

Modeling Overdispersion

4 Hypothesis testing. 4.1 Types of hypothesis and types of error 4 HYPOTHESIS TESTING 49

Section 4.6 Simple Linear Regression

Psych Jan. 5, 2005

SEVERAL μs AND MEDIANS: MORE ISSUES. Business Statistics

Agonistic Display in Betta splendens: Data Analysis I. Betta splendens Research: Parametric or Non-parametric Data?

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Section 6.2 Hypothesis Testing

Statistics Handbook. All statistical tables were computed by the author.

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

An Analysis of College Algebra Exam Scores December 14, James D Jones Math Section 01

Transcription:

2. Chi 2 -tests for equality of proportions Introduction: Two Samples Consider comparing the sample proportions p 1 and p 2 in independent random samples of size n 1 and n 2 out of two populations which have a certain characteristic with respective probabilities π 1 and π 2. We know from STAT.1030 that the relevant test statistic for equality of proportions is: z = p 1 p 2 ( ) N(0, 1) under H 0 : π 1 = π 2, 1 p(1 p) n 1 + 1 n 2 where p = n 1p 1 + n 2 p 2 n 1 + n 2 denotes the combined proportion of both samples. Recall that this z-statistic is based upon the normal approximation of the binomial distribution and requires therefore sufficiently large sample sizes (n 30). The same test may be equivalently formulated as a χ 2 independence test as follows. 6

Consider the contingency table below: success failure sum pop.1 n 1 p 1 n 1 (1 p 1 ) n 1 = f 1 pop.2 n 2 p 2 n 2 (1 p 2 ) n 2 = f 2 sum: np = f 1 n(1 p) = f 2 n Since p 1 and p 2 are unbiased estimators of their population counterparts π 1 and π 2, H 0 : π 1 = π 2 is equivalent to independence of the success and population variables. Applying the formula for two-way tables, χ 2 = n(f 11f 22 f 12 f 21 ) 2 f 1 f 2 f 1 f 2, yields after some manipulation: χ 2 = (p 1 p 2 ) 2 p(1 p) ( 1 n1 + 1 n 2 ) χ 2 (1) under H 0. It should not surprise us that this is just the square of our familiar z-statistic, since we know from STAT.1030 that the square of a N(0, 1)-distributed random variable is χ 2 (1)- distributed. 66

Example. Consider the following table about consumption of alcohol for men and women: Consumption: yes no female (pop.1) 68 34 male (pop.2) 86 26 As is evident from the output on the next slide, we may not reject H 0 : π 1 = π 2 against the two-sided alternative H 1 : π 1 π 2 (p = 0.0998), but we may reject H 0 against the one-sided alternative H 1 : π 2 > π 1 (p = 0.0499). Using Fishers exact test, the p-value of H 0 : π 1 = π 2 against the two-sided alternative H 1 : π 1 π 2 is p = 0.1274, leading to the same conclusion as above. But against the onesided alternative H 1 : π 2 > π 1 it is p = 0.0676, which means that we cannot even reject H 0 in a one-sided test at α = %. If we have access to software, we prefer using the output from Fishers exact test. It is however too hard to calculate by hand, and in larger tables even software might fail to calculate it. 67

General test for homogeneity of proportions The χ 2 -test for equality of proportions may be generalized to more than two independent samples as follows. Assemble the frequencies of success np i and failure n i (1 p i ) for the respective populations i in a (2 c) contingeny table, where n i and p i denote the size and proportion of success in population i, and c denotes the number of populations. The homogeneity of the populations (with respect to the success variable) H 0 : π 1 = π 2 = = π c versus H 1 : Not all π i, i = 1,..., c are equal is then assessed by a χ 2 independence test of the population and success variables. 69

Example. An insurance company wants to test whether the proportion of people who submit claims for automobile accidents is about the same for the three age groups 2 and under, over 2 and under 0, and 0 and over: H 0 : The age goups are homogeneous wrt. claims, H 1 : The age goups are not homogeneous wrt. claims. The (2 3) contingency table for this example is: age< 2 2 age< 0 0 age Total Claim 40 3 60 13 No claim 60 6 40 16 Total 100 100 100 300 The expected frequencies are: age< 2 2 age< 0 0 age Total Claim 4 4 4 13 No claim 16 Total 100 100 100 300 The χ 2 statistic is: χ 2 (40 4)2 (3 4)2 (60 4)2 = + + 4 4 4 (60 ) 2 (66 )2 (40 )2 + + = 14.14 and the degrees of freedom are (2-1)(3-1)=2. Looking up in a table or calling CHIDIST(14.14;2) in Excel establishes that the p-value in this case is less than 0.1%, so we reject homogeneity with respect to claims in favour of inhomogeneity at all conventional significance levels. 70

The median test The hypotheses for the median test are H 0 : The c populations have the same median, H 1 : Not all c populations have the same median. This is in fact a special case of the homogeneity test for independent samples which we just discussed, with the indicator: value median as the success variable. Median means here grand median, which is the median of all observations regardless of the population. Example: An economist wants to test the null hypothesis that the median family income in three rural areas are approximately equal. Random samples of family incomes (in $1000/year) in three regions (A/B/C) are given below: A 22 29 36 40 3 0 38 2 62 16 B 31 37 26 2 20 43 27 41 7 32 C 28 42 21 47 18 23 1 16 30 48 71

Example: (continued.) Arranging all observations in order reveals that the grand median is 31.. The observed and expected counts for each region are displayed below: Region A Region B Region C Total median 4 6 1 (expected) () () () >median 6 4 1 (expected) () () () Total 10 10 10 30 Note that here: e ij = f i f j n = n/2 n i n = n i 2. The χ 2 statistic is: χ 2 (4 )2 ( )2 (6 )2 = + + (6 ) 2 ( )2 (4 )2 + + = 0.8 and the degrees of freedom are (2-1)(3-1)=2. Comparing this value with critical points χ 2 α(2) of the χ 2 -distribution with 2 degrees of freedom, we conclude that there is no evidence to reject the null hypothesis. The p-value of the test is CHIDIST(0.8;2)=0.67. 72

The median test in Excel You find the median test under the name Moods Test in the Nonparametric Tests tool of the Real Statistics toolbox. 73