Você está na página 1de 6

Diet 3 Diet 2 Diet 1

22.5
20.0
17.5
15.0
12.5
10.0
7.5
5.0
D
a
t
a
I ndi vi dual Val ue Pl ot of Di et 1, Di et 2, Di et 3
IntroductiontoANOVA

LambWeightGainExamplefromText
Thefollowingtablecontainsfictitiousdataontheweightgainoflambsonthreedifferentdiets
overa2weekperiod.
WeightGain(lbs.)
Diet1 Diet2 Diet3
8 9 15
16 16 10
9 21 17
11 6
18

Whatisaquestionofinterest?

Howdoweanalyzethisdata?Wehaveindependentsamplessowhynotuseindependent
samplesttests?Answer:Usingthetdistributiontomakemorethanonecomparisonofa
pairofindependentsamplesdrivesupthechanceforerror.
Recall:TheTypeIerrorrate(theprobabilityofgoingwiththealternativewhenweshouldnt)
ofattestisthesignificancelevel,.
Thelambweightdataiscomprisedofthreeindependentsamples.Howmanypairwise
comparisonscanwemake?

Then,wecanmakeaTypeIErrorinanyorallofthesecomparisons.Letslookatwhat
happenstotheprobabilityofatleastoneTypeIErrorwhenmakingmultiplecomparisons:

Moreonwhattodoaboutthiserrorrateproblemlaterfornow,weintroducetheANOVA.
Intiouuction to AN0vA Page 2

Aonewayanalysisofvariance,orjustANOVA,thatwellbelearningisahypothesistesting
procedurethatusesthefollowinghypotheses:

H
O
:

H
A
:

Thetermonewayreferstothefactthatthereisonlyonevariabledefiningthegroups(in
ourexamplethisisDiet).

Notation:
I=numberofgroups
idenotesthei
th
groupandjdenotesthej
th
observation
y
ij
=y
12
denotesthe2
nd
observationinthefirstgroup
n
i=
samplesizeforthei
th
group
y

=samplemeanforthei
th
group
n.= n

I
=1
(thetotalsamplesizeacrossallgroups)
y=

i]
n
i
]=1
I
i=1
n.
(samplemeancombiningdataacrossallgroups)

SumofSquares(SS),DegreesofFreedom(df),andMeanSquares(MS)

SS(within)= (y
]
- y

)
2
n
i
]=1
I
=1
= (n

- 1)
I
=1
s

2
MS(within)=
SS(within)
uf(within)

df(within)=n
.
I

SS(between)= (y

- y)
2
n
i
]=1
I
=1
= n

(y

- y)
2 I
=1
MS(between)=
SS(between)
uf(between)

df(between)=I1

SS(total)= (y
]
- y)
2
n
i
]=1
I
=1
MS(total)=
SS(total)
uf(total)

df(total)=n
.
1

Intio

Con

Not
ofS

The
the
vari

The
The

Ifth
vari
evid
not

The
num
(wit
pict

Pva
qua

ouuction to A
nsiderthed
icethatth
S(within)a

analysiso
observatio
ation)and
Ftestfor
teststatis
hedataind
abilitywith
denceagai
belargert
Fdistribut
merator(be
thin).Wes
urefromW
aluesforth
ntitiestha
AN0vA
deviationf
eleftside
andSS(bet
(
n
i
]=1
I
=1
ofvariance
onsfromth
thevariat
ANOVA
sticforthe
dicateslarg
hingroups
nstH
O
(ift
thanthen
tionhasde
etween)an
sayF
s
~F(
Wikipediai
heFtestin
twillbeca
fromanob
y
]
isattheh
ween).It
(y
]
- y)
2
SS(total
iscentere
heirgrand
tionbetwe
ANOVAis
gedifferen
saroundgr
hegroupm
aturalvari
egreesoff
ndtheden
1
,
2
).The
illustrates
nANOVAa
alculatedf
bservation
]
- y = (y
eartofSS(
actuallyw
=
I
=1
l)=SS(w
daroundt
meaninto
eengroups
F
s
=
H
H
cesingrou
roupmean
meansare
ationofth
freedomfo
nominator
following
afewFpd
retailarea
oryou.
totheove
y
]
- y

) +
(total),and
orksout(w
(y
]
-
n
i
]=1
within)+
thisideaof
oitstwopi
s(treatmen
HS(bctwcc
HS(witbin
upmeansc
ns,F
s
willb
thesame,
hedatawit
orthe
dfs.
a
erallmean
+ (y

- y)
dtheright
withabito
y

)
2
+
I
=1
SS(betw
fbreaking
ieces:thev
ntvariation
cn)
n)

compared
belarge.B
,thevariab
thineachg
writtenin
sidehasth
ofmath)th
(y
n
i
]=1
1
ween)
downthe
variationw
n).
toeachot
Bigvalueso
bilitybetw
group).
thefollow
heanalogo
hat

