10 Anova

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

9/3/2018

ANOVA

www.utm.my innovative ● entrepreneurial ● global

ANOVA – Independent samples

www.utm.my innovative ● entrepreneurial ● global

1
9/3/2018

The Logic and the Process of Analysis of Variance

• ANOVA can be used in situations where there are


two or more means being compared, whereas the t
tests are limited to only two means are involved.
• These situations would require a series of several t
tests to evaluate all of the mean differences. (t test
can compare only 2 means at a time.)
• Although each t test can be done with a specific α-
level (risk of Type I error), the α-levels accumulate
over a series of tests so that the final
experimentwise α-level can be quite large

www.utm.my innovative ● entrepreneurial ● global

• ANOVA allows researcher to evaluate all of the mean


differences in a single hypothesis test using a single
α-level and, thereby, keeps the risk of a Type I error
under control no matter how many different means
are being compared.

www.utm.my innovative ● entrepreneurial ● global

2
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

• The test statistic for ANOVA is an F-ratio, which is a


ratio of two sample variances. In the context of
ANOVA, the sample variances are called mean
squares, or MS values.
• The top of the F-ratio MSbetween measures the size of
mean differences between samples. The bottom of
the ratio MSwithin measures the magnitude of
differences that would be expected without any
treatment effects.

www.utm.my innovative ● entrepreneurial ● global

3
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

4
9/3/2018

The Logic and the Process of Analysis of Variance


(cont.)

www.utm.my innovative ● entrepreneurial ● global

Example
• One experiment call examining learning
performance under three temperature
condition. The dependent variable is the number
of problem solved correctly.
Temperature conditions Is there any
50o 70o 90o significant
0 4 1 different
between three
1 3 2
groups at alpha
3 6 2
0.05?
1 3 0
0 4 0

www.utm.my innovative ● entrepreneurial ● global

5
9/3/2018

Steps
1. State the hypothesis
Ho: µ1= µ2= µ3
H1: At least one of the treatment means is different.
2. Find the critical value with α = 0.05 and F(between, within)

4. Make decision

www.utm.my innovative ● entrepreneurial ● global

Example 1

Temperature conditions
50o 70o 90o
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0

www.utm.my innovative ● entrepreneurial ● global

6
9/3/2018

Example

Temperature conditions
50o 70o 90o
0 4 1
1 3 2 G=30
3 6 2 N=15
1 3 0 k=3
0 4 0
T1=5 T2=20 T3=5
SS1=6 SS2=6 SS3=4
n1=5 n2=5 n3=5

www.utm.my innovative ● entrepreneurial ● global

Source SS df MS F
Between SSbetween dfbetween
subject subject
Within SSwithin dfwithin
treatment
Total SStotal dftotal

www.utm.my innovative ● entrepreneurial ● global

7
9/3/2018

SPSS OUTPUT

ANOVA
ANSWER
Sum of Mean
Squares df Square F Sig.
Between
Groups
Within Groups

Total

www.utm.my innovative ● entrepreneurial ● global

SPSS OUTPUT

ANOVA
ANSWER
Sum of Mean
Squares df Square F Sig.
Between
Groups 30.00 2 15.00 11.25 .002
Within Groups
16.00 12 1.33
Total
46.00 14

www.utm.my innovative ● entrepreneurial ● global

8
9/3/2018

Analysis of Variance and Post Tests

• The null hypothesis for ANOVA states that for the


general population there are no mean differences
among the treatments being compared; H0: μ1 = μ2 =
μ3 = . . .
• When the null hypothesis is rejected, the conclusion
is that there are significant mean differences.
• However, the ANOVA simply establishes that
differences exist, it does not indicate exactly which
treatments are different.

www.utm.my innovative ● entrepreneurial ● global

Analysis of Variance and Post Tests

• With more than two treatments, this creates a


problem. Specifically, you must follow the ANOVA
with additional tests, called post tests, to determine
exactly which treatments are different and which are
not.
• The Scheffe test and Tukey=s HSD are examples of
post tests.
• These tests are done after an ANOVA where H0 is
rejected with more than two treatment conditions.
The tests compare the treatments, two at a time, to
test the significance of the mean differences.

www.utm.my innovative ● entrepreneurial ● global

9
9/3/2018

POST -HOC
Multiple Comparisons

