152
Psych 230 Psychological Measurement and Statistics Pedro Wolf November 18, 2009

Psych 230 Psychological Measurement and Statistics

  • Upload
    liv

  • View
    38

  • Download
    0

Embed Size (px)

DESCRIPTION

Psych 230 Psychological Measurement and Statistics. Pedro Wolf November 18, 2009. This Time…. Analysis of Variance (ANOVA) Concepts of variability Why bother with ANOVA? Conducting a test. Statistical Testing. Decide which test to use State the hypotheses (H 0 and H A ) - PowerPoint PPT Presentation

Citation preview

Page 1: Psych 230 Psychological Measurement  and Statistics

Psych 230

Psychological Measurement and Statistics

Pedro Wolf

November 18, 2009

Page 2: Psych 230 Psychological Measurement  and Statistics

This Time….

• Analysis of Variance (ANOVA)

• Concepts of variability

• Why bother with ANOVA?

• Conducting a test

Page 3: Psych 230 Psychological Measurement  and Statistics

Statistical Testing

1. Decide which test to use2. State the hypotheses (H0 and HA)

3. Calculate the obtained value4. Calculate the critical value (size of )5. Make our conclusion

Page 4: Psych 230 Psychological Measurement  and Statistics

Statistical Testing

1. Decide which test to use2. State the hypotheses (H0 and HA)

3. Calculate the obtained value4. Calculate the critical value (size of )5. Make our conclusion6. Conduct post-hoc tests

Page 5: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance (ANOVA)

Page 6: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• In this statistical test, we are interested in seeing if

there are significant differences between more

than two groups

• In an experiment involving only two conditions of

the independent variable, you can use either a t-

test or the ANOVA

Page 7: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• We will look at the variance within each group and

compare that to the variance found between the

groups

• Remember: Variance is the degree to which scores

are dispersed in our data

Page 8: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• Remember: H0 is that all the group means in our

experiment are the same

– any difference between them is due to random chance

• H1 is that there is a difference between our group

means

– a difference that is so unlikely to have happened by chance

that we conclude it is due to the independent variable

Page 9: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• There is always variability in our data

• This variability can be due to two factors:

1. The independent variable• Systematic factors

2. Error variance• Random factors

Page 10: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• So, to draw a conclusion about whether the

independent variable makes a difference to the

dependent variable, we need to know what kind

of variance there is in our data

– variance due to the independent variable (systematic)

– variance due to random factors (error)

Page 11: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• To assess this, we need to look at the variance both

within each of our experimental conditions and

also at the variance between each of our

experimental conditions

• Assume H0 is true - there is no effect of our

independent variable

• What type of variance might we expect to see?

Page 12: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• Example: we want to see if people differ in their shoe

size by where they sit in the class

– three groups of students: front row, middle row and back

row

– expect to find significant differences in shoe size?

• Front row: vary in their shoe size: 6,8,5,4,7

• Middle row: vary in their shoe size : 9,9,4,6,7

• Back row: vary in their shoe size : 4,6,12,10,8

Page 13: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 9 4

8 9 6

5 4 12

4 6 10

7 7 8

6 7 8 Mean=7

Page 14: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 9 4

8 9 6

5 4 12

4 6 10

7 7 8

6 7 8 Mean=7

Total variance

Page 15: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 9 4

8 9 6

5 4 12

4 6 10

7 7 8

6 7 8 Mean=7

Variance within the groups

Total variance

Page 16: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

Variance between the groups

Back Middle Front

6 9 4

8 9 6

5 4 12

4 6 10

7 7 8

6 7 8 Mean=7

Variance within the groups

Total variance

Page 17: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 9 4

8 9 6

5 4 12

4 6 10

7 7 8

6 7 8 Mean=7

Total Variance =

Variance between + Variance within

Variance within the groups

Total variance

Variance between the groups

Page 18: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• So, when H0 is actually true, we should expect the

same amount of variance both within each group

and between the groups

• If we divide Variancebetween by Variancewithin, we

should get?

• If H0 is true, this ratio should be close to 1

Page 19: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• How about if H1 is actually true?

