0% found this document useful (0 votes)
22 views14 pages

20331a0547 (Spa) Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views14 pages

20331a0547 (Spa) Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

DCedam.

bana balta
I03.3 (A0641
SS1q hmcnt Cst-8

Cortfute 254h pn.ctntile fon 2 4 61 1D

I 22 2y
12 1 16 20

25 th boncenble to the cabovc senles

Cno bl obsenvations-)
4

LCI2)
35nd obsnvation nomthe
4 th -

D Combute man abalute deviation on the


J

tollobinq data 2 3 5 8 lo
ton the ahove
Dhat ane the tunctions tscd

Pthon /R. re
Mcan Hbss ate cleviation lmAD).is he avcnage
of the absoute eli fonentes behocan asel ot
numbos.qnd the man of thase numbens

hus er
lsisolb
Fon the qiven data
2,315, 1,8,9,1o
3
C+3+ r +5+7 +2 4c7+lo)|
Mcan
6

The thso ete dcviations taom the mcan

ton cach clata point


l2-64
3-6= 3
or 14-6) 2
IS-6'
7-6
19-6 2 d
19-6 3
1o-6 iY
Sothe mcan.absouute cde viaton s

- +3+2+1+ 1+2t34) / 2

The uncion that ane cLked ton Calculahn


mcan absoute deviation 15 as low

Sn bythen or Use numpy librnasny


absoule deviation
Calulale mean
num py mcan Calalatron of med

numpy abs calaulathng absoute values


Lot
Data be 2,345,7, 8,9,1
Code
Impont numpy a5
np
data =[2,3,4,5,T8,9,10)ra

mcan-1 np mean ( data)


deViatton-i
=np abs Cdaa-mean)
mAD np mcan Cdeviatiog-1)
pnihtCMAD)
In KDc use mean abs txns Sm mlany
above we take input as auay henc data
Vccton 1s cun in but

catae ct3,4,5,1)
mcan i mcant data)ey t
aas data a abs (dlata- mean-)
Mad= meanl absdota
pnint Cmad)
bins 1nthe
e d nequincd 45 neude empy
tmequ cno able dyes , wh
commcnded to include
Ts qchcnally nc
tt
fnequenay able
as
Cmpty bns n a

noVldcs a cleaO ancl mone Compnc hensive


pictune of dustn1bufion of cdat Tncluclhn
Cmpty bins helps us accuntfon,miss1ng/o

Valucs in the data and also indicates the


anqc of clata that as hat rmta þncted

nepncscntfed in samsleThis helps (n misintonpret


ation ot data pnovide betten undastanding
ot ovoall ds nibution,of data

Aletionally induding empy bns can help-bidentf


in thc data
ary otential 'ouflens /gabs
phich is uscful tontutune Intopnetation alysIS
to idnhty bhiskois in box lots?
hat clocs They nepneent
BDX
hakn ohs hen
Median QR
onn Quarthle pen uanfle
hiskens n box plot ane the Cnes tat

extend tnom he box to he m ni mun


Vaucs of 1he data sel erdd
m a x i m u m

the
outlins They ncpncs ent TangJ
In
T a a typical datusd
vaues of he datasct
o f

phisken extonds
tnom
4he
the
tnOm
the losa
boxplot Smalles vauc
Smallesl valuc in
in

the box to the


ot
boftom whiskn Cxtends
cxtends
ohle upper
datasct
(angesB value
a
the
the top of fhe box t»
Tmom
outside of nange
16at tall
Ary darta points an
bhiskas help .gve
of box plet distnibuhon
of
the
ovenall
OVcnall prctune visual
Visual

pnoVi de
a qurck
dind
dataset oleta
deta.
vanla
an brlih of
ta brlith
tation of a nge
nepncsen
a
gnenate
Ontte a cod shippet
J
Scctten plot
Python plt
Impont nmatplot pplot
as

X
I2,3, 4,5J
y 34,5, 62]
Plt 8catn (xy)
plt xlabclC"x axis'
labelC" y axis)
Plt.y
PlHs ho» )
lo qcneale salln plot
lo qenenate In R
c obtain by sing (q9plot 1)

1bnarny99pot).
X-c C1, 2, 3, 4,5)
y-c C1 6, 3, 10)
g9plot datatname Cy) , acs Cx) +

JCom-bointC)+

99 title C Seatla Plot cxp)+


x lab C"xdiis) +

ylab C'y arts


shat is he advatage o explic1t
identhy unq d ata as Categonical cdata

Beten dato Analysi's


Cateqonica data tan be analyzed
continous clata
In ditleent bays than
such as thnding. Pnopontions, fnequchcs
lacta
ahd mode By explicl ly tdentihyng
as cate qonical, the data analysis s

ound mone meaninqhd


Tmpnovcd darta Vigualiptio
Caleqo njcal data s best viz
(cD) Ustn
and othen similan
ban plofs, pic chants,
types of gnaphs By cxplicty 1denklyng
Categonical data as
dala
cate qo datla B
s
data as

best V3 acwnately neprescnts dada


makes. 1t. casicn to undenstad

3Betten data þnocessi


