Professional Documents
Culture Documents
H0 : µΑ = µΒ
Basic Stats. Revision
Assumptions and requirements
›All data are independent (no data point can
appear twice) (APPLIES TO ALL TESTS)
›Variances must be homogenous (can be fixed
using transformations)
›For ANOVA and t tests the assumption of a
normal distribution of the data is least important
and can effectively be ignored
1
H0 : µΑ = µΒ
Errors
Accept Reject
Type I error
Null Hyp. True
by convention
p(type I) = α
= 0.05
H0 : µΑ = µΒ A t-test
µA µB 4
2
H0 : µΑ = µΒ
A Basic t-test
› Investigation into group size in kangaroos. The
literature says that the average group size is 10
H0 : µΑ = µΒ
A Basic t-test
› 2 ways of doing this
3
H0 : µΑ = µΒ
A Basic t-test
H0 : µΑ = µΒ
A Basic t-test
› Use a statistical programme
› Is NOT a spreadsheet
4
9
10
5
Code Label
Grouping
(will appear in print-outs)
11
12
6
13
7
H0 : µΑ = µΒ
A Basic t-test
› 2-sample t-test to compare 2 means
15
›Collect data from 20 groups in each habitat
16
8
17
18
9
P > 0.05
H0 : µΑ = µΒ
ANOVA
By the end of this lecture you should
understand
›Why we need ANOVA
›Entering data and running a 1-way ANOVA
›Interpreting a 1-way ANOVA
›Entering data and running a 2 way
orthogonal ANOVA
›Interpretation of such an ANOVA
20
10
H0 : µΑ = µΒ
Basic Stats. Revision
Assumptions and requirements
›All data are independent (no data point can
appear twice) (APPLIES TO ALL TESTS)
›Variances must be homogenous (can be fixed
using transformations)
›For ANOVA and t tests the assumption of a
normal distribution of the data is least important
and can effectively be ignored
21
H0 : µΑ = µΒ Why ANOVA?
22
µA µB
11
H0 : µΑ = µΒ t tests
»3 means, now have 11 possible tails......
OW!
»Instead of using 1 test, could use 3 tests
» A vs B, A vs C, and B vs C
»This approach... 2 problems...
» 1. Problems of independence
» 2. Increased probability of type I error (on 3
tests rises to 0.14 from 0.05)
»Can get round pt 2 by corrections
(Bonferroni), but this increases probability of
23
type II error and gives reduced power
H0 : µΑ = µΒ
ANOVA
24
12
H0 : µΑ = µΒ Language Break!
»Response variable: the thing you are measuring
»Most people think in terms of treatment(s)
»Clumsy and ambiguous term
»Example.... To investigate the effect of growth
enhancers on the cattle.
H0 : µΑ = µΒ
1-way ANOVA on SPSS
»Model: Temperature controls the
metamorphosis rate of barnacles cyprids
»Hypothesis: If temperature increases, time
taken for metamorphosis is reduced (H1:
µtime at high T0C < µtime at medium T0C <
µtime at low T0C
26
13
Double click on var0001
to get variable view and
name vars
27
28
14
29
H0 : µΑ = µΒ
1-way ANOVA on SPSS
»CRITICAL ASSUMPTIONS
15
H0 : µΑ = µΒ
1-way ANOVA on SPSS
31
H0 : µΑ = µΒ
Heterogeneity of variance
» Analogous to looking for traffic when
crossing the road
16
Post-hoc tests
Single test
3 means though
A≠B≠C
A=B≠C
A≠B=C
A=B=C
C≠A=B
C=A=B
Use a Post-hoc
test, lots… SNK 33
34
17
H0 : µΑ = µΒ
1-way ANOVA on SPSS
METAM
Sum of
Squares df Mean Square F Sig.
Between Groups 6174.050 2 3087.025 75.014 .000
Within Groups 1111.125 27 41.153
Total 7285.175 29
Source SS df MS F P
Temperature 6174.1 2 3087.03 75.01 P <0.001
Residual 1111.1 27 41.15
Total 7285.2 29
50
45
Time Taken (Hours) to metamorphosis
40
35
30
25
20
15
10
0
Low Medium High
Temperature
36
18
2-way Factorial ANOVA on
SPSS
»Model: People disturb birds, so kestrels will be
less successful in foraging in human utilised areas.
Additionally complex vegetation will mean prey is
harder to see, thus reducing success rate.
»Hypotheses:
» In highly disturbed areas kestrels will have less
success at foraging than in medium disturbed
areas, and this will be less than undisturbed
areas.
» In complex vegetation areas kestrels will have
less success at foraging than in grassy areas.37
38
19
2-way Factorial ANOVA on
SPSS
»Paste data from Excel into SPSS, code both
factors using values box in variable view
39
40
20
41
{
42
21
Source SS df MS F P
Vegetation Ve 4556.3 1 4556.25 52.90 < 0.001
Disturbance Di 118.2 2 59.11 0.69 > 0.5
Ve x Di 194.7 2 97.33 1.13 > 0.3
Residual 2583.8 30 86.13
Total 15523.0 36
40
35
High Dist
Success Rates (Kills per day)
30 Med Dist
Low dist
25
20
Interpret?
15
10
0
Grass Complex
43
Vegetation
44
22
2-way Factorial ANOVA : SPSS
Source SS df MS F P
Vegetation Ve 850.7 1 850.69 8.71 < 0.01
Disturbance Di 840.4 2 420.19 4.3 < 0.05
Ve x Di 1395.7 2 697.86 7.15 < 0.01
Residual 2928.8 30 97.63
Total 13269.0 36
45
30
low Dist
Success Rates (Kills per day)
25 Med Dist
High dist
20
15
10
0
Grass Complex
Vegetation
46
23
2-way Factorial ANOVA on
H0 : µΑ = µΒ SPSS
»What have I missed?
Homogeneity of Variance
Test Homogeneity of
Variance
Non Significant Significant
Result Result
Do ANOVA Transform Data
and Interpret and re-test
Fixed Problem
of heterogeneity?
Yes No
Do ANOVA Do ANOVA
and interpret
ANOVA NS ANOVA Sig.
Absolutely Fine
Design Large?
N > 30, a > 6
Yes No
Probably OK Interpret with
caution, treat as pilot 48
24
Summary and survival guide
›ANOVA is more powerful in terms of flexibility
› data must be independent
› variances must be homogeneous
› Normality is not important
›Nearly all biological hypotheses are about
interactions... Know what that means!
›SPSS is useful for general purposes
›All detailed in your refs + Dytham, C. (1999)
Choosing and using statistics. Blackwell. (note he
is wrong about assumptions of normality.. Ignore it!)
49
25