• In this case, we know the independent variable is

having some effect

• So, we should expect more variance between each

group than there is within each group

Page 20: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• Example: we want to see if people differ in their

attendance by where they sit in the class

– front row, middle row and back row

– expect to find significant differences in attendance?

• Front row: vary in their attendance: 6,5,7,6,6

• Middle row: vary in their attendance: 7,8,6,7,7

• Back row: vary in their attendance: 8,8,7,9,8

Page 21: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

Variance between the groups

Back Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

Total Variance =

Variance between + Variance within

Variance within the groups

Total variance

Page 22: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

• When HA is true, we have more variance between

each group than there is within each group

• If we divide Variancebetween by Variancewithin, we should

get?

• If HA is true, this ratio should be more than 1

– the F-ratio

Page 23: Psych 230 Psychological Measurement  and Statistics

ANOVA

• A one-way ANOVA is performed when only one

independent variable is tested in the experiment

• Example: we are interested in the differences

between freshmen, sophomores and juniors on

tests of socialization

– dependent variable: socialization scores

– independent variable: class standing

Page 24: Psych 230 Psychological Measurement  and Statistics

ANOVA

• A two-way ANOVA is performed when two

independent variables are tested in the experiment

• Example: we are interested in the differences

between male and female freshmen, sophomores

and juniors on tests of socialization

– dependent variable: socialization scores

– independent variable 1: class standing

– independent variable 2: gender

Page 25: Psych 230 Psychological Measurement  and Statistics

ANOVA

• When an independent variable is studied using independent samples in all conditions, it is called a between-subjects factor

• A between-subjects factor involves using the formulas for a between-subjects ANOVA

Page 26: Psych 230 Psychological Measurement  and Statistics

ANOVA

• When a factor is studied using related (dependent) samples in all levels, it is called a within-subjects factor

• This involves a set of formulas called a within-subjects ANOVA

Page 27: Psych 230 Psychological Measurement  and Statistics

ANOVA

Page 28: Psych 230 Psychological Measurement  and Statistics

ANOVA

Page 29: Psych 230 Psychological Measurement  and Statistics

ANOVA - assumptions

1. All conditions contain independent samples

2. The dependent scores are normally distributed, interval or ratio score

3. The variances of the populations are homogeneous

Page 30: Psych 230 Psychological Measurement  and Statistics

ANOVA - why bother?

• We want to see if there are differences between our three groups:– Freshmen

– Sophomores

– Juniors

• Why not just do a bunch of t-tests?– Freshmen vs. Sophomores– Freshmen vs. Juniors– Sophomores vs. Juniors

Page 31: Psych 230 Psychological Measurement  and Statistics

ANOVA - experiment-wise error

• The overall probability of making a Type I error somewhere in an experiment is call the experiment-wise error rate

• When we use a t-test to compare only two means in an experiment, the experiment-wise error rate equals

Page 32: Psych 230 Psychological Measurement  and Statistics

ANOVA - experiment-wise error

• When there are more than two means in an experiment, the multiple t-tests result in an experiment-wise error rate that is much larger than the we have selected– Freshmen vs. Sophomores: =0.05– Freshmen vs. Juniors: =0.05– Sophomores vs. Juniors: =0.05– experiment-wise error rate = 0.05+0.05+0.05=approx 0.15

• Using the ANOVA allows us to compare the means from all levels of the factor and keep the experiment-wise error rate equal to

Page 33: Psych 230 Psychological Measurement  and Statistics

Conducting an ANOVA

Page 34: Psych 230 Psychological Measurement  and Statistics

1. Decide which test to use

• Are we comparing a sample to a population?– Yes: Z-test if we know the population standard deviation– Yes: One-sample T-test if we do not know the population std dev– No: Keep looking

• Are we looking for the difference between samples?– Yes: How many samples are we comparing?

• Two: Use the Two-sample T-test– Are the samples independent or related?

» Independent: Use Independent Samples T-test» Related: Use Related Samples T-test

• More than Two: Use Anova test

Page 35: Psych 230 Psychological Measurement  and Statistics

