Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
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...
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.
Section 11.1 Notes - Complete
Hypotheses:
Thenullhypothesisinachi-squaregoodness-of-Gittestshouldstateaclaimaboutthedistributionofasinglecategoricalvariableinthepopulationofinterest.Inourexample,theappropriatenullhypothesisis:
Thealternativehypothesisinachi-squaregoodness-of-GittestisthatthecategoricalvariabledoesnothavethespeciGieddistribution.Inourexample,thealternativehypothesisis
TestStatisticDe1inition:
Thechi-squarestatisticisameasureofhowfartheobservedcountsarefromtheexpectedcounts.Theformulaforthestatisticis
wherethesumisoverallpossiblevaluesofthecategoricalvariable.
Section 11.1 Notes - Complete
Observed
Counts
Expected
Counts
Chi-Square
Contribution
CalculatetheX2statisticbycopyingyourobservedandexpectedcountshereanddeterminingtheX2contributionforeachvalueofthevariablecolor.
ThinkofX2asameasureofthedistanceoftheobservedcountsfromtheexpectedcounts.
LargevaluesofX2arestrongerevidenceagainstH0becausetheysaythattheobservedcountsarefarfromwhatwewouldexpectifH0weretrue.
SmallvaluesofX2suggestthatthedataareconsistentwiththenullhypothesis.
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.
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.
Section 11.1 Notes - Complete
Thingstokeepinmind...1.Thechi-squareteststatisticcomparesobservedandexpectedcounts.Don’ttrytoperformcalculationswiththeobservedandexpectedproportionsineachcategory.
2.WhencheckingtheLargeSampleSizecondition,besuretoexaminetheexpectedcounts,nottheobservedcounts.
Arebirthsevenlydistributedacrossthedaysoftheweek?Theone-waytablebelowshowsthedistributionofbirthsacrossthedaysoftheweekinarandomsampleof140birthsfromlocalrecordsinalargecity.DothesedatagivesigniGicantevidencethatlocalbirthsarenotequallylikelyonalldaysoftheweek?
Section 11.1 Notes - Complete
Section11.1Homework:p.692#s1,3,5,7,9,11,17