ANSWER
Tukey HSD
Mean 95% Confidence Interval
Difference (I- Lower Upper
(I) GROUP (J) GROUP J) Std. Error Sig. Bound Bound
50 70 -3.000* .730 .004 -4.95 -1.05
90 .000 .730 1.000 -1.95 1.95
70 50 3.000* .730 .004 1.05 4.95
90 3.000* .730 .004 1.05 4.95
90 50 .000 .730 1.000 -1.95 1.95
70 -3.000* .730 .004 -4.95 -1.05
*. The mean difference is significant at the 0.05 level.

www.utm.my innovative ● entrepreneurial ● global

Measuring Effect Size for an Analysis of Variance

• To supplement the hypothesis test, it is


recommended that you calculate a measure of effect
size.
• For an analysis of variance the common technique
for measuring effect size is to compute the
percentage of variance that is accounted for by the
treatment effects.

www.utm.my innovative ● entrepreneurial ● global

10
9/3/2018

Measuring Effect Size for an Analysis of Variance

• For the t statistics, this percentage was identified as


r2, but in the context of ANOVA the percentage is
identified as η2 (the Greek letter eta, squared).
• The formula for computing effect size is:

SSbetween treatments
η2 = ───────────
SStotal

www.utm.my innovative ● entrepreneurial ● global

Measuring Effect Size for an Analysis of Variance

30
η2 = ─────────── = 0.65
46

www.utm.my innovative ● entrepreneurial ● global

11
9/3/2018

Example 2

Treatment
A B C
2 3 7
6 7 5
2 6 4
6 4 8

www.utm.my innovative ● entrepreneurial ● global

Example 2

Treatment
A B C
2 3 7 G=60
6 7 5 N=12
2 6 4
k=3
6 4 8
T1=16 T2=20 T3=24
SS1=16 SS2=10 SS3=10
n1=4 n2=4 n3=4

www.utm.my innovative ● entrepreneurial ● global

12
9/3/2018

Source SS df MS F
Between SSbetween dfbetween
subject subject
Within SSwithin dfwithin
treatment
Total SStotal dftotal

www.utm.my innovative ● entrepreneurial ● global

One Way Anova


Source SS df MS F
Between SSbetween dfbetween
subject subject
Within SSwithin dfwithin
treatment
Total SStotal dftotal

www.utm.my innovative ● entrepreneurial ● global

13
9/3/2018

SPSS OUTPUT

ANOVA
ANSWER
Sum of Mean
Squares df Square F Sig.
Between
Groups
Within Groups

Total

www.utm.my innovative ● entrepreneurial ● global

SPSS OUTPUT

ANOVA
ANSWER
Sum of Mean
Squares df Square F Sig.
Between
Groups 8 2 4 1 0.405
Within Groups
36 9 4
Total
44 11

www.utm.my innovative ● entrepreneurial ● global

14
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

ANOVA TABLE
ANSWER
Sum of Mean
Squares df Square F
Between
Groups
Within Groups

Total

www.utm.my innovative ● entrepreneurial ● global

15
9/3/2018

ANOVA TABLE

ANSWER
Sum of Mean
Squares df Square F
Between
Groups 468.7 2 234.35 28.53
Within Groups
345 42 8.21
Total
813.7 44

www.utm.my innovative ● entrepreneurial ● global

SPSS
ANOVA
Independent-measures

www.utm.my innovative ● entrepreneurial ● global

16
9/3/2018

Is there any significant differences


between Mathematics Dec score among 4
ethnic group?

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

17
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

18
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

Reject null hypothesis

www.utm.my innovative ● entrepreneurial ● global

19
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

20
9/3/2018

SPSS- FOR ORDINAL DATA

SPSS
Non parametric
Independent-measured
Kruskal-Wallis Test
For ordinal data
www.utm.my innovative ● entrepreneurial ● global

Note
• Ratio or interval data can be ranked and can
consider as an ordinal data.
• When the data cannot satisfied the
requirement to run ANOVA, go for non
parametric.

www.utm.my innovative ● entrepreneurial ● global

21
9/3/2018

Is there any significant differences


between Mathematics Jan score among 4
ethnic groups?

www.utm.my innovative ● entrepreneurial ● global

SPSS

Data MJAN is not normally distributed.


Go for non parametric test

www.utm.my innovative ● entrepreneurial ● global

22
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

23
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

Reject null hypothesis

www.utm.my innovative ● entrepreneurial ● global

24
9/3/2018

ANOVA
Repeated-Measures

www.utm.my innovative ● entrepreneurial ● global

The Logical Background for a Repeated-


Measures ANOVA

• The repeated-measures design eliminates individual


differences from the between-treatments variability
because the same subjects are used in every
treatment condition.
• The result is a test statistic similar to the
independent-measures F-ratio but with all individual
differences removed.