2. State the Hypotheses

• H0 : 1 = 2 = ……. = k

– there is no difference in the means

• HA : not all s are equal – there is a difference between some of the means

• Only conduct two-tailed tests using ANOVA

Page 36: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

• The statistic for the ANOVA is F

• When Fobt is significant, this indicates only that somewhere among the means at least two of them differ significantly

• It does not indicate which groups differ significantly

• When the F-test is significant, we perform post hoc comparisons (step 6)

Page 37: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

• Remember, we are trying to compare the between group variance to the within group variance

• We use the mean squares to calculate this

• The mean square within groups is an estimate of the variability in scores as measured by differences within the conditions

• The mean square between groups is an estimate of the differences in scores that occurs between the levels in a factor

Page 38: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

• The F-ratio is therefore the mean square between groups divided by the mean square within groups

Page 39: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

• The F-ratio is therefore the mean square between groups divided by the mean square within groups

wn

bnobt MS

MSF

Page 40: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

• The F-ratio is therefore the mean square between groups divided by the mean square within groups

• When H0 is true, Fobt should be close to 1

• When HA is true, Fobt should be greater than 1

wn

bnobt MS

MSF

Page 41: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

• The ANOVA table:

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Page 42: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

wn

bnobt MS

MSF

Page 43: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

wn

bnobt MS

MSF

bn

bnbn df

SSMS

wn

wnwn df

SSMS

Page 44: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

wn

bnobt MS

MSF

bn

bnbn df

SSMS

wn

wnwn df

SSMS

dftot= N - 1

dfwn= N - k

dfbn= k - 1

Page 45: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

wn

bnobt MS

MSF

bn

bnbn df

SSMS

wn

wnwn df

SSMS

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 46: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 47: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 48: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751 dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 49: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 50: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 51: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Page 52: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Page 53: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

= [(302/5) + (352/5) + (402/5)] - (1052/15)

= [(900/5) + (1225/5) + 1600/5)] - (11025/15)

= [180 + 245 + 320] - (735)

= 745 - 735 = 10

Page 54: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

= [(302/5) + (352/5) + (402/5)] - (1052/15)

= [(900/5) + (1225/5) + 1600/5)] - (11025/15)

= [180 + 245 + 320] - (735)

= 745 - 735 = 10

Page 55: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

N

XXSS

2tot2

