You are on page 1of 1

.

CHISQUARETEST

2.CONTENTS:
•I
MPORTANTTERMS•INTRODUCTION•CHARACTERI
STI
CSOFTHETEST•CHISQUAREDI
STRI
BUTION•
APPLI
CATI
ONSOFCHISQUARETEST•
CALCULATI
ONOFTHECHISQUARE•
CONDI
TIONFOR
THEAPPLICATI
ONOFTHETEST•EXAMPLE•YATE’SCORRECTI
ONFORCONTINUI
TY•LI
MITATIONSOFTHETEST.

3.I
MPORTANTTERMS1)PARAMETRI CTEST:Thetesti
nwhich,thepopulat
ionconstant
sli
kemean,st
ddev i
ati
on,st
derror,
cor
rel
ati
oncoeff
ici
ent,pr
oport
ionet
c.anddatatendtofoll
owoneassumedor
est
abl
i
sheddist
ri
buti
onsuchasnormal,
binomial
,poi
ssonetc.
2)NONPARAMETRI CTEST:thet
estinwhichnoconstantofapopul
ati
onisused.Datadonotfol
l
owanyspeci f
icdist
ri
buti
onandnoassumpt
ionar
e
madeint
hesetest
s.E.g.t
ocl
assi
fygood,bet
terandbestwejustal
locat
earbit
rarynumbersormarkstoeachcategory
.3)HYPOTHESIS:
Iti
sadef i
nit
estat
ementaboutthepopulati
onparamet
ers.

4.4)NULLHYPOTHESIS:
(H0)statesthatnoassoci
ati
onexist
sbetweenthetwocross-
tabul
atedvar
iabl
esinthepopul
ation,
andt her
eforet
hev ar
iabl
esarestat
ist
ical
lyindependent.E.
g.i
fwewantt
ocompar
e2
methodsmethodAandmet hodBforitssuper
ior
it
y,andi
ftheassumpti
onisthatbothmethodsareequal
lygood,t
henthisassumpt i
oniscall
edasNULLHYPOTHESI S.5)ALTERNATI VEHYPOTHESI
S:(
H1)
proposest
hatt
hetwovar
iablesar
er el
atedint
hepopulat
ion.I
fweassumet hatf
rom 2methods,methodAissuperi
orthanmet hodB, t
henthi
sassumptioniscall
edasALTERNATI VEHYPOTHESIS.

5.6)DEGREEOFFREEDOM: Itdenotestheex t
entofindependence( f
reedom)enjoyedbyagi vensetofobser
vedfr
equenciesSupposewear egivenasetofnobservedfrequenci
eswhi
charesubject
edtok
i
ndependentconst
raint
s(r
estr
ict
ions)then,d.
f.=(numberoff requencies)–(numberofindependentconst
rai
ntsonthem)Inotherterms,
df=( r–1) (
c–1)wher er=thenumberofrowsc=t henumberof
columns7)CONTINGENCYTABLE: Whent hetableispreparedbyenumer ati
onofquali
tati
vedatabyenteri
ngtheactual
frequenci
es,andi
fthattablerepr
esent
soccuranceoftwosetsofev
ents,t
hattabl
eiscal
l
ed
theconti
ngencyt
able.(
Lati
n,con-together
,tangere-t
ot ouch).I
tisal
socal l
edasanassociati
ont abl
e.

6.INTRODUCTION Thechi-
squar
etestisanimportantt
estamongsttheseveral
test
sofsignif
icancedevelopedbystat
ist
ici
ans.Iswasdevel
opedbyKar
lPearsonin1900.CHISQUARETESTisanonparamet
ri
c
testnotbasedonanyassumpti
onordistri
but
ionofanyvari
abl
e.Thisstat
ist
icalt
estf
oll
owsaspeci fi
cdistri
buti
onknownaschi squar
edist
ri
buti
on.I
ngener
al Thetestweusetomeasur
ethedi
ff
erences
betweenwhatisobser
vedandwhatisex pect
edaccordi
ngtoanassumedhy pothesi
siscall
edt hechi
-squaretest
.

7.IMPORTANTCHARACTERI STICSOFACHISQUARETEST Thi st


est(
asanon-par
amet r
ict
est)i
sbasedonfrequenciesandnotont heparameter
sli
kemeanandst andarddev
iati
on.Thetesti
susedf
ortest
ing
thehypot
hesi
sandisnotuseful
forest
imati
on.Thistestcanal
sobeappl
iedt
oacompl excont
ingencyt
abl
ewi t
hsev eral
classesandassuchi saveryusefultesti
nr esear
chwork.Thi
stestisani
mport
antnon-
parametr
ict
estasnori
gidassumpti
onsarenecessar
yinregar
dtothet
ypeofpopul
ati
on,noneedofparamet
erv al
uesandr elat
ivel
ylessmathemati
caldetail
sar ei
nvolved.