www.utm.my innovative ● entrepreneurial ● global

25
9/3/2018

Comparing Independent-Measures and


Repeated-Measures ANOVA

• The independent-measures analysis is used in


research situations for which there is a separate
sample for each treatment condition.
• The analysis compares the mean square (MS)
between treatments to the mean square within
treatments in the form of a ratio
MS between treatments
F = ───────────
MS within treatments

www.utm.my innovative ● entrepreneurial ● global

Comparing Independent-Measures and


Repeated-Measures ANOVA

• What makes the repeated-measures analysis different


from the independent-measures analysis is the
treatment of variability from individual differences.
The independent-measures F ratio (Chapter 13) has the
following structure:
MS between treatments treatment effect + error (including individual differences)
F = ──────────── = ───────────────────────────────────
MS within error (including individual differences)

• In this formula, when the treatment effect is zero (H0


true), the expected F ratio is one.

www.utm.my innovative ● entrepreneurial ● global

26
9/3/2018

Comparing Independent-Measures and


Repeated-Measures ANOVA

• In the repeated-measures study, there are no


individual differences between treatments because
the same individuals are tested in every treatment.
• This means that variability due to individual
differences is not a component of the numerator of
the F ratio.
• Therefore, the individual differences must also be
removed from the denominator of the F ratio to
maintain a balanced ratio with an expected value of
1.00 when there is no treatment effect.

www.utm.my innovative ● entrepreneurial ● global

Comparing Independent-Measures and


Repeated-Measures ANOVA

• That is, we want the repeated-measures F-


ratio to have the following structure:

treatment effect + error (without individual differences)


F = ────────────────────────────────────
error (with individual differences removed)

www.utm.my innovative ● entrepreneurial ● global

27
9/3/2018

Comparing Independent-Measures and


Repeated-Measures ANOVA
• This is accomplished by a two-stage analysis. In the
first stage, total variability (SS total) is partitioned into
the between-treatments SS and within-treatments
SS.
• The components for between-treatments variability
are the treatment effect (if any) and error.
• Individual differences do not appear here because
the same sample of subjects serves in every
treatment. On the other hand, individual differences
do play a role in SS within because the sample contains
different subjects.

www.utm.my innovative ● entrepreneurial ● global

Comparing Independent-Measures and


Repeated-Measures ANOVA

• In the second stage of the analysis, we


measure the individual differences by
computing the variability between subjects, or
SS between subjects
• This value is subtracted from SS within leaving a
remainder, variability due to experimental
error, SS error

www.utm.my innovative ● entrepreneurial ● global

28
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

Example 1

Participant 24H 36H 48H


A 0 0 6
B 1 3 5
C 0 1 5
D 4 5 9
E 0 1 5

www.utm.my innovative ● entrepreneurial ● global

29
9/3/2018

Steps
1. State the hypothesis
Ho: µ1= µ2= µ3
H1: At least one of the treatment means is different.
2. Find the critical value with α = 0.05

4. Make decision

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

30
9/3/2018

Example 1

Participant 24H 36H 48H P Total


A 0 0 6 6 N=15
B 1 3 5 9 G=45
C 0 1 5 6
D 4 5 9 18
E 0 1 5 6
T 5 10 30
SS 12 16 12

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

31
9/3/2018

ANOVA table

Source SS df MS F
Between SSbetween dfbetween

Within SSwithin dfwithin


Between Subject Ssbetween subject dfbetween subject
Error SSerror dferror

Total SStotal dftotal

www.utm.my innovative ● entrepreneurial ● global

ANOVA table

Source SS df MS F
Between

Within
Between Subject

Error

Total

www.utm.my innovative ● entrepreneurial ● global

32
9/3/2018

ANOVA table

Source SS df MS F
Between 70 2 35 70

Within 40 12
Between Subject 36 4
Error 4 8 0.5
Total 110 14

www.utm.my innovative ● entrepreneurial ● global

SPSS

Tests of Within-Subjects Effects

Measure:MEASURE_1

Type III Sum of


Source Squares df Mean Square F Sig.
factor1 Sphericity Assumed 70.000 2 35.000 70.000 .000
Greenhouse-Geisser 70.000 1.000 70.000 70.000 .001
Huynh-Feldt 70.000 1.000 70.000 70.000 .001
Lower-bound 70.000 1.000 70.000 70.000 .001
Error(factor1) Sphericity Assumed
4.000 8 .500
Greenhouse-Geisser
4.000 4.000 1.000
Huynh-Feldt
4.000 4.000 1.000
Lower-bound
4.000 4.000 1.000

