M&Ms Two-way Tables Ellen Gundlach STAT 301 Course Coordinator Purdue University.

Slides:



Advertisements
Similar presentations
Chapter 11 Other Chi-Squared Tests
Advertisements

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;
A frequency distribution for two variables
By Josh Spiezle, Emy Chinen, Emily Lopez, Reid Beloff.
In this chapter we introduce the idea of hypothesis testing in general, and then we look at the specifics for a hypothesis test for a single population.
Chi-Square Test A fundamental problem is genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
PSY 340 Statistics for the Social Sciences Chi-Squared Test of Independence Statistics for the Social Sciences Psychology 340 Spring 2010.
1 SOC 3811 Basic Social Statistics. 2 Announcements  Assignment 2 Revisions (interpretation of measures of central tendency and dispersion) — due next.
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
Math 1040 Intro To Statistics Professor: Zeph Allen Smith Presented by: Nellie Sobhanian.
1 Confidence Interval for Population Mean The case when the population standard deviation is unknown (the more common case).
Significance Tests for Proportions Presentation 9.2.
Chi-square Goodness of Fit Test
Copyright © Cengage Learning. All rights reserved. 11 Applications of Chi-Square.
To date, we have focused on qualitatively describing possible sources of error in our experiments. When you can quantitatively prove your hypothesis, (such.
13.1 Goodness of Fit Test AP Statistics. Chi-Square Distributions The chi-square distributions are a family of distributions that take on only positive.
Section 10.1 Goodness of Fit. Section 10.1 Objectives Use the chi-square distribution to test whether a frequency distribution fits a claimed distribution.
Chapter 11 Inference for Tables: Chi-Square Procedures 11.1 Target Goal:I can compute expected counts, conditional distributions, and contributions to.
Test of Homogeneity Lecture 45 Section 14.4 Wed, Apr 19, 2006.
Chi square analysis Just when you thought statistics was over!!
Copyright © 2010 Pearson Education, Inc. Slide
Fruit Fly Basics Drosophila melanogaster. Wild Type Phenotype Red eyes Tan Body Black Rings on abdomen Normal Wings.
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?
M&MS AND THE SCIENTIFIC METHOD MINI-LAB Ms. Jho AnnLife Science Room #103.
By.  Are the proportions of colors of each M&M stated by the M&M company true proportions?
Chi-Square Test (χ 2 ) χ – greek symbol “chi”. Chi-Square Test (χ 2 ) When is the Chi-Square Test used? The chi-square test is used to determine whether.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
11.1 Chi-Square Tests for Goodness of Fit Objectives SWBAT: STATE appropriate hypotheses and COMPUTE expected counts for a chi- square test for goodness.
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 &
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.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Comparing Counts Chi Square Tests Independence.
11.1 Chi-Square Tests for Goodness of Fit
Ch 26 – Comparing Counts Day 1 - The Chi-Square Distribution
Chi-Square Test A fundamental problem is genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
Warm-up Researchers want to cross two yellow-green tobacco plants with genetic makeup (Gg). See the Punnett square below. When the researchers perform.
Section 10-1 – Goodness of Fit
Inferential Statistics
Chi-Square Goodness of Fit
Elementary Statistics: Picturing The World
Chi-Square Test.
The Analysis of Categorical Data and Chi-Square Procedures
Day 67 Agenda: Submit THQ #6 Answers.
Chi-Square Test.
Chi-Square - Goodness of Fit
Is a persons’ size related to if they were bullied
Reasoning in Psychology Using Statistics
Goodness of Fit Test - Chi-Squared Distribution
Contingency Tables and Association
The Scientific Method:
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Inference on Categorical Data
The Analysis of Categorical Data and Goodness of Fit Tests
Chi-Square Test.
Day 66 Agenda: Quiz Ch 12 & minutes.
Hypothesis Tests for a Standard Deviation
“There are three types of lies. Lies, damn lies, and Statistics”
The Analysis of Categorical Data and Goodness of Fit Tests
Chi-square = 2.85 Chi-square crit = 5.99 Achievement is unrelated to whether or not a child attended preschool.
The Analysis of Categorical Data and Goodness of Fit Tests
HIMS 650 Homework set 5 Putting it all together
Inference for Two Way Tables
The Analysis of Categorical Data and Goodness of Fit Tests
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
SENIORS: Final transcript request must be made by Friday.
Chapter 26 Part 2 Comparing Counts.
Chapter 14.1 Goodness of Fit Test.
Chi Square Test of Homogeneity
Presentation transcript:

M&Ms Two-way Tables Ellen Gundlach STAT 301 Course Coordinator Purdue University

M&Ms Color Distribution % according to their website BrownYellowRedBlueOrangeGreen Plain Peanut Peanut Butter/ Almond

Skittles Color Distribution % according to their hotline RedOrangeYellowGreenPurple Skittles20

My M&Ms data in counts BrownYellowRedBlueOrangeGreenTotal Plain Peanut Total

My M&Ms data: joint % (divide counts by total = 76) BrownYellowRedBlueOrangeGreen Plain Peanut

My M&Ms data: marginal %s for color (add down the columns) BrownYellowRedBlueOrangeGreenTotal Plain Peanut Marg. for color

My M&Ms data: marginal %s for flavor (add across the rows) BrownYellowRedBlueOrangeGreenMarg. for flavor Plain Peanut Total 100

My M&Ms data: joint and marginal %s BrownYellowRedBlueOrangeGreenMarg. for flavor Plain Peanut Marg. for color

Conditional distribution of flavor for color We know the color of our M&M already, but now how is flavor distributed for this color?

Conditional distribution example We know we have a red M&M, so what is the probability it is a plain M&M?

Conditional distribution of color for flavor We know the flavor of our M&M already, but now how is color distributed for this color?

Conditional distribution example We know we have a peanut M&M, so what is the probability it is green?

Conditional distributions in general Conditional distribution of X for Y (we know Y for sure already, but we want to know the probability or % of having X be true as well):

Bar graphs for conditional distribution of color for both flavors

Chi-squared hypothesis test H 0 : There is no association between color distribution and flavor for M&Ms. H a : There is association between color distribution and flavor for M&Ms. Use an  = 0.01 for this story.

Full-class M&Ms data in counts (large sample size necessary for test) BrownYellowRedBlueOrangeGreen Plain Peanut

Chi-squared test SPSS results

Chi-squared test conclusions Test statistic = and P-value = Since P-value is > our  of 0.01, we do not reject H 0. We do not have enough evidence to say there is association between color distribution and flavor for M&Ms.

Skittles vs. M&Ms Now we will compare the proportion of yellow candies for Skittles and for M&Ms. The previous two-way table with plain and peanut M&Ms was of size 2 x 6. This table will be of size 2x2 because we only care about whether a candy is yellow or non-yellow.

Full-class M&Ms and Skittles data in counts (large sample size necessary for test) YellowNon- Yellow Total Plain M&Ms Skittles Total

Chi-squared hypothesis test H 0 : There is no association between color distribution and flavor for these candies. H a : There is association between color distribution and flavor for these candies. Use an  = 0.01 for this story.

Chi-squared test SPSS results

Chi-squared test conclusions Test statistic = and P-value = Since P-value is < our  of 0.01, we reject H 0. We have evidence that there is association between color distribution and flavor for these candies.

Another way to do this test Since this is a 2x2 table, and if we are only interested in a 2-sided (  ) hypothesis test, we can use the 2-sample proportions test here.

2-sample proportion test hypotheses H 0 : p M&Ms = p Skittles H a : p M&Ms  p Skittles

Defining the proportions

Test statistic

Results from the proportion test Sample proportions: Test statistic Z = P-value = 2(0.0003) = Since P-value < our  of 0.01, we reject H 0.

Conclusion to the proportion test We have evidence the proportion of yellow M&Ms is not the same as the proportion of yellow Skittles. In other words, the type of candy makes a difference to the color distribution.

How do our results from the 2 tests compare? The X 2 test statistic = , which is actually the (Z test statistic = -3.44) 2. If you take into account the rounding, the P- values for both tests are  We rejected H 0 in both tests.

When do you use which test? Chi-squared tests are best for: two-sided hypothesis tests only 2x2 or bigger tables Proportion (Z) tests are best for: one- or two-sided hypothesis tests only 2x2 tables