Chapter11
TheChi-SquareDistribution
11.1TheChi-SquareDistribution
1
11.1.1StudentLearningOutcomes
Bytheendofthischapter,thestudentshouldbeableto:
 Interpretthechi-squareprobabilitydistributionasthesamplesizechanges.
 Conductandinterpretchi-squaregoodness-of-fithypothesistests.
 Conductandinterpretchi-squaretestofindependencehypothesistests.
 Conductandinterpretchi-squarehomogeneityhypothesistests.
 Conductandinterpretchi-squaresinglevariancehypothesistests.
11.1.2Introduction
Haveyoueverwonderediflotterynumberswereevenlydistributedorifsomenumbersoccurredwitha
greaterfrequency? Howaboutifthetypesofmoviespeoplepreferredweredifferentacrossdifferentage
groups? Whataboutifacoffeemachinewasdispensingapproximatelythesameamountofcoffeeeach
time?Youcouldanswerthesequestionsbyconductingahypothesistest.
Youwillnowstudyanewdistribution,onethatisusedtodeterminetheanswerstotheaboveexamples.
ThisdistributioniscalledtheChi-squaredistribution.
Inthischapter,youwilllearnthethreemajorapplicationsoftheChi-squaredistribution:
 Thegoodness-of-fittest,whichdeterminesifdatafitaparticulardistribution,suchaswiththelottery
example
 Thetestofindependence,whichdeterminesifeventsareindependent,suchaswiththemovieexam-
ple
 Thetestofasinglevariance,whichtestsvariability,suchaswiththecoffeeexample
