Testing hypothesis with two proportions and Chi-square testing.

Slides:



Advertisements
Similar presentations
CHI-SQUARE(X2) DISTRIBUTION
Advertisements

AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 25, Slide 1 Chapter 25 Comparing Counts.
Ch. 28 Chi-square test Used when the data are frequencies (counts) or proportions for 2 or more groups. Example 1.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
Crosstabs. When to Use Crosstabs as a Bivariate Data Analysis Technique For examining the relationship of two CATEGORIC variables  For example, do men.
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.
The Chi-Square Test Used when both outcome and exposure variables are binary (dichotomous) or even multichotomous Allows the researcher to calculate a.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics S eventh Edition By Brase and Brase Prepared by: Lynn Smith.
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics, A First Course 4 th Edition.
Goodness-of-Fit Tests and Categorical Data Analysis
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 26 Comparing Counts.
Chapter 26: Comparing Counts AP Statistics. Comparing Counts In this chapter, we will be performing hypothesis tests on categorical data In previous chapters,
For testing significance of patterns in qualitative data Test statistic is based on counts that represent the number of items that fall in each category.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
CHAPTER 11 SECTION 2 Inference for Relationships.
Slide 26-1 Copyright © 2004 Pearson Education, Inc.
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
+ Chi Square Test Homogeneity or Independence( Association)
Data Analysis for Two-Way Tables. The Basics Two-way table of counts Organizes data about 2 categorical variables Row variables run across the table Column.
Essential Statistics Chapter 161 Review Part III_A_Chi Z-procedure Vs t-procedure.
CHI SQUARE TESTS.
HYPOTHESIS TESTING BETWEEN TWO OR MORE CATEGORICAL VARIABLES The Chi-Square Distribution and Test for Independence.
Chi-Square Test James A. Pershing, Ph.D. Indiana University.
Business Statistics: A First Course, 5e © 2009 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics: A First Course Fifth Edition.
Copyright © 2010 Pearson Education, Inc. Slide
Inference for Distributions of Categorical Variables (C26 BVD)
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
Chapter 13 Inference for Counts: Chi-Square Tests © 2011 Pearson Education, Inc. 1 Business Statistics: A First Course.
Chapter Outline Goodness of Fit test Test of Independence.
AGENDA:. AP STAT Ch. 14.: X 2 Tests Goodness of Fit Homogeniety Independence EQ: What are expected values and how are they used to calculate Chi-Square?
Copyright © 2010 Pearson Education, Inc. Warm Up- Good Morning! If all the values of a data set are the same, all of the following must equal zero except.
1 Hypothesis Testing Goodness-of-fit & Independence Chi-Squared Tests.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Chapter 14 Chi-Square Tests.  Hypothesis testing procedures for nominal variables (whose values are categories)  Focus on the number of people in different.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Lesson 12 - R Chapter 12 Review. Objectives Summarize the chapter Define the vocabulary used Complete all objectives Successfully answer any of the review.
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.
Comparing Counts Chapter 26. Goodness-of-Fit A test of whether the distribution of counts in one categorical variable matches the distribution predicted.
Statistics 300: Elementary Statistics Section 11-3.
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.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
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.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.
Comparing Counts Chi Square Tests Independence.
Chi-Square hypothesis testing
Chapter 11 Chi-Square Tests.
Chi-squared Distribution
Community &family medicine
Data Analysis for Two-Way Tables
Testing for Independence
Day 67 Agenda: Submit THQ #6 Answers.
Chapter 10 Analyzing the Association Between Categorical Variables
Contingency Tables: Independence and Homogeneity
Chapter 11 Chi-Square Tests.
Analyzing the Association Between Categorical Variables
Chi-Square Hypothesis Testing PART 3:
Inference for Two Way Tables
SENIORS: Final transcript request must be made by Friday.
Chapter 11 Chi-Square Tests.
Quadrat sampling & the Chi-squared test
Quadrat sampling & the Chi-squared test
Chi Square Test of Homogeneity
Presentation transcript:

Testing hypothesis with two proportions and Chi-square testing

Hypothesis testing for homogeneity of proportions  We wish to compare the effects of two different insecticides. The first insectide, InsectsRUs, was applied to 300 insects and 50 of them died. The second insecticide, InsectsBGone, was applied to 350 insects and 90 died. Test to see if there is a significant difference in the proportion of insects killed.  Hypothesis of interest H 0 : p 1 = p 2 versus H A : p 1  p 2 Test statistic: Where

Calculations  InsectsRUs  InsectsBGone p-value=

Contingency Table  Can also view this as a contingency table Type of Insecticide InsectsRUsInsectsBGone Killed5090 Not killed TOTAL

Chi-square  Chi-square testing can be used to test if the distribution is the same in each group (i.e. insecticides)  Need to find Expected values

Expected Values for Chi Square  Expected value = (row total)*(column total)/N Insects RUs InsectsB GoneTOTAL Killed Not Killed TOTAL Column Totals Row Totals N

InsectsRUsInsectsBGoneTOTAL Killed Not Killed TOTAL InsectsRUsInsectsBGoneTOTAL Killed=140*300/650=140*350/ Not Killed=510*300/650=350*510/ TOTAL Calculating Expected Values

Calculated expected values InsectsRUsInsectsBGoneTOTAL Killed Not Killed TOTAL Now calculate the Chi –square statistic = , degrees of freedom = 1 p-value =

Comments on the Chi-square Test  The test of H0: no association versus HA: there is an association between two categorical variables is computationally the same as testing if the conditional distributions are the same (this can be extended to more than two populations).  The degrees of freedom for a chi-square test is (r- 1)*(c-1), where r = # rows and c=# columns.  Be cautious when expected frequencies are lower than 5.  The chi-square test can also be used to test for goodness-of-fit.

Goodness of fit  Test to see if percent of longleaf pine is evenly distributed across the four quadrants (example from Moore, McCabe, and Craig). Quad1Quad2Quad3Quad4 Count There are a total of 100 trees, so we would expect ¼ of 100 to be in each quadrant (where expected value =0.25*100=25). =10.8, degrees of freedom=3 P-value=