8.CHISQUAREDI
STRI
BUTION:
IfX1,
X2,….
Xnareindependentnor
malvar
iatesandeachisdi
str
ibut
ednormall
ywit
hmeanzer
oandst
andar
ddev
iat
ionuni
ty,
thenX12+X22+……+Xn2=∑Xi
2isdi
str
ibut
edaschi
squar
e(c2)
wit
hndegr
eesoffr
eedom (
d.f
.)wher
eni sl
arge.Thechi
squarecur
veford.
f.N=1,5and9isasfoll
ows.

9.Ifdegreeoff
reedom >2:
Dist
ri
but
ioni
sbel
lshapedI
fdegr
eeoff
reedom =2:
Dist
ri
but
ioni
sLshapedwi
thmaxi
mum or
dinat
eatzer
oIfdegr
eeoff
reedom <2(
>0):
Dist
ri
but
ionLshapedwi
thi
nfi
nit
eor
dinat
eat
theorigi
n.

10.APPLI
CATI
ONSOFACHISQUARETEST.
Thi
stestcanbeusedi
n1)Goodnessoff
itofdi
str
ibut
ions2)t
estofi
ndependenceofat
tri
but
es3)t
estofhomogeni
ty.

11.1)TESTOFGOODNESSOFFI TOFDI STRIBUTIONS:Thi stestenabl


esustoseehowwel ldoest
heassumedt heor
eti
cal
distri
buti
on(suchasBi nomi
al di
str
ibut
ion,Poi
ssondi
str
ibuti
onorNormaldi
str
ibut
ion)
fi
ttotheobser
veddat
a.Thec2testfor
mulaforgoodnessoff iti
s:(o e)2 2eWher e,o=observedf
requencye=expect edfr
equencyI fc2(cal
cul
ated)>c2(tabulat
ed),
wit
h(n-1)d.
f,t
hennul
lhypot
hesisis
rej
ectedot
herwi
seaccept
ed.Andifnul
lhypothesi
sisaccepted,theni
tcanbeconcl
udedthatthegi
vendi
str
ibut
ionfol
lowstheoret
icaldi
str
ibuti
on.

12.2)TESTOFI NDEPENDENCEOFATTRI BUTESTestenabl esust oexplai


nwhet herornott woat tri
butesareassociat
ed.Fori nstance,wemaybei nterest
edinknowingwhet heranewmedi ci
neiseffect
ivein
contr
olli
ngfeverornot, c2t
esti
susef ul
.I nsuchasi t
uation,wepr oceedwiththenul lhypot
hesi sthatthetwoattri
butes(viz.
,newmedi ci
neandcontroloffever
)areindependentwhichmeansthatnewmedi ci
nei
s
noteffect
ivei
ncont rol
li
ngfever
.c2( calculated)>c2(tabulated)atacertai
nlev elofsigni
fi
cancf eforgivendegreesoffreedom, thenullhypot
hesi
sisr ej
ected,
i.
e.twov ar
iabl
esaredependent.
(i
.e.
,thenew
medicineisef
fectiv
ei ncontr
oll
i
ngt hefev er)andif
,c2(calculated)<c2(t
abulated),thenullhy pothesisisaccept
ed, i
.
e.2v ari
ablesareindependent
.(i
.e.
, t
henewmedi cineisnoteff
ecti
veincontr
oll
ingthe
fev
er).whennul lhypothesi
sisrej
ected,itcanbeconcl udedt hattherei
sasignifi
cantassoci ationbetweent woat t
ri
butes.

13.3)TESTOFHOMOGENI TY Thi
stestcanalsobeusedtotestwhet
hertheoccuranceofev
entsfol
l
owuniformityornote.
g.t
headmissi
onofpati
ent
singover
nmenthospi
tal
inallday
sofweekisuni
form or
notcanbetest
edwit
ht hehel
pofchisquaretest
.c2(cal
culat
ed)<c2(tabul
ated)
,thennul
lhypot
hesi
sisaccepted,andi
tcanbeconcl
udedthatt
her
eisaunif
ormit
yint
heoccuranceoftheev
ent
s.(uni
for
mityin
theadmissi
onofpat
ientst
hroughouttheweek)