NOTE
: ThoughtheChi-squarecalculationsdependoncalculatorsorcomputersformostofthe
calculations, thereisatableavailable(seetheTableofContents15. Tables). . TI-83+andTI-84
calculatorinstructionsareincludedinthetext.
1Thiscontentisavailableonlineat<http://cnx.org/content/m17048/1.9/>.
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
471
Adding pdf to powerpoint slide - C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF in C#.net, ASP.NET MVC, WinForms, WPF
Online C# Tutorial for Creating PDF from Microsoft PowerPoint Presentation
changing pdf to powerpoint; how to change pdf to ppt on
Adding pdf to powerpoint slide - VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to PDF in vb.net, ASP.NET MVC, WinForms, WPF
VB.NET Tutorial for Export PDF file from Microsoft Office PowerPoint
convert pdf to ppt online without email; how to convert pdf into powerpoint on
472
CHAPTER11. THECHI-SQUAREDISTRIBUTION
11.1.3OptionalCollaborativeClassroomActivity
LookinthesportssectionofanewspaperorontheInternetforsomesportsdata(baseballaverages,bas-
ketballscores,golftournamentscores,footballodds,swimmingtimes,etc.).Plotahistogramandaboxplot
usingyourdata.Seeifyoucandetermineaprobabilitydistributionthatyourdatafits.Haveadiscussion
withtheclassaboutyourchoice.
11.2Notation
2
Thenotationforthechi-squaredistributionis:
c
2
c
2
df
wheredf=degreesoffreedomdependonhowchi-squareisbeingused.(Ifyouwanttopracticecalculat-
ingchi-squareprobabilitiesthenusedf =1.Thedegreesoffreedomforthethreemajorusesareeach
calculateddifferently.)
Forthe c
2
distribution, the populationmeanisdf andthepopulationstandarddeviationis=
p
2df.
Therandomvariableisshownasc
2
butmaybeanyuppercaseletter.
Therandomvariableforachi-squaredistributionwithkdegreesoffreedomisthesumofindependent,
squaredstandardnormalvariables.
c
2
=(Z
1
)
2
+(Z
2
)
2
+...+(Z
k
)
2
11.3FactsAbouttheChi-SquareDistribution
3
1. Thecurveisnonsymmetricalandskewedtotheright.
2. Thereisadifferentchi-squarecurveforeachdf.
2
Thiscontentisavailableonlineat<http://cnx.org/content/m17052/1.6/>.
3Thiscontentisavailableonlineat<http://cnx.org/content/m17045/1.6/>.
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
VB.NET PowerPoint: Add Image to PowerPoint Document Slide/Page
insert or delete any certain PowerPoint slide without affecting on C#.NET PPT image adding library. powerful & profession imaging controls, PDF document, tiff
how to convert pdf slides to powerpoint presentation; convert pdf to powerpoint slides
VB.NET PowerPoint: Edit PowerPoint Slide; Insert, Add or Delete
To view C# code for adding, inserting or To view more VB.NET PowerPoint slide processing functions powerful & profession imaging controls, PDF document, image
convert pdf to ppt online; converting pdf to powerpoint online
473
(a)
(b)
Figure11.1
3. Theteststatisticforanytestisalwaysgreaterthanorequaltozero.
4. Whendf>90,thechi-squarecurveapproximatesthenormal.ForXc2
1000
themean,m=df =1000
andthestandarddeviation,s=
p
21000=44.7.Therefore,XN(1000,44.7),approximately.
5. Themean,m,islocatedjusttotherightofthepeak.
Figure11.2
Inthenextsections,youwilllearnaboutfourdifferentapplicationsoftheChi-SquareDistribution. These
hypothesistestsarealmostalwaysright-tailedtests.Inordertounderstandwhythetestsaremostlyright-
tailed,youwillneedtolookcarefullyattheactualdefinitionoftheteststatistic.Thinkaboutthefollowing
whileyoustudythenextfoursections. Iftheexpectedandobservedvaluesare"far"apart,thenthetest
statisticwillbe"large"andwewillrejectintherighttail.Theonlywaytoobtainateststatisticverycloseto
zero,wouldbeiftheobservedandexpectedvaluesarevery,veryclosetoeachother.Aleft-tailedtestcould
beusedtodetermineifthefitwere"toogood."A"toogood"fitmightoccurifdatahadbeenmanipulated
orinvented.Thinkabouttheimplicationsofright-tailedversusleft-tailedhypothesistestsasyoulearnthe
applicationsoftheChi-SquareDistribution.
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
VB.NET PowerPoint: VB Code to Draw and Create Annotation on PPT
PDF, TIFF, MS Word and Excel). Most of end users would like to install and use Microsoft PowerPoint software and create PPT slide annotation through adding a
convert pdf into powerpoint; how to convert pdf into powerpoint presentation
C# PowerPoint - How to Process PowerPoint
Use the provided easy to call and write APIs programmed in C# class to develop user-defined PowerPoint slide adding and inserting projects.
convert pdf to powerpoint online for; pdf to ppt converter online for large
474
CHAPTER11. THECHI-SQUAREDISTRIBUTION
11.4Goodness-of-FitTest
4
Inthistypeofhypothesistest,youdeterminewhetherthedata"fit"aparticulardistributionornot. For
example,youmaysuspectyourunknowndatafitabinomialdistribution.Youuseachi-squaretest(mean-
ingthedistributionforthe hypothesistestischi-square)todetermineifthereisafit ornot. Thenull
andthealternatehypothesesforthistestmaybewritteninsentencesormaybestatedasequationsor
inequalities.
Theteststatisticforagoodness-of-fittestis:
S
k
(O E)
2
E
(11.1)
where:
 O=observedvalues(data)
 E=expectedvalues(fromtheory)
 k=thenumberofdifferentdatacellsorcategories
