8
Section 11.1 Notes - Complete Observed Counts Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed . The M&M website advertises that plain M&M colors SHOULD be distributed by the following percentages. Expected Rel. Freq. Expected Counts If you assume that the number of M&Ms in your bag does not change, how many of each color would you have EXPECTED to Gind, based on M&Ms claim? Please do not round too much...

If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Observed

Counts

Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed .

The M&M website advertises that plain M&M colors SHOULD be distributed by the following percentages.

Expected

Rel.Freq.

Expected

Counts

IfyouassumethatthenumberofM&Msinyourbagdoesnotchange,howmanyofeachcolorwouldyouhaveEXPECTEDtoGind,basedonM&Msclaim?Pleasedonotroundtoomuch...

Page 2: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Ultimatelywewouldliketodetermineifthedifferencesweseebetweentheobservedcountsofcolorsandtheexpectedcountsofcolors(assumingM&M'sclaimistrue)aresigniGicant.

Wecoulddothisbyrunning6differentone-proportionz-testsbut...

Performingone-proportionztestsforeachcolorwouldn’ttellushowlikelyitistogetarandomsampleofthesamenumbercandieswithacolordistributionthatdiffersasmuch(ormore)fromtheoneclaimedbythecompanyasthisbagdoes(takingallthecolorsintoconsiderationatonetime).

Forthat,weneedanewkindofsigniGicancetest,calledachi-squaregoodness-of-1ittest.

Theideaofthechi-squaregoodness-of-Gittestisthis:wecomparetheobservedcountsfromoursamplewiththecountsthatwouldbeexpectedifH0istrue.Themoretheobservedcountsdifferfromtheexpectedcounts,themoreevidencewehaveagainstthenullhypothesis.

Page 3: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Hypotheses:

Thenullhypothesisinachi-squaregoodness-of-Gittestshouldstateaclaimaboutthedistributionofasinglecategoricalvariableinthepopulationofinterest.Inourexample,theappropriatenullhypothesisis:

Thealternativehypothesisinachi-squaregoodness-of-GittestisthatthecategoricalvariabledoesnothavethespeciGieddistribution.Inourexample,thealternativehypothesisis

TestStatisticDe1inition:

Thechi-squarestatisticisameasureofhowfartheobservedcountsarefromtheexpectedcounts.Theformulaforthestatisticis

wherethesumisoverallpossiblevaluesofthecategoricalvariable.

Page 4: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Observed

Counts

Expected

Counts

Chi-Square

Contribution

CalculatetheX2statisticbycopyingyourobservedandexpectedcountshereanddeterminingtheX2contributionforeachvalueofthevariablecolor.

ThinkofX2asameasureofthedistanceoftheobservedcountsfromtheexpectedcounts.

LargevaluesofX2arestrongerevidenceagainstH0becausetheysaythattheobservedcountsarefarfromwhatwewouldexpectifH0weretrue.

SmallvaluesofX2suggestthatthedataareconsistentwiththenullhypothesis.

Page 5: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

P-ValueInordertocalculatethep-valueweneedtounderstandtheX2Distribution.

Thesamplingdistributionofthechi-squarestatisticisNOTaNormaldistribution.

Thechi-squaredistributionsareafamilyofdistributionsthattakeonlypositivevaluesandareskewedtotheright.Aparticularchi-squaredistributionisspeciGiedbygivingitsdegreesoffreedom.Thechi-squaregoodness-of-Gittestusesthechi-squaredistributionwithdegreesoffreedom=thenumberofcategories-1.

Findingthep-valueusingTableC:• Locatethecorrectrowusingthedegreesoffreedom

• ReadacrosstherowtoGindapairofX2valuesthatcreateanintervalthatcontainsYOURX2teststatistic

• Looktothetopoftheserowstoreadoftwotailprobabilities

• Yourp-valueliesbetweenthesetwoprobabilities.

Findyourp-valuefromtheM&MexampleusingTableC.

Page 6: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Findingthep-valueusingyourcalculator:• Gotothedistributionmenu• SelectX2cdf(thisshouldseemfamiliar...)• Lower:yourX2teststatistic• Upper:10^99• df:numberofcategories-1Findyourp-valuefromtheM&Mexampleusingyourcalculator.

Conditions

Random:datacamefromarandomsample,randomizedexperiment,orrandomphenomenon

LargeSampleSize:ThesamplesizemustbelargeenoughsothatALLEXPECTEDcountsaregreaterthanorequalto5.

Independent:Individualsshouldbeindependent.Ifsamplingwithoutreplacement,checkthe10%condition.

Page 7: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Thingstokeepinmind...1.Thechi-squareteststatisticcomparesobservedandexpectedcounts.Don’ttrytoperformcalculationswiththeobservedandexpectedproportionsineachcategory.

2.WhencheckingtheLargeSampleSizecondition,besuretoexaminetheexpectedcounts,nottheobservedcounts.

Arebirthsevenlydistributedacrossthedaysoftheweek?Theone-waytablebelowshowsthedistributionofbirthsacrossthedaysoftheweekinarandomsampleof140birthsfromlocalrecordsinalargecity.DothesedatagivesigniGicantevidencethatlocalbirthsarenotequallylikelyonalldaysoftheweek?

Page 8: If you assume that the number of M&Ms in your bag does not ... · Take your bag of M&Ms and the complete the table below showing the frequency of the colors and how they were distributed

Section 11.1 Notes - Complete

Section11.1Homework:p.692#s1,3,5,7,9,11,17