Top Banner
Chi- square Chi- square goodness of fit goodness of fit
19

Chi- square goodness of fit

Jan 20, 2016

Download

Documents

wylie

Chi- square goodness of fit. Is your die fair—1 more time. Roll your die 120 times. Write down the number of each roll. Example: 25 20 35 20 19 20 14 20 16 20 11 20. Observed Expected. Dice ---Requirements. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chi- square goodness of fit

Chi- square Chi- square goodness of fit goodness of fit

Page 2: Chi- square goodness of fit

Is your die fair—1 more Is your die fair—1 more time.time.

Roll your die 120 times. Write down the Roll your die 120 times. Write down the number of each roll.number of each roll.

Example:Example:25 2025 2035 2035 2019 2019 2014 2014 2016 2016 2011 2011 20

Observed

Expected

Page 3: Chi- square goodness of fit

Dice ---RequirementsDice ---Requirements

What are the requirements for the Chi-What are the requirements for the Chi-square test? EASIsquare test? EASI

E—eighty percent of the expected cells E—eighty percent of the expected cells are greater than 5. (not observed cells—are greater than 5. (not observed cells—expected cells!)expected cells!)

A andA and S—representative sample.S—representative sample. I—Independence.I—Independence.

Page 4: Chi- square goodness of fit

Run test!!Run test!! Note—Chi-square test is not normal.Note—Chi-square test is not normal. Must figure out the chi-square sum and Must figure out the chi-square sum and

degrees of freedom.degrees of freedom. Chi-square sum: (O-E)^2/E and then add Chi-square sum: (O-E)^2/E and then add

them all up. Look up on formula sheets.them all up. Look up on formula sheets. On calculator X^2 cdf(x^2, 10^99, df)---also On calculator X^2 cdf(x^2, 10^99, df)---also

use formula sheets.use formula sheets. Sum is 1.25 + 11.25 + .05 + 1.8 + .8 + 4.05Sum is 1.25 + 11.25 + .05 + 1.8 + .8 + 4.05 = 19.2= 19.2

Page 5: Chi- square goodness of fit

Run test!!Run test!! X^2cdf(19.2, 10^99,5) = .0018X^2cdf(19.2, 10^99,5) = .0018

Reject Ho @ alpha .01. There is evidence to Reject Ho @ alpha .01. There is evidence to suggest my die is not balanced.suggest my die is not balanced.

Page 6: Chi- square goodness of fit

What about Ho and Ha?What about Ho and Ha? There are no symbols for the chi-square. There are no symbols for the chi-square.

However, it is always one-sided, even However, it is always one-sided, even though the word though the word ““differentdifferent”” is used. is used.

Ho: The dice will roll as you would expect. Ho: The dice will roll as you would expect. (there is an implied = here)(there is an implied = here)

Ha: the die is different than you would Ha: the die is different than you would expect.expect.

Page 7: Chi- square goodness of fit

Demographics.Demographics. Rancho is approximately 52% Hispanic, 27% Rancho is approximately 52% Hispanic, 27%

Asian, 16% white and 5% other. Asian, 16% white and 5% other. Does Mr. PinesDoes Mr. Pines’’ AP stats classes reflect this AP stats classes reflect this

diversity? Run the appropriate test, verify diversity? Run the appropriate test, verify your requirements, and write a conclusion.your requirements, and write a conclusion.

Page 8: Chi- square goodness of fit

Baseball BatsBaseball Bats

There have been some major bat There have been some major bat changes for the 2011 season. Aluminum changes for the 2011 season. Aluminum baseball bats have been regulated so baseball bats have been regulated so that they meet certain safety standards. that they meet certain safety standards. After 5 games this season, coach Pines After 5 games this season, coach Pines has noticed significant reductions in has noticed significant reductions in power numbers such as 2Bpower numbers such as 2B’’s, 3Bs, 3B’’s, and s, and HRHR’’s…..Of course he would like to test s…..Of course he would like to test his hypothesis. his hypothesis.

Page 9: Chi- square goodness of fit