Theobservedvaluesarethedatavaluesandtheexpectedvaluesarethevaluesyouwouldexpecttoget
ifthenullhypothesisweretrue.Therearentermsoftheform
(O E)
2
E
.
Thedegreesoffreedomaredf=(numberofcategories-1).
Thegoodness-of-fittestisalmostalwaysrighttailed. Iftheobservedvaluesandthecorrespondingex-
pectedvaluesarenotclosetoeachother,thentheteststatisticcangetverylargeandwillbewayoutinthe
righttailofthechi-squarecurve.
NOTE
:Theexpectedvalueforeachcellneedstobeatleast5inordertousethistest.
Example11.1
Absenteeismofcollegestudentsfrommathclassesisamajorconcerntomathinstructorsbecause
missingclassappearstoincreasethedroprate.Supposethatastudywasdonetodetermineifthe
actualstudentabsenteeismfollowsfacultyperception. Thefacultyexpectedthatagroupof100
studentswouldmissclassaccordingtothefollowingchart.
Numberabsencesperterm
Expectednumberofstudents
0-2
50
3-5
30
6-8
12
9-11
6
12+
2
Table11.1
Arandomsurveyacrossallmathematicscourseswasthendonetodeterminetheactualnumber
(observed)ofabsencesinacourse.Thenextchartdisplaystheresultofthatsurvey.
4
Thiscontentisavailableonlineat<http://cnx.org/content/m17192/1.8/>.
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
VB.NET PowerPoint: VB Codes to Create Linear and 2D Barcodes on
PowerPoint PDF 417 barcode library is a mature and This PowerPoint ISSN barcode adding control is compatible ITF-14 barcode on any PowerPoint document slide
how to add pdf to powerpoint slide; convert pdf to powerpoint online no email
VB.NET PowerPoint: Read, Edit and Process PPTX File
SDK into VB.NET class application by adding several compact well, like reading Excel in VB.NET, Reading PDF in VB Independent from Microsoft PowerPoint Product.
convert pdf to powerpoint slide; convert pdf into ppt online
475
Numberabsencesperterm
Actualnumberofstudents
0-2
35
3-5
40
6-8
20
9-11
1
12+
4
Table11.2
Determinethenullandalternatehypothesesneededtoconductagoodness-of-fittest.
H
o
:Studentabsenteeismfitsfacultyperception.
Thealternatehypothesisistheoppositeofthenullhypothesis.
H
a
:Studentabsenteeismdoesnotfitfacultyperception.
Problem1
Canyouusetheinformationasitappearsinthechartstoconductthegoodness-of-fittest?
Solution
No. Notice that the expected number ofabsencesfor the "12+" entryislessthan5(it is2).
Combinethatgroupwiththe"9-11"grouptocreatenewtableswherethenumberofstudentsfor
eachentryareatleast5.Thenewtablesarebelow.
Numberabsencesperterm
Expectednumberofstudents
0-2
50
3-5
30
6-8
12
9+
8
Table11.3
Numberabsencesperterm
Actualnumberofstudents
0-2
35
3-5
40
6-8
20
9+
5
Table11.4
Problem2
Whatarethedegreesoffreedom(df)?
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
C# PowerPoint: C# Guide to Add, Insert and Delete PPT Slide(s)
offer this C#.NET PowerPoint slide adding, inserting and guide for each PowerPoint slide processing operation & profession imaging controls, PDF document, tiff
convert pdf slides to powerpoint; pdf to powerpoint converter online
VB.NET PowerPoint: Sort and Reorder PowerPoint Slides by Using VB.
easily VB.NET PPT image adding and inserting clip art or screenshot to PowerPoint document slide at powerful & profession imaging controls, PDF document, image
online pdf converter to powerpoint; convert pdf pages to powerpoint slides
476
CHAPTER11. THECHI-SQUAREDISTRIBUTION
Solution
Thereare4"cells"orcategoriesineachofthenewtables.
df numberof f cells 3
Example11.2
Employersparticularlywant to knowwhichdaysofthe weekemployeesareabsent inafive
dayworkweek. Mostemployerswouldliketobelievethatemployeesareabsentequallydur-
ingtheweek. Supposearandomsampleof60managerswereaskedonwhichdayoftheweek
didtheyhavethe highestnumber ofemployeeabsences. . Theresultswere e distributedasfol-
lows:
DayoftheWeekEmployeesweremostAbsent
Monday
Tuesday
Wednesday
Thursday
Friday
NumberofAbsences
15
12
9
9
15
Table11.5
Problem
Forthepopulationofemployees,dothedaysforthehighestnumberofabsencesoccurwithequal
frequenciesduringafivedayworkweek?Testata5%significancelevel.
Solution
Thenullandalternatehypothesesare:
 H
o
:Theabsentdaysoccurwithequalfrequencies,thatis,theyfitauniformdistribution.
 H
a
:Theabsentdaysoccurwithunequalfrequencies,thatis,theydonotfitauniformdistri-
bution.
Iftheabsentdaysoccurwithequalfrequencies,then,outof60absentdays(thetotalinthesample:
15+12+9+9+15=60),therewouldbe12absencesonMonday,12onTuesday,12onWednesday,
12onThursday,and12onFriday. Thesenumbersaretheexpected(E)values. Thevaluesinthe
tablearetheobserved(O)valuesordata.
Thistime,calculatethec
2
teststatisticbyhand.Makeachartwiththefollowingheadingsandfill
inthecolumns:
 Expected(E)values(12,12,12,12,12)
 Observed(O)values(15,12,9,9,15)
 ( E)