CD is oflen pnocesscd daBa diffnet

than conthnous l ata Such as onc-ho1 coa


Pfficient
pncpnoccssin l l be mone
he clata

Lcunate

Impnovcd memony usage


CD typically
uscs eSs memon han Contih Darla

epthmiged espiciall, bhen bsn


The memony l l be
Ved Drth dange data Ses.

Ovnall explieatly idenhty cD helps s


and
to ensune clata hanclung pnotessih9
analgec in the most appnop niette f eHcchor

o
Leclambaa Datta
Assiqhcnt-2 20331AOS1+

Explain hat conficlenCC level 1o1th


ne pectto confide nce intenval3

A Contlence leve ot ho
S a mcas wnc of
Contident ebe Ce 4hat he tnue

population ponamctos falls Dithm the


the

Contidenc t rs ca þnobalitystatemet aboa


The Contiden ntenval Js ex pacsscl
as a
pa centaqg
tD exp ct 15 Cothid ence ilevel 6 choacn

ths mean that f joo ndehendent Sampes


Pe takei tnom heapulatonnf cotidos
Intenval 3a5calaulatd tnom cach satle
o eould. expect a5 ot Thesc ntovals to
contain he truue populachon anameteu

Ootha snls denee level nepnesents the deqnce of


Cont ain ity hat se have Caloulatcdtno
thctruue
OW Sample cdata l'Contan
populabon parametn
he ht
qha the con olence
level
Cvel, the sido h 17caton he
unctain alout A truuL of population
ola n he pnoccs5 b calculate
Slancdan d
you nelale slandand non
Cnnon
Ho cun

Sample S13e>

nnor is a
m casune
oT Vaniablihy 79
standand
hich a Slat uscd
of hecshmatou , o is

population panameten
o cstmate the
standand devi abon
Coalaulated as the
T is
drsnibution of the eshmaton
of the 5ampling

SE S
n
standandl deviathon n is sampe
Sis the
S3
SE as Sn
SE L aS n nneascs the Sample
bccomesbetten neppescntati
ob population, ieducthe
vaniab1lity ot estmator
as SE becomcn Smallen

monc ne u s e
Cangn Sample Slze pnovides
eshato
Longe Sample yoVIdes Cmone

dcCLUlate eshmatc ol topulation A3onk

mcan heductng vantab1lity ot Sawifling


distnbubion o Mcan
,Ofto o nds mon e
anqtn Samle St3e Tcsults h

pncase shmate ot opalation mcan (cadn


lcadng
to Small standand enon
3 1he empínial nule, on the 6-159

lh nespeet to he Wonmal Distni budion

he mplnica u l e ,dlso hnoon as 1he 6x 5-1

Rule) slates 16at -fon a nonmal elutn1buat


63/ of 1Ge drla falls
ron, obnoxImdtely
standand deviatlon ot
the mea
th onc.

standone
atbnoximatey 9sfalls t a n bo
talls brthin
deviations and approximdely 9:7
thnee slanclancl de viations This rule
AG
esthimate of
the pencctage
pnovides a nough
Ton
(ie thin a q)vcn Ttangc
ot valus thoct

n onmal elism bution

i nde ode Snrfbel ton 6lsthn q


plots CRIPyton)
example ot a plst in R
Hone is Cln

bnar
yyplota)
Sample honmal distn tb-
Gcnenahng
Set SecdC
cpaantile uanble lot
oovaucs an plolled
quantles of
Ohen
Ohen n col
oktaind
he
ofhenlhen
@qeins Cach plot
quantle- quanhle
knonm as
plot 1s
the edhstnbabi
the elistlbaba
bhetha
aU713e5
Ths lot summ

ont h
hoo
Ganiades
aSic Simlan not -b

Cocatios

Pyton
1mpot numpyas hP A
Sh
as
statsmodelo asi
Impont
Impont ylab as
nandom honmal (o, Iyloo)
data Points np =

Sm19Plot (dataponts,
ine =l4s")
Py'Shou C)

a a p

2
Jhconti cal anhles
4 plain andom Sampling orlh an example
Code Shippet
handom samplc ts a stahstial methodof

sdectng a
samfle of data fonbs tmoma
Cconq r Sct ot dlata the idca behned he Tiandbm

Sanpltnq5 to cnsu hat cadh olata poinf hasau


Cqual cha nge
cqual ot being Sclecked i o 1%at
sample nepresents the population accunatch
CAS oss ble

Consid en a fobulation ot o0 shudents bith hetghty


ccondec in Gcclass obtain Tanclom Sanpl
t lo Shudens tnom th bosalodisn

mpont TLandonm

def nandom-Sa mflinqpopulation,Sanps3


saple Ta hdom Sa wple Cpopalatan
sawblsgcc)
nctunn sample
populahbh G,47 8o1o (00 67 61
Sa p-S3 (D

Sampl nandom Samplihg populatin, sans=


pnint(Sample,, Smple
The above Code usces
andom
andomSamslel ) tunchion

Module o scleet Smble s3e n Ok


trom the pobulafhion Cist
dlata þon ts
Tnesalt selccted nonnally
Dith out neplaccment

You might also like