Baseball BatsBaseball Bats

Run a Chi-Squared two-way table test to Run a Chi-Squared two-way table test to see if there is an association between the see if there is an association between the power numbers and types of bats.power numbers and types of bats.

Also run a 2-Prop. Z Test between the Also run a 2-Prop. Z Test between the types of bats used.types of bats used.

If these are done correctly, ZIf these are done correctly, Z22 = X = X22

Page 10: Chi- square goodness of fit

HypothesesHypotheses

Ho: There is no association between type Ho: There is no association between type of bats and extra base hitsof bats and extra base hits

Ha: There is an association between type Ha: There is an association between type of bats and extra base hitsof bats and extra base hits

Page 11: Chi- square goodness of fit

Assumptions/ConditionsAssumptions/Conditions

E---All expected counts > 5E---All expected counts > 5

S----We have a random sample of 23 S----We have a random sample of 23 schools hitting stats for the first 5 games schools hitting stats for the first 5 games of the 2010 and 2011 baseball seasonsof the 2010 and 2011 baseball seasons

I----We can assume that all stats are I----We can assume that all stats are independent of other teams statsindependent of other teams stats

Page 12: Chi- square goodness of fit

Observed and Expected Observed and Expected CountsCounts

2010(BESR Bats) 2011(BBCOR Bats)

Singles 672 (695.26) 703 (679.74)

Extra Base Hits 313 (289.74) 260 (283.26)

Page 13: Chi- square goodness of fit

XX22 = 5.35 = 5.35

P-value = .0207P-value = .0207

This p-value is low enough to reject at This p-value is low enough to reject at the 5% level.the 5% level.

There is evidence to suggest that there There is evidence to suggest that there may be an association between the types may be an association between the types of bats and extra base hitsof bats and extra base hits

Page 14: Chi- square goodness of fit

GasolineGasoline

A large distributor of gasoline claims that A large distributor of gasoline claims that 60% of all cars stopping at their service 60% of all cars stopping at their service stations choose regular unleaded gas stations choose regular unleaded gas and that premium and supreme are each and that premium and supreme are each selected 20% of the time. To investigate selected 20% of the time. To investigate this claim, researchers collected data this claim, researchers collected data from a random sample of drivers who put from a random sample of drivers who put gas in their vehicles at the stations in a gas in their vehicles at the stations in a large city. Here are the results:large city. Here are the results:

Page 15: Chi- square goodness of fit

Gasoline Selected

Regular Premium Supreme

261 51 88

Carry out a significance test of the distributor’s claim. Use a 5% significance level

Page 16: Chi- square goodness of fit

Referrals vs Days of weekReferrals vs Days of week

Monday Tuesday Wednesday Thursday Friday

12 5 9 4 15

Are referrals related to the day of the week?

The table shows the number of students referred for disciplinary reasons to the principals office, broken down by day of the week.

Page 17: Chi- square goodness of fit

Testing M&M’sTesting M&M’s The Mars company has always claimed The Mars company has always claimed

that the color distribution of their M&M’s that the color distribution of their M&M’s follow a certain proportion as follows:follow a certain proportion as follows:

Brown Red Yellow Green Orange Blue

13% 13% 14% 16% 20% 24%

Check the M&M’s that were given to you and run a Chi-Square GOF test to see if their claim is accurate.

Do not eat your M&M’s until you have your observed and expected counts completed!

Page 18: Chi- square goodness of fit

HypothesesHypotheses

Ho: My bag of M&M’s follow the same Ho: My bag of M&M’s follow the same color distribution as the Mars company color distribution as the Mars company claim.claim.

Ha: My bag of M&M’s follows a different Ha: My bag of M&M’s follows a different color distribution as the Mars company color distribution as the Mars company claim. claim.

Page 19: Chi- square goodness of fit

Assumptions/ConditionsAssumptions/Conditions

___% of expected counts >5___% of expected counts >5

My bag of M&M’s can be considered an My bag of M&M’s can be considered an independent random sample of M&M’sindependent random sample of M&M’s