By
Dr.g Zardadg Khan
DepartmentgofgStatisticsgAb
dulgWaligKhangUniversitygMardan
Augustg19,g2020
AWKUM Categoricalg dataganalysi
s
,Lectureg1:gIntroductiongtogcategoricalgdatag(analysis)
gCategoricalgdatagaregagtypegofgdatagthatgconsistgofgcategor
icalgvariables.
gThesegvariablesgmightgbeggeneratedgduegtogthegintrinsicgnat
uregofgthegdataggenerationgprocessgorgothergtypesgofgdatagmi
ghtgbegconvertedgintogthisgformgforgsomegpurposeg(e.g.g agegc
onvertedgintogageggroups).
g CategoricalgVariable:gAgvariablegthatgcangtakegongvaluesg
fromgagfixedgnumbergofgvaluesg(classes)gusuallygcalledgcate
gories.
g Statisticalginvestigationgforggettingginformationgfromgsuchgd
atagisgcallledgcategoricalgdataganalysis.
AWKUM Categoricalg dataganalysi
s
,Lectureg1:gIntroductiongtogcategoricalgdatag(analysis)
AWKUM Categoricalg dataganalysi
s
, Lectureg1:g Examplesgofgcategoricalgdata
g Somegexamplesgofgcategoricalgvariablesgaregstatusgofgdise
aseginfection,ggender,geyegcolour,ghairgcolour,gpoliticalgaffili
ation,getc.
g Politicalgaffiliation,gforgexample,gmayghavegseveralgcategori
esgwhengrespondantsgdeclaregthemselvesgasgRepublican,gDe
mocratgorgIndependentgorgOther.g Eachgrespondantgwillghaveg
onlygonegcategorygi.e.g thegcategoriesgaregmutuallygexclusive
.
g Thegcategoriesgaregnotgvariablee, gforgexamplegRepublican gdoe
sgnotgchangegfromgonegpersongtogangother.
g Togmanipulategdatageasily,,gcategoriesgaregoftengrecordedg
asgcodedgnumericalgvalues.g Foregexample,ggendergisgcodedgas
g0g=gMale,g1g=gFemale.
AWKUM Categoricalg dataganalysi
s