- y)
2

totalvaria
withingrou
therrelativ
ofF
s
indica
weenthem
Page S
wingway:
ouspieces
ationof
ups(error
vetothe
te
should
S
Intiouuction to AN0vA Page 4

SoftwarepackagesperformingtheFtestforANOVAreturnsomethingcalledanANOVA
table.ThefollowingistheANOVAoutputfromMinitab16forthelambweightdata.Notice
wherethenumbersinthetablecomefrom.
One-way ANOVA: Diet 1, Diet 2, Diet 3

Source DF SS MS F P
Factor 2 36.0 18.0 0.77 0.491
Error 9 210.0 23.3
Total 11 246.0

S = 4.830 R-Sq = 14.63% R-Sq(adj) = 0.00%


Individual 95% CIs For Mean Based on
Pooled StDev
Level N Mean StDev --------+---------+---------+---------+-
Diet 1 3 11.000 4.359 (---------------*--------------)
Diet 2 5 15.000 4.950 (------------*-----------)
Diet 3 4 12.000 4.967 (-------------*-------------)
--------+---------+---------+---------+-
8.0 12.0 16.0 20.0

Pooled StDev = 4.830

AndtheANOVAoutputfromStatCrunch
Analysis of Variance results:
Data stored in separate columns.
Column means


ANOVA table

Column n Mean Std. Error


Diet 1 3 11 2.5166116
Diet 2 5 15 2.2135944
Diet 3 4 12 2.4832773
Source df SS MS F-Stat P-value
Treatments 2 36 18 0.7714286 0.4907
Error 9 210 23.333334
Total 11 246
Intiouuction to AN0vA Page S

ConductanANOVAforthelambdata.

Intiouuction to AN0vA Page 6

AfewfinalnotesontheonewayANOVA:
Itassumesacommonstandarddeviationforthepopulations.
NoticethatMS(within)=MS(error)=MSE=
(n
i
-1)
I
i=1
s
i
2
n.-1
isapooled(weightedoraverage)
varianceforthegroups.WeviewthisMS(error)asanestimateofthepopulationcommon
varianceacrossthetreatments.Then,theestimateofthecommonpopulationstandard
deviationis

Andthisisoftenreferredtoas
Wechecktheassumptionthatthevariationisthesameforallgroupsbeforecarryingoutan
ANOVA,possiblybylookingatsidebysideboxplots(amongotherways).
Thereareotherassumptions(andmethodsofcheckingthem)wewilldiscussintheRegression
/Correlationlecturenotes.
So,whatdowedoiftheANOVAFtestrejectsH
O
andweconcludethereisatleastone
populationmeanthatisdifferent?Then,wecanturntothemethodsunderablanketof
topicscalledmultiplecomparisonswherewemakepairwisecomparisonstodetermine
whichtreatmentsaresignificantlylarger(orsmaller)thantheothers.Healthystudyisgivento
thissetoftheories,ascarefulattentionmustbepaidtotheerrorrates.Section11.9ofyour
textgivesanintroductiontothistopic.

Você também pode gostar