


















Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!



















When we have many (more than 2) groups, we may think to
perform t-tests for μ 1
= μ 2
, then μ 1
= μ 3
, then μ 2
= μ 3
When we have many (more than 2) groups, we may think to
perform t-tests for μ 1 = μ 2 , then μ 1 = μ 3 , then μ 2 = μ 3...
Why is this not appropriate? not optimal?
When we have many (more than 2) groups, we may think to
perform t-tests for μ 1
= μ 2
, then μ 1
= μ 3
, then μ 2
= μ 3
Why is this not appropriate? not optimal?
If we perform many tests, we need to correct probability levels. If
we perform 20 tests, each with 5% probability of being positive, we
suspect some may become positive just for chance...
Tests are not independent...
When we have many (more than 2) groups, we may think to
perform t-tests for μ 1 = μ 2 , then μ 1 = μ 3 , then μ 2 = μ 3...
Why is this not appropriate? not optimal?
If we perform many tests, we need to correct probability levels. If
we perform 20 tests, each with 5% probability of being positive, we
suspect some may become positive just for chance...
Tests are not independent...
Proper way to correcting for this: analysis of variance.
We have measured a response variable Y in g groups.
Example: Yield under a control and two treatments
1
ctrl trt1 trt
Box-plots of yield
Yield
Question: Is yield di↵erent under control and treatments?
1 data from Dobson, A. J. (1983) An Introduction to Statistical Modelling in
the standard R library
ik
⇠ N(μ i
2
), i = 1,... , g (groups)
H 0 : μ i
⌘ μ,
2 > 0.
1
: di↵erences among μ i
2 > 0.
Note; if g = 2 test on equality of means (t-test).
Method: decomposition of variance
i,k
ik
i
n i
i
2
i
k
ik
i
2 .
total variation variation variation
among groups within groups
i
: mean in group i,
Y general mean.
M.C. Whitlock, Dolph Schluter, ANALISI STATISTICA DEI DATI BIOLOGICI, Zanichelli editore S.p.A. Copyright © 2010 15 | 3
Under H 0
(all μ i
equal)
2
SSamong =
2
i
n i
i
2
⇠
2
(g 1)
2
within
2
i
k
ik
i
2
⇠
2
((n 1)g )
and they are independent.
[Formulae true with equal size n of all groups]
Hence the distribution of
among
/(g 1)
within
/((n 1)g )
is known and is called F g 1 ,(n 1)g
2
A related quantity
2
=
SSamong
total
‘variance’ ‘explained’ by model
total ‘variance’
Necessarily 0 R
2 1.
HIgh R
2 and rejection of H 0 are di↵erent (though related) facts.
R-squared in the example: 0.
M.C. Whitlock, Dolph Schluter, ANALISI STATISTICA DEI DATI BIOLOGICI, Zanichelli editore S.p.A. Copyright © 2010 15 | 4
Test di significatività della differenza fra le medie
tramite il confronto con la distribuzione F
But which is the correct level of significance?
We may be comparing only groups whose means appear
particularly di↵erent. If there are 6 groups, there would be 15
possible comparisons. The probability that at least one of them
would be beyond the nominal 5% level is much higher...
One solution is called Tukey’s HSD (Honest Significant Di↵erence)
that looks at the distribution of maximum di↵erence(R command
TukeyHSD(aov(weight ~ group, data = PlantGrowth))):
di↵ lwr upr p adj
trt1-ctrl 0. 371 1. 0622161 0.3202161 0.
trt2-ctrl 0.494 0. 1972161 1.1852161 0.
trt2-trt1 0.865 0.1737839 1.5562161 0.
We can conclude that the yield with treatment 2 is significantly
di↵erent (higher) than with treatment 1.
M.C. Whitlock, Dolph Schluter, ANALISI STATISTICA DEI DATI BIOLOGICI, Zanichelli editore S.p.A. Copyright © 2010 15 | 5
Presentazione finale dei dati con il
risultato dei confronti fra gruppi: il gruppo
con etichetta a è significativamente
diverso dai gruppi con etichetta b
M.C. Whitlock, Dolph Schluter, ANALISI STATISTICA DEI DATI BIOLOGICI, Zanichelli editore S.p.A. Copyright © 2010 18 | 4
Illustrazione grafica di analisi della varianza a 2 vie con effetti additivi
da
M.C. Whitlock, Dolph Schluter, ANALISI STATISTICA DEI DATI BIOLOGICI, Zanichelli editore S.p.A. Copyright © 2010 18 | 5
da
Illustrazione grafica di analisi della varianza a 2 vie con
interazione