tottot

)(

Page 56: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

= (751) - (1052/15)

= 751 - 735

= 751 - 735 = 16

N

XXSS

2tot2

tottot

)(

Page 57: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total 16 dftot

= (751) - (1052/15)

= 751 - 735

= 751 - 735 = 16

N

XXSS

2tot2

tottot

)(

Page 58: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total 16 dftot

= 16 - 10

= 6

bntotwn SSSSSS

Page 59: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within 6 dfwn MSwn

Total 16 dftot

Page 60: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 dfbn MSbn Fobt

Within 6 dfwn MSwn

Total 16 dftot

= 3 - 1

= 2

dfbn= k - 1

Page 61: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 dfwn MSwn

Total 16 dftot

= 3 - 1

= 2

dfbn= k - 1

Page 62: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 dfwn MSwn

Total 16 dftot

= 15 - 3

= 12

dfwn= N - k

Page 63: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 12 MSwn

Total 16 dftot

= 15 - 3

= 12

dfwn= N - k

Page 64: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 12 MSwn

Total 16 dftot

= 15 - 1

= 14

dftot= N - 1

Page 65: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 12 MSwn

Total 16 14

= 15 - 1

= 14

dftot= N - 1

Page 66: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 12 MSwn

Total 16 14

Page 67: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 MSbn Fobt

Within 6 12 MSwn

Total 16 14

= 10 / 2

= 5

bn

bnbn df

SSMS

Page 68: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 Fobt

Within 6 12 MSwn

Total 16 14

= 10 / 2

= 5

bn

bnbn df

SSMS

Page 69: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 Fobt

Within 6 12 MSwn

Total 16 14

= 6 / 12

= 0.5

wn

wnwn df

SSMS

Page 70: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 Fobt

Within 6 12 0.5

Total 16 14

= 6 / 12

= 0.5

wn

wnwn df

SSMS

Page 71: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 Fobt

Within 6 12 0.5

Total 16 14

Page 72: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 Fobt

Within 6 12 0.5

Total 16 14

= 5 / 0.5

= 10

wn

bnobt MS

MSF

Page 73: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 10

Within 6 12 0.5

Total 16 14

= 5 / 0.5

= 10

wn

bnobt MS

MSF

Page 74: Psych 230 Psychological Measurement  and Statistics

Analysis of VarianceBack Middle Front

6 7 8

5 8 8

7 6 7

6 7 9

6 7 8

6 7 8 Mean=7

∑X=30 ∑X=35 ∑X=40 ∑Xtot=105

∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751

n1=5 n2=5 n3=5 N = 15k=3

Source Sum of Squares

df Mean Squares

F

Between 10 2 5 10

Within 6 12 0.5

Total 16 14

Page 75: Psych 230 Psychological Measurement  and Statistics

4. Calculate the critical value

• Assume =0.05• Always a two-tail test with ANOVA

• dfbetween = k - 1• dfwithin = N - k

• k is the number of levels, or groups• N is the total number of subjects

df betweendf within 1 2 3 4 5 12 0.05 4.75 3.88 3.49 3.26 3.11

Page 76: Psych 230 Psychological Measurement  and Statistics

Fcrit and Fobt

Fcrit= 3.88

Fobt= 10

Page 77: Psych 230 Psychological Measurement  and Statistics

5. Make our Conclusion

• Fcrit = 3.88• Fobt = 10

• If Fobt is outside the rejection region, we retain H0

• If Fobt is inside the rejection region, we reject H0 and accept HA

• We conclude that there is a significant difference between some of our groups– but which groups?

Page 78: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

• To determine which means differ from each other significantly, we conduct post-hoc tests

• Post hoc comparisons are like t-tests

– we compare all possible pairs of means from a factor, one pair at a time

• There are many possible post-hoc tests to use:

– Tukey’s HSD

– Scheffe

– Bonferroni

Page 79: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

• When the n’s in all levels of the factor are equal, we can use Tukey’s HSD test

– “honestly significant difference”

• Calculate the difference between each pair of means

• Compare each difference between the means to the HSD

• If the absolute difference between two means is greater than the HSD, then these means differ significantly

Page 80: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

• Calculating the HSD:

where qk is found using the appropriate table

n

MSqHSD k

wn)(

Page 81: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

HSD = (qk) [√(MSwn/n)]

qk: Look up Table L pg. 562 - Need:

– k (number of means being compared)

– dfwn

= (3.77) [√(0.5/5)]

= (3.77) [√(0.1)]

= (3.77) (0.316)

= 1.19

n

MSqHSD k

wn)(

Page 82: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

• HSD = 1.19

• Difference between means:

• ‘Back’ (mean=6) and ‘Middle’ (mean=7) : 1

• ‘Middle’ (mean=7) and ‘Front’ (mean=8): 1

• ‘Back’ (mean=6) and ‘Front’ (mean=8): 2

• Because 2 is greater than 1.19, there is a significant difference between the ‘front’ and ‘back’ groups in terms of their attendance

Page 83: Psych 230 Psychological Measurement  and Statistics

ANOVA - example

Page 84: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance

A clinical psychologist has noted that autistic children seem to respond to treatment better if they are in a familiar environment. To evaluate the influence of environment, the psychologist selects a group of 18 children who are currently in treatment and randomly divides them into three groups. One group continues to receive treatment in the clinic as usual. For the second group, treatment sessions are conducted entirely in the child’s home. The third group gets half of the treatment in the clinic and half at home. After six weeks the data look as follows (high scores are good):

– Clinic: 14, 13, 14, 13, 10, 15

– Home: 10, 12, 11, 13, 11, 10

– Both: 11, 14, 14, 15, 13, 15

Do the data indicate any significant differences between the three settings? Use =0.05

Page 85: Psych 230 Psychological Measurement  and Statistics

1. Decide which test to use

• Are we comparing a sample to a population?– Yes: Z-test if we know the population standard deviation– Yes: One-sample T-test if we do not know the population std dev– No: Keep looking

• Are we looking for the difference between samples?– Yes: How many samples are we comparing?

• Two: Use the Two-sample T-test– Are the samples independent or related?

» Independent: Use Independent Samples T-test» Related: Use Related Samples T-test

• More than Two: Use Anova test

Page 86: Psych 230 Psychological Measurement  and Statistics

2. State the Hypotheses

• H0 : 1 = 2 = ……. = k

– there is no difference in the means

• HA : not all s are equal – there is a difference between some of the means

Page 87: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 88: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229 dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 89: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 90: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 91: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 92: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

Page 93: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

= [(802/6) + (672/6) + (822/6)] - (2292/18)

= [(6400/6) + (4489/6) + 6724/6)] - (52441/18)