(O
E
)
2
(O E)
2
E
Thelastcolumn(
(O E)
2
E
)shouldhave0.75,0,0.75,0.75,0.75.
Nowadd(sum)thelastcolumn.Verifythatthesumis3.Thisisthec2teststatistic.
Tofindthep-value,calculateP
c
2
>3
.Thistestisright-tailed.
(Useacomputerorcalculatortofindthep-value.Youshouldgetp-value=0.5578.)
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
VB.NET PowerPoint: Extract & Collect PPT Slide(s) Using VB Sample
functions, like VB.NET PPT slide adding/removing, PPT read this VB.NET PowerPoint slide processing tutorial & profession imaging controls, PDF document, image
add pdf to powerpoint presentation; converting pdf to ppt
VB.NET PowerPoint: PPTX to SVG Conversion; Render PPT to Vector
into VB.NET project by adding project reference PowerPoint files that end with .pptx file suffix can powerful & profession imaging controls, PDF document, tiff
convert pdf pages into powerpoint slides; image from pdf to powerpoint
477
Thedfsarethenumberofcells 1=5 1=4.
TI-83+ andTI-84: Press
. Arrowdownto c
2
. Press
. Enter
.
Roundedto4decimalplaces,youshouldsee0.5578whichisthep-value.
Next,completeagraphliketheonebelowwiththeproperlabelingandshading. (Youshould
shadetherighttail.)
Thedecisionistonotrejectthenullhypothesis.
Conclusion:Ata5%levelofsignificance,fromthesampledata,thereisnotsufficientevidenceto
concludethattheabsentdaysdonotoccurwithequalfrequencies.
NOTE
:TI-83+andsomeTI-84calculatorsdonothaveaspecialprogramfortheteststatisticforthe
goodness-of-fittest. Thenextexample(Example11-3)hasthecalculatorinstructions. Thenewer
TI-84calculatorshavein
thetest
.Torunthetest,puttheobservedvalues
(thedata)intoafirstlistandtheexpectedvalues(thevaluesyouexpectifthenullhypothesisis
true)intoasecondlist.Press
and
.EnterthelistnamesfortheObservedlist
andtheExpectedlist.Enterthedegreesoffreedomandpress
or
.Makesureyou
clearanylistsbeforeyoustart.Seebelow.
NOTE
:ToClearListsinthecalculators:Gointo
andarrowuptothelistnameareaof
theparticularlist. Press
andthenarrowdown. Thelistwillbecleared. Or,youcanpress
andpress4(for
).Enterthelistnameandpress
.
Example11.3
OnestudyindicatesthatthenumberoftelevisionsthatAmericanfamilieshaveisdistributed(this
isthegivendistributionfortheAmericanpopulation)asfollows:
NumberofTelevisions
Percent
0
10
1
16
2
55
3
11
over3
8
Table11.6
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
478
CHAPTER11. THECHI-SQUAREDISTRIBUTION
Thetablecontainsexpected(E)percents.
Arandomsampleof600familiesinthefarwesternUnitedStatesresultedinthefollowingdata:
NumberofTelevisions
Frequency
0
66
1
119
2
340
3
60
over3
15
Total=600
Table11.7
Thetablecontainsobserved(O)frequencyvalues.
Problem
Atthe1%significancelevel, doesitappearthatthedistribution"numberoftelevisions"offar
westernUnitedStatesfamiliesisdifferentfromthedistributionfortheAmericanpopulationasa
whole?
Solution
ThisproblemasksyoutotestwhetherthefarwesternUnitedStatesfamiliesdistributionfitsthe
distributionoftheAmericanfamilies.Thistestisalwaysright-tailed.
Thefirsttablecontainsexpectedpercentages. Togetexpected(E)frequencies,multiplytheper-
centageby600.Theexpectedfrequenciesare:
NumberofTelevisions
Percent
ExpectedFrequency
0
10
(0.10)(600)=60
1
16
(0.16)(600)=96
2
55
(0.55)(600)=330
3
11
(0.11)(600)=66
over3
8
(0.08)(600)=48
Table11.8
Therefore,theexpectedfrequenciesare60,96,330,66,and48.IntheTIcalculators,youcanletthe
calculatordothemath.Forexample,insteadof60,enter.10*600.
H
o
: The"numberoftelevisions"distributionoffarwesternUnitedStatesfamiliesisthesameas
the"numberoftelevisions"distributionoftheAmericanpopulation.
H
a
:The"numberoftelevisions"distributionoffarwesternUnitedStatesfamiliesisdifferentfrom
the"numberoftelevisions"distributionoftheAmericanpopulation.
Distributionforthetest:c
2
4
wheredf=(thenumberofcells) 1=5 1=4.
NOTE
:df 6= 600 1
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
479
Calculatetheteststatistic:c
2
=29.65
Graph:
Probabilitystatement:p-value=P
c
2
>29.65
=0.000006.
Compareaandthep-value:
 a=0.01
 p-value=0.000006