www.utm.my innovative ● entrepreneurial ● global

33
9/3/2018

Example 2
Depression Scores
Sample Before Therapy After Therapy 6 Month
Follow up
A 71 53 55
B 62 45 44
C 82 56 61
D 77 50 46
E 81 54 55

www.utm.my innovative ● entrepreneurial ● global

Example 2
Depression Scores
Sample Before Therapy After Therapy 6 Month Person
Follow up Total
A 71 53 55 179 n=5
B 62 45 44 151 K=3
C 82 56 61 199 N=15
D 77 50 46 173 G=892
E 81 54 55 190
T=373 T=258 T=261
SS=273.2 SS=73.2 SS=198.8

www.utm.my innovative ● entrepreneurial ● global

34
9/3/2018

ANOVA table

Source SS df MS F
Between SSbetween dfbetween

Within SSwithin dfwithin


Between Subject Ssbetween subject dfbetween subject
Error SSerror dferror

Total SStotal dftotal

www.utm.my innovative ● entrepreneurial ● global

ANOVA table

Source SS df MS
Between

Within
Between Subject

Error

Total

www.utm.my innovative ● entrepreneurial ● global

35
9/3/2018

ANOVA table

Source SS df MS
Between 1718.5 2 859.25 69.6

Within 545.2 12
Between Subject 446.4 4
Error 98.8 8 12.35
Total 2263.7 14

www.utm.my innovative ● entrepreneurial ● global

Measuring Effect Size for the Repeated-


Measures Analysis of Variance

• The formula for computing effect size for a


repeated-measures ANOVA is:

SS between treatments SS between treatments


η2 = ───────────── = ──────────────
SS total - SS between subjects SS error + SS between treatments

www.utm.my innovative ● entrepreneurial ● global

36
9/3/2018

SPSS
ANOVA
Repeated-Measures

www.utm.my innovative ● entrepreneurial ● global

Is there any significant differences in


Mathematics score for Jan, June and Dec?

www.utm.my innovative ● entrepreneurial ● global

37
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

38
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

39
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

Reject null hypothesis

www.utm.my innovative ● entrepreneurial ● global

40
9/3/2018

SPSS-Ordinal data

SPSS
Non Parametric
Repeated-Measures
Friedman Test

www.utm.my innovative ● entrepreneurial ● global

Is there any significant differences on


perception of favourite teacher among
student for Jan, June and Dec?

www.utm.my innovative ● entrepreneurial ● global

41
9/3/2018

Data

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

42
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

Ranks

Mean Rank
SUM OF FI FOR JAN 2.75
SUM OF FI FOR JUN 1.63
SUM OF FI FOR DEC 1.62

Test Statisticsa
N 42
Chi-Square 38.662
df 2
Asymp. Sig. .000
a. Friedman Test

www.utm.my innovative ● entrepreneurial ● global

43
9/3/2018

Reject null hypothesis

www.utm.my innovative ● entrepreneurial ● global

Two Factor ANOVA (Independent Measures)

• Also known as factorial design


• Involved two independent variables (factor A
and factor B) one dependent variable (M1,M2,M3,M4)

FACTOR A
YES NO
LOW M1 M3
FACTOR B
HIGH M2 M4

• M = mean
www.utm.my innovative ● entrepreneurial ● global

44
9/3/2018

FACTOR A
YES NO
LOW M1 M3
FACTOR B
HIGH M2 M4

• Hypothesis Null 1: No different mean between


group LOW and HIGH?
• Hypothesis Null 2: No different mean between
group YES and NO?
• Hypothesis Null 3: No interaction between factor
A & B.

www.utm.my innovative ● entrepreneurial ● global

• The mean differences between columns or


mean differences between rows simply
describe the main effects for two-factor study.
• Interaction between two factors occurs
whenever the mean differences between
individual treatment conditions, or cell, are
different from what would be predicted from
the overall main effects of the factors

www.utm.my innovative ● entrepreneurial ● global

45
9/3/2018

Factor A: Ethnic group


Factor B: Future study place
Dependent variable: Math Score

www.utm.my innovative ● entrepreneurial ● global

1. No mean different between ethnic group


2. No mean different between choices of future
study place.
3. No interaction between future study place and
ethnic group

www.utm.my innovative ● entrepreneurial ● global

46
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

47
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

www.utm.my innovative ● entrepreneurial ● global

48
9/3/2018

www.utm.my innovative ● entrepreneurial ● global

With alpha 0.05


All three hypothesis fail to reject.

www.utm.my innovative ● entrepreneurial ● global

49

You might also like