= [1066.67 + 748.17 + 1120.67] - (2913.39)

= 2935.51 - 2913.39 = 22.12

Page 94: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

= [(802/6) + (672/6) + (822/6)] - (2292/18)

= [(6400/6) + (4489/6) + 6724/6)] - (52441/18)

= [1066.67 + 748.17 + 1120.67] - (2913.39)

= 2935.51 - 2913.39 = 22.11

Page 95: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= (2969) - (2292/18)

= 2969 - 2913.39

= 55.61

N

XXSS

2tot2

tottot

)(

Page 96: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= (2969) - (2292/18)

= 2969 - 2913.39

= 55.61

N

XXSS

2tot2

tottot

)(

Page 97: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 55.61 - 22.12

= 33.49

bntotwn SSSSSS

Page 98: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 dfbn MSbn Fobt

Within 33.49 dfwn MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 55.61 - 22.12

= 33.49

bntotwn SSSSSS

Page 99: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 dfbn MSbn Fobt

Within 33.49 dfwn MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 3 - 1

= 2

dfbn= k - 1

Page 100: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 MSbn Fobt

Within 33.49 dfwn MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 3 - 1

= 2

dfbn= k - 1

Page 101: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 MSbn Fobt

Within 33.49 dfwn MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 18 - 3

= 15

dfwn= N - k

Page 102: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 MSbn Fobt

Within 33.49 15 MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 18 - 3

= 15

dfwn= N - k

Page 103: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 MSbn Fobt

Within 33.49 15 MSwn

Total 55.61 dftot

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 18 - 1

= 17

dftot= N - 1

Page 104: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 MSbn Fobt

Within 33.49 15 MSwn

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 18 - 1

= 17

dftot= N - 1

Page 105: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 MSbn Fobt

Within 33.49 15 MSwn

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 22.12 / 2

= 11.06

bn

bnbn df

SSMS

Page 106: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 11.055 Fobt

Within 33.49 15 MSwn

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 22.12 / 2

= 11.06

bn

bnbn df

SSMS

Page 107: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 11.055 Fobt

Within 33.49 15 MSwn

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 33.49 / 15

= 2.23

wn

wnwn df

SSMS

Page 108: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 11.055 Fobt

Within 33.49 15 2.23

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 33.49 / 15

= 2.23

wn

wnwn df

SSMS

Page 109: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 11.055 Fobt

Within 33.49 15 2.23

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 11.06 / 2.23

= 4.96

wn

bnobt MS

MSF

Page 110: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 11.055 4.957

Within 33.49 15 2.23

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

= 11.06 / 2.23

= 4.96

wn

bnobt MS

MSF

Page 111: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 22.11 2 11.05 4.96

Within 33.49 15 2.23

Total 55.61 17

Clinic Home Both

14 10 11

13 12 14

14 11 14

14 13 15

10 11 13

15 10 15

13.33 11.17 13.67 Mean=12.72

∑X=80 ∑X=67 ∑X=82 ∑Xtot=229

∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969

n1=6 n2=6 n3=6 N = 18k=3

Page 112: Psych 230 Psychological Measurement  and Statistics

4. Calculate the critical value

• Assume =0.05• Always a two-tail test with ANOVA

• dfbetween = k - 1 = 3 - 1 = 2• dfwithin = N - k = 18 - 3 = 15

• Fcrit for 2 and 15 degrees of freedom and = 0.05 is 3.68

Page 113: Psych 230 Psychological Measurement  and Statistics

Fcrit and Fobt

Fcrit= 3.68

Fobt= 4.96

Page 114: Psych 230 Psychological Measurement  and Statistics

5. Make our Conclusion

• Fcrit = 3.68• Fobt = 4.96

• Fobt is inside the rejection region, we reject H0 and accept HA

• We conclude that there is a significant difference between some of our groups– which groups?

Page 115: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

HSD = (qk) [√(MSwn/n)]

qk: Look up Table L - Need:

– k (number of means being compared)

– dfwn

= (3.675) [√(2.233/6)]

= (3.675) [√(0.372)]

= (3.675) (0.61)

= 2.242

n

MSqHSD k

wn)(

Page 116: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

• HSD = 2.242

• Difference between means:

• Clinic - Home = 2.166

• Clinic - Both = -0.334

• Home - Both = -2.5

• Therefore, there is a significant difference in scores between treatment at home, and treatment at both home and at the clinic

Page 117: Psych 230 Psychological Measurement  and Statistics

ANOVA - your turn

Page 118: Psych 230 Psychological Measurement  and Statistics

Problem

A psychologist is interested in the effects of room temperature on learning. 15 subjects are recruited for an experiment to answer this questions - 5 subjects undergo a learning task in a room with a temperature of 50 degrees, another group of 5 learn the same material in room with a temperature of 70 degrees and the final group learn in a temperature of 90 degrees. The data are below, with higher numbers indicating greater learning. Does room temperature affect rates of learning? Use =0.05

– 50 degrees: 0, 1, 3, 1, 0

– 70 degrees : 4, 3, 6, 3, 4

– 90 degrees : 1, 2, 2, 0, 0

Page 119: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

dftot= N - 1

dfwn= N - k

dfbn= k - 1

bn

bnbn df

SSMS

wn

wnwn df

SSMS

wn

bnobt MS

MSF

bntotwn SSSSSS

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

N

XXSS

2tot2

tottot

)(

Page 120: Psych 230 Psychological Measurement  and Statistics

1. Decide which test to use

• Are we comparing a sample to a population?– Yes: Z-test if we know the population standard deviation– Yes: One-sample T-test if we do not know the population std dev– No: Keep looking

• Are we looking for the difference between samples?– Yes: How many samples are we comparing?

• Two: Use the Two-sample T-test– Are the samples independent or related?

» Independent: Use Independent Samples T-test» Related: Use Related Samples T-test

• More than Two: Use Anova test– No: Keep looking

• Are we looking for the relationship between variables?– Yes: Use the Correlation test

Page 121: Psych 230 Psychological Measurement  and Statistics

2. State the Hypotheses

• H0 : 1 = 2 = ……. = k

– there is no difference in the means

• HA : not all s are equal – there is a difference between some of the means

Page 122: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

Page 123: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

Page 124: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

Page 125: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

Page 126: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15

Page 127: Psych 230 Psychological Measurement  and Statistics

Analysis of Variance50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 128: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 129: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between SSbn dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

= [(52/5) + (202/5) + (52/5)] - (302/15)

= [(25/5) + (400/5) + 25/5)] - (900/15)