So,p-value.
Makeadecision:Sincea>p-value,rejectH
o
.
Thismeansyourejectthebeliefthatthedistributionforthefarwesternstatesisthesameasthat
oftheAmericanpopulationasawhole.
Conclusion: Atthe1%significancelevel,fromthedata,thereissufficientevidencetoconclude
thatthe"numberoftelevisions"distributionforthefarwesternUnitedStatesisdifferentfromthe
"numberoftelevisions"distributionfortheAmericanpopulationasawhole.
NOTE
: TI-83+ + and some TI-84calculators: : Press
and
. Makesure to clearlists
,
, and
iftheyhave datainthem(see thenoteat theend ofExample 11-2). . Into
, put
theobservedfrequencies
,
,
,
,
. Into
, puttheexpected frequencies
,
,
,
. Arrowovertolist
anduptothenamearea
. Enter
and
.Press
.Press
andarrowoverto
.Press
. You
shouldsee
. Roundedto2decimalplaces, , youshouldsee
. Press
. Press
orArrowdownto
c
andpress
.Enter
. Rounded
to4places,youshouldsee
(roundedto6decimalplaces)whichisthep-value.
The newer r TI-84 4 calculators have in
the test
. To o run the test, put the
observedvalues(thedata)intoafirstlistandtheexpectedvalues(thevaluesyouexpectifthe
nullhypothesisistrue)intoasecondlist. Press
and
.Enterthelistnames
fortheObservedlistandtheExpectedlist.Enterthedegreesoffreedomandpress
or
.Makesureyouclearanylistsbeforeyoustart.
Example11.4
Supposeyoufliptwocoins100times. Theresultsare20HH,27HT,30TH,and23TT.Arethe
coinsfair?Testata5%significancelevel.
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
480
CHAPTER11. THECHI-SQUAREDISTRIBUTION
Solution
Thisproblemcanbesetupasagoodness-of-fitproblem. Thesamplespaceforflippingtwofair
coinsis{HH,HT,TH,TT}. Outof100flips,youwouldexpect25HH,25HT,25TH,and25TT.
Thisistheexpecteddistribution. Thequestion,"Arethecoinsfair?"isthesameassaying,"Does
thedistributionofthecoins(20HH,27HT,30TH,23TT)fittheexpecteddistribution?"
RandomVariable:LetX=thenumberofheadsinoneflipofthetwocoins.Xtakesonthevalue
0,1,2.(Thereare0,1,or2headsintheflipof2coins.)Therefore,thenumberofcellsis3. Since
X=thenumberofheads,theobservedfrequenciesare20(for2heads),57(for1head),and23(for
0headsorbothtails).Theexpectedfrequenciesare25(for2heads),50(for1head),and25(for0
headsorbothtails).Thistestisright-tailed.
H
o
:Thecoinsarefair.
H
a
:Thecoinsarenotfair.
Distributionforthetest:c2
2
wheredf =3 1=2.
Calculatetheteststatistic:c
2
=2.14
Graph:
Probabilitystatement:p-value=P
c2>2.14
=0.3430
Compareaandthep-value:
 a=0.05
 p-value=0.3430
So,a<p-value.
Makeadecision:Sincea<p-value,donotrejectH
o
.
Conclusion:Thereisinsufficientevidencetoconcludethatthecoinsarenotfair.
NOTE
:TI-83+andsomeTI-84calculators:Press
and
.Makesureyouclearlists
,
,
and
iftheyhavedatainthem. Into
,puttheobservedfrequencies
,
,
. Into
,put
theexpectedfrequencies
,
,
. Arrowovertolist
anduptothenamearea
. Enter
and
.Press
.Press
andarrowoverto
.Press
. You
shouldsee
.
.Roundedto2decimalplaces,youshouldsee
.Press
.
Arrowdownto
c
(orpress
).Press
.Enter
.Roundedto4places,you
shouldsee
whichisthep-value.
The newer r TI-84 4 calculators have in
the test
. To o run the test, put the
AvailableforfreeatConnexions<http://cnx.org/content/col10522/1.40>
Documents you may be interested
Documents you may be interested