14.CALCULATI
ONOFCHISQUARE(
o e)2 2eWher
e,O=obser
vedf
requency
E=expect
edf
requency
Ift
wodi
str
ibut
ions(
obser
vedandt
heor
eti
cal
)ar
eexact
lyal
i
ke,
c2=0;
(butgener
all
yduet
osampl
i
ng
err
ors,
c2isnotequal
toz
ero)

15.STEPSI NVOLVEDI NCALCULATINGc21)Calcul


atetheexpect
edfrequenciesandtheobservedfr
equenci
es:Expectedfrequenciesfe:t
hecellfr
equenci
esthatwoul
dbeex pect
edinacont i
ngencyt
ableift
he
twovari
ableswer est
ati
sti
cal
l
yindependent
.Observ
edfrequenci
esfo:thecel
l fr
equenci
esactuall
yobser
vedinacont i
ngencyt abl
e.fe=(col
umnt otal
)(
rowtot
al)NToobtaintheexpectedfr
equenci
esforanycel
l
i
nanycr oss-tabul
ati
oninwhi
chthetwov ar
iabl
esareassumedindependent,multi
plyt
herowandcol umntot
alsforthatcel
l anddividet
heproductbythetot
alnumberofcasesinthetable.

16.2)Thenc2i
scal
cul
atedasf
oll
ows:
(fe f
o)2c 2f
e

17.CONDITIONSFORTHEAPPLI CATIONOFc2TESTThef ol
lowingconditi
onsshouldbesat i
sfi
edbeforeX2t estcanbeappli
ed:
1)Thedatamustbei nthef or
m offrequenci
es2)Thefrequencydat
amusthav ea
preci
senumericalvalueandmustbeor gani
sedint
ocategori
esorgr oups.
3)Observati
onsrecordedandusedar ecol
lect
edonar andom basi
s.4)Al
ltheit
mesi nthesampl emustbeindependent.
5)Nogr oup
shoul
dcontainveryfewi t
ems,saylessthan10.I
ncasewher ethefrequenci
esarelessthan10, r
egroupingi
sdonebycombi ni
ngthefr
equenciesofadjoi
ninggroupssot hatthenewfr
equenciesbecomegr eat
er
than10.(
Somest atisti
ci
anstakethi
snumberas5, but10isregardedasbet t
erbymostoft hestati
sti
cians.
)6)Theov er
all
numberofitemsmustalsober easonablylar
ge.Itshoul
dnormallybeatleast50.

18.EXAMPLE

19.YATE’
SCORRECTIONIfinthe2*2cont
ingencyt
abl
e,t
heex
pect
edf
requenci
esar
esmal
l
sayl
esst
han5,
thenc2t
estcan’
tbeused.I
nthatcase,
thedi
rect
for
mul
aoft
hechi
squar
etesti
smodi
fi
edandgi
venby
Yate’
scor
rect
ionf
orcont
inui
tyR1R2C1C2

20.LIMITATI
ONSOFACHISQUARETEST1)Thedat aisf
rom arandom sampl e.
2)Thistestappli
edinafourfoul
dtabl
e,wi
l
l notgiv
ear el
iabl
eresul
twithonedegreeoff r
eedom i
ftheexpect
edv al
ueinanycelli
s
l
esst han5.i
nsuchcase,Yat
e’scor
rect
ionisnecessry
.i.
e.r
educti
onoft hemodeof( o–e)byhal f.
3)Ev
enifYate’
scorr
ect
ion,thetestmaybemi sl
eadingifanyexpectedfr
equencyismuchbelow5.inthatcase
anotherappr
opr
iat
etestshoul
dbeapplied.
4)Inconti
ngencytabl
eslar
gert han2*2,Yate’
scorrecti
oncannotbeappli
ed.
5)I
nterpri
tthi
stestwit
hcautionifsamplet
ot al
ortotal
ofvaluesi
nallt
hecellsi
slessthan
50.

21.6)Thistestt
ell
st hepresenceorabsenceofanassociati
onbet
weentheevent
sbutdoesn’tmeasur
ethest
rengt
hofassociati
on.
7)Thi
stestdoesn’
tindi
catet
hecauseandeffect
,itonlytel
l
stheprobabi
l
ityof
occuranceofassociati
onbychance.8)thetestistobeappli
edonl
ywhenthei
ndivi
dualobser
vati
onsofsampl
eareindependentwhi
chmeansthattheoccurr
enceofonei
ndiv
idualobservati
on(event
)hasno
eff
ectupont heoccurrenceofanyotherobservati
on(ev
ent)i
nthesampl
eunderconsi
derati
on.

You might also like