= [5 + 80 + 5] - (60)

= 90 - 60 = 30

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 130: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

N

X

n

XSS

2tot

2

bn

)(

columnin

)columnin(

= [(52/5) + (202/5) + (52/5)] - (302/15)

= [(25/5) + (400/5) + 25/5)] - (900/15)

= [5 + 80 + 5] - (60)

= 90 - 60 = 30

Page 131: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total SStot dftot

= (106) - (302/15)

= 106 - 60

= 46

N

XXSS

2tot2

tottot

)(50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 132: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total 46 dftot

= (106) - (302/15)

= 106 - 60

= 46

N

XXSS

2tot2

tottot

)(50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 133: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 dfbn MSbn Fobt

Within SSwn dfwn MSwn

Total 46 dftot

= 46 - 30

= 16

bntotwn SSSSSS 50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 134: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 dfbn MSbn Fobt

Within 16 dfwn MSwn

Total 46 dftot

= 46 - 30

= 16

bntotwn SSSSSS 50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 135: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 dfbn MSbn Fobt

Within 16 dfwn MSwn

Total 46 dftot

= 3 - 1

= 2

dfbn= k - 150° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 136: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 MSbn Fobt

Within 16 dfwn MSwn

Total 46 dftot

= 3 - 1

= 2

dfbn= k - 150° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 137: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 MSbn Fobt

Within 16 dfwn MSwn

Total 46 dftot

= 15 - 3

= 12

dfwn= N - k50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 138: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 MSbn Fobt

Within 16 12 MSwn

Total 46 dftot

= 15 - 3

= 12

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

dftot= N - 1

Page 139: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 MSbn Fobt

Within 16 12 MSwn

Total 46 dftot

= 15 - 1

= 14

dftot= N - 150° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 140: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 MSbn Fobt

Within 16 12 MSwn

Total 46 14

= 15 - 1

= 14

dftot= N - 150° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 141: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 MSbn Fobt

Within 16 12 MSwn

Total 46 14

= 30 / 2

= 15

bn

bnbn df

SSMS

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 142: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 15 Fobt

Within 16 12 MSwn

Total 46 14

bn

bnbn df

SSMS

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

= 30 / 2

= 15

Page 143: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 15 Fobt

Within 16 12 MSwn

Total 46 14

= 16 / 12

= 1.33

wn

wnwn df

SSMS

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 144: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 15 Fobt

Within 16 12 1.33

Total 46 14

wn

wnwn df

SSMS

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

= 16 / 12

= 1.33

Page 145: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 15 Fobt

Within 16 12 1.33

Total 46 14

= 15 / 1.33

= 11.28

wn

bnobt MS

MSF

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 146: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 15 11.28

Within 16 12 1.33

Total 46 14

= 15 / 1.33

= 11.28

wn

bnobt MS

MSF

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 147: Psych 230 Psychological Measurement  and Statistics

3. Calculate the obtained value (Fobt)

Source Sum of Squares

df Mean Squares

F

Between 30 2 15 11.28

Within 16 12 1.33

Total 46 14

50° 70° 90°

0 4 1

1 3 2

3 6 2

1 3 0

0 4 0

1 4 1 Mean=2

∑X=5 ∑X=20 ∑X=5 ∑Xtot=30

∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106

n1=5 n2=5 n3=5 N = 15k=3

Page 148: Psych 230 Psychological Measurement  and Statistics

4. Calculate the critical value

• Assume =0.05• Always a two-tail test with ANOVA

• dfbetween = k - 1 = 3 - 1 = 2• dfwithin = N - k = 15 - 3 = 12

• Fcrit for 2 and 15 degrees of freedom and = 0.05 is 3.88

Page 149: Psych 230 Psychological Measurement  and Statistics

Fcrit and Fobt

Fcrit= 3.88

Fobt= 11.28

Page 150: Psych 230 Psychological Measurement  and Statistics

5. Make our Conclusion

• Fcrit = 3.88• Fobt = 11.28

• Fobt is inside the rejection region, we reject H0 and accept HA

• We conclude that there is a significant difference between some of our groups– which groups?

Page 151: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

HSD = (qk) [√(MSwn/n)]

qk: Look up Table L - Need:

– k (number of means being compared)

– dfwn

= (3.77) [√(1.33/5)]

= (3.77) [√(0.266)]

= (3.77) (0.52)

= 1.96

n

MSqHSD k

wn)(

Page 152: Psych 230 Psychological Measurement  and Statistics

6. Conduct post-hoc tests

• HSD = 1.96

• Difference between means:

• 50° group - 70° group = -3

• 50° group - 90° group = 0

• 70° group - 90° group = 3

• Therefore, there is a significant increase in learning when the temperature is 70° as compared to either 50° or 90°