Вы находитесь на странице: 1из 8

EllaPettichord

MrCrow,periodA3
September22nd,2015
AgeofMajorityDataExplorationProject

Astheendofhighschoolapproaches,adulthoodstartstoloomoverthesoontograduate
students.Inanefforttoseehowthisupcomingshockaffectspeoplearoundtheworld,Ihavedecidedto
studyandanalyzetheageofmajorityinmanyforeigncountries.Thedatawasobtainedfromthe
Wikipediaarticletitlesageofmajority,whichliststheinformationinunitsofyearsofagebecause
thatshowmostpeoplejudgehowoldtheyare.Atotalof30countrieswereselectedfromapopulationof
over190countries.Theonlycountriespurposefullyignoredwerecountrieswheremenandwomenhave
differentageofmajoritiesandcountrieswheredifferentstatesorprovinceshavedifferentageswithinthe
country.
Thesamplesizeis30countries.Usingfivenum()inRstudio,thefivenumbersummaryis18,18,
18,19,21.TheIQRisfoundbysubtractingthe2ndand4thnumbers,18and19,togetanIQRof1.
Usingmean(),themeanofthedatais18.6.Usingmedian(),themedianfoundis18.Usingrange(),
subtractthedifferencebetweenthetwonumbersgiven,18and21,tofindtherangeof3.Usingsd(),the
standarddeviationis1.102.Usingvar(),thevarianceis1.21.
Anoutlierisanumberthatis1.5IQRfromQ2orQ4.Thereisanoutlierofanynumberlarger
than20,socountriesthathaveanageofmajoritygreaterthanthat(Azerbaijan,Indonesia,Madagascar,
andSwaziland)arealloutliers.

EllaPettichord
MrCrow,periodA3
September22nd,2015

Next,Itakemydataandadd100toallvalues.Thefivenumbersummaryis118,118,118,119,
and121,themeanis118.6,themedianis118,therangeisthedifferencebetween118and121,whichis

EllaPettichord
MrCrow,periodA3
September22nd,2015
3,thestandarddeviationis1.102,thevarianceis1.213,andtheIQRisthedifferencebetween118and
119,whichis1.Themeanofthisdata,118.6,isthesameasthemeanofmyoriginaldata,18.6,but
increasedby100,andthesamecanbesaidforthemedian,whichinmyoriginaldatais18andis118in
thenewdata.However,thestandarddeviationremainsthesameforbothcases,1.102inbothsetsofdata.

EllaPettichord
MrCrow,periodA3
September22nd,2015
Next,Itakemydataandincreaseallvaluesby50%.Thefivenumbersummaryis27.0,27.0,
27.0,28.5,and31.5,themeanis28.05,themedianis27,therangeisthedifferencebetween27.0and
31.5,whichis4.5,thestandarddeviationis1.768,thevarianceis3.127,andtheIQRisthedifference
between27and28.5,whichis1.5.Themeaninthefirstdatasetis18.6,whichisdifferentthanthedata
inthisset,whichhasameanof28.05.Themedianis27,thesameas18(themedianinthefirstset)
increasedby50%.Thestandarddeviationsare
muchdifferent,with1.102inthefirstsetand
1.768inthesecond.

EllaPettichord
MrCrow,periodA3
September22nd,2015

Assumingthatthedataisnormallydistributed(whichitisnt),Icanfindthepercentofdata
pointsthatare5unitsaboutmymean.Dividing5(thedifferencebetweenthevalueandmymean)bythe
standarddeviationofmyoriginaldata,1.102,givesmeazscoreof4.54.Thetableofzscoresdoesntgo
thathigh,butthehighestvalue,3.49,is1.000,so4.54willbethesamesinceitcantgoanyhigher.
Therefore,0%ofmydatais5unitsabovethemean.
Thezscoreof3unitsbelowmeanis2.722andthezscoreof2unitsabovethemeanis1.815.
Usingthetablewiththesezscores,itcanbefoundthatifthiswereanormaldistribution,96.3%ofall
datapointswouldbebetween3unitsbelowthemeanand2unitsaboveit.
Tofindthetop10%ofdata,Iwilllookatmytableandfindthezscorecorrespondingto.990.
Settingthatvalue,2.31,equaltothezscoreformulaandsolvingforxgivesmethevalueof21.146.
Therefore,thetop10%ofdatawouldbefoundat21.146orhigherifthisdatawerenormallydistributed.

EllaPettichord
MrCrow,periodA3
September22nd,2015
Throughthedata,itisshownthatmostcountrieshaveverycloseagesofmajoritytoeachother.
Lookingatmyoriginaldata,Icanbeseenthatthestandarddeviationof1.102translatestothedatabeing
verygroupedtogether.Byexaminingthevisualgraphics,thehistogramisshowntobestronglyright
skewed,withthemodebeing18yearsold.Byrunningthisanalysisofmydata,Iknownowthat
regardlessofwhatcountryIlivedin,Iwouldbebecomingalegaladultinthenextfewyears.

Programmingtosupportdata:

>####ageofmajoritylab
>##finddataforbasicdata
>fivenum(medata$Age)
[1]1818181921
>mean(medata$Age)
[1]18.6
>median(medata$Age)
[1]18
>range(medata$Age)
[1]1821
>sd(medata$Age)
[1]1.101723
>var(medata$Age)
[1]1.213793
>
>##creategraphics
>hist(medata$Age,main="AgeofMajority",xlab="AgeinYears")
>boxplot(medata$Age)
>stem(medata$Age)

Thedecimalpointisatthe|

18|0000000000000000000000
18|
19|00

EllaPettichord
MrCrow,periodA3
September22nd,2015
19|
20|00
20|
21|0000

>
>##finddatafordata+100
>fivenum(medata1$Age)
[1]118118118119121
>mean(medata1$Age)
[1]118.6
>median(medata1$Age)
[1]118
>range(medata1$Age)
[1]118121
>sd(medata1$Age)
[1]1.101723
>var(medata1$Age)
[1]1.213793
>
>##graphsfordata+100
>hist(medata1$Age,main="AgeofMajorityplus100",xlab="AgeinYearsplus100")
>boxplot(medata1$Age)
>stem(medata1$Age)

Thedecimalpointisatthe|

118|0000000000000000000000
118|
119|00
119|
120|00
120|
121|0000

>
>##finddatafordata50%
>fivenum(medata5$Age)
[1]27.027.027.028.531.5
>mean(medata5$Age)
[1]28.05
>median(medata5$Age)
[1]27
>range(medata5$Age)

EllaPettichord
MrCrow,periodA3
September22nd,2015
[1]27.031.5
>sd(medata5$Age)
[1]1.768255
>var(medata5$Age)
[1]3.126724
>
>##graphicsfordata50%
>hist(medata5$Age,main="AgeofMajorityincreasedby50%",xlab="AgeinYearsincreasedby50%")
>boxplot(medata5$Age)
>stem(medata5$Age)

Thedecimalpointisatthe|

27|000000000000000000000
27|
28|
28|55
29|
29|
30|00
30|
31|
31|55555

Вам также может понравиться