18
STAT 2120 Tim Keaton

STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Embed Size (px)

Citation preview

Page 1: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

STAT 2120

Tim Keaton

Page 2: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

ANalysis Of VAriance (ANOVA)

• ANOVA is a generalization of the comparison of two population means

• In ANOVA, we compare k population means where k >= 3

• It is a terrible name because we are comparing means by analyzing variances

Page 3: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Fear of Heights Example

People with a fear of heights were randomly assignedto one of three forms of psychology or a control condition. Each client in a treatment receives 10 sessions with a trainedpsycho-therapist. Clients in the control group receive no treatment. All clients are then taken to the 15th floor of an office building andasked to stand next to a floor to ceiling window and rate theiranxiety on a 20 point scale (20=strongest fear; 0 = no fear).

Page 4: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Anxiety Scores (Scale 1-20)

Control Gestalt Psychoanalysis Behavior Modification

20 20 20 1514 10 9 518 11 10 616 18 15 1317 17 15 9

14 15 12

Page 5: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

0:

0:

211

210

H

H

0:

0:

311

310

H

H

0:

0:

411

410

H

H

0:

0:

321

320

H

H

0:

0:

421

420

H

H

0:

0:

431

430

H

H

To use the Chapter 13 stuff we learned, we would haveto use 6 different hypothesis tests.

Page 6: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Each of these six tests has its own P(Type I error) = a.

Therefore, with six tests, there is a higher probability than a that we will make a Type I error.

When performing many tests, you are almost guaranteedto make at least one Type I error. That is, you are almostguaranteed to find something significant when nothing is.

One-Way ANOVA performs one overall test withP(Type I error) = a. That is, it ensures thatP(Type I error) = a.

Page 7: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

ANOVA works by comparing the variation betweentreatments to the variation within treatments.

If the variation between treatments is large comparedto the variation within treatments, then we decide thereis a significant difference between at least two treatmentmeans.

The results of ANOVA are stored in an ANOVA table(surprise!)

differ least twoAt :

:

1

43210

iH

H

Page 8: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

One-Way ANOVA Output

Results for: ANXIETY.MTW One-way ANOVA: control, gestalt, psycho, behave

Source DF SS MS F PFactor 3 146.6 48.9 3.57 0.033Error 19 260.0 13.7Total 22 406.6

S = 3.699 R-Sq = 36.06% R-Sq(adj) = 25.96%

Page 9: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

One-Way ANOVA Output

Results for: ANXIETY.MTW One-way ANOVA: control, gestalt, psycho, behave

Source DF SS MS F PFactor 3 146.6 48.9 3.57 0.033Error 19 260.0 13.7Total 22 406.6

S = 3.699 R-Sq = 36.06% R-Sq(adj) = 25.96%

Page 10: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

• Look at the Tukey simultaneous confidence intervals for the difference between each pair of means

• If a confidence interval does not contain 0, then there is a significant difference between those two means.

Pairwise ComparisonsRecall the 6 different hypothesis tests.

Now that we know at least two means are different,we can make these pairwise comparisons.

Page 11: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Pairwise ComparisonsRecall the 6 different hypothesis tests.

Now that we know at least two means are different,we can make these pairwise comparisons.

0:

0:

211

210

H

H

0:

0:

311

310

H

H

0:

0:

411

410

H

H

0:

0:

321

320

H

H

0:

0:

421

420

H

H

0:

0:

431

430

H

H

Page 12: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Informal Pairwise ComparisonsLook at the individual confidence intervals for each mean.

If two intervals do not overlap, then we may conclude thattheir population means differ.

Individual 95% CIs For Mean Based on Pooled StDevLevel N Mean StDev +---------+---------+---------+---------control 5 17.000 2.236 (---------*--------)gestalt 6 15.000 4.000 (--------*--------)psycho 6 14.000 4.000 (--------*--------)behave 6 10.000 4.000 (--------*--------) +---------+---------+---------+--------- 7.0 10.5 14.0 17.5

Page 13: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Tukey 95.0% Simultaneous Confidence IntervalsResponse Variable anxietyAll Pairwise Comparisons among Levels of treatmenttreatment = behave subtracted from:

treatment Lower Center Upper ---+---------+---------+---------+---control 0.696 7.000 13.30 (--------*--------)gestalt -1.011 5.000 11.01 (-------*--------)psycho -2.011 4.000 10.01 (--------*-------) ---+---------+---------+---------+--- -7.0 0.0 7.0 14.0

treatment = control subtracted from:

treatment Lower Center Upper ---+---------+---------+---------+---gestalt -8.304 -2.000 4.304 (--------*--------)psycho -9.304 -3.000 3.304 (--------*--------) ---+---------+---------+---------+--- -7.0 0.0 7.0 14.0

treatment = gestalt subtracted from:

treatment Lower Center Upper ---+---------+---------+---------+---psycho -7.011 -1.000 5.011 (--------*-------) ---+---------+---------+---------+--- -7.0 0.0 7.0 14.0

Pairwise Comparisons

Page 14: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Tukey 95.0% Simultaneous Confidence IntervalsResponse Variable anxietyAll Pairwise Comparisons among Levels of treatment

treatment = behave subtracted from:

treatment Lower Center Upper ---+---------+---------+---------+---control 0.696 7.000 13.30 (--------*--------)gestalt -1.011 5.000 11.01 (-------*--------)psycho -2.011 4.000 10.01 (--------*-------) ---+---------+---------+---------+--- -7.0 0.0 7.0 14.0

treatment = control subtracted from:

treatment Lower Center Upper ---+---------+---------+---------+---gestalt -8.304 -2.000 4.304 (--------*--------)psycho -9.304 -3.000 3.304 (--------*--------) ---+---------+---------+---------+--- -7.0 0.0 7.0 14.0

treatment = gestalt subtracted from:

treatment Lower Center Upper ---+---------+---------+---------+---psycho -7.011 -1.000 5.011 (--------*-------) ---+---------+---------+---------+--- -7.0 0.0 7.0 14.0

Pairwise Comparisons

Page 15: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Anxiety Scores (Scale 1-20)

Control Gestalt Psychoanalysis Behavior Modification

20 20 20 1514 10 9 1518 11 10 1616 18 15 1317 17 15 19

14 15 12

Page 16: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

One-Way ANOVA Output

Results for: ANXIETY.MTW One-way ANOVA: control, gestalt, psycho, behave

Source DF SS MS F PFactor 3 25.3 8.4 0.76 0.529Error 19 210.0 11.1Total 22 235.3

S = 3.325 R-Sq = 10.75% R-Sq(adj) = 0.00%

Page 17: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Informal Pairwise ComparisonsLook at the individual confidence intervals for each mean.

If two intervals do not overlap, then we may conclude thattheir population means differ.

Individual 95% CIs For Mean Based on Pooled StDevLevel N Mean StDev -----+---------+---------+---------+----control 5 17.000 2.236 (-----------*-----------)gestalt 6 15.000 4.000 (----------*----------)psycho 6 14.000 4.000 (----------*----------)behave 6 15.000 2.449 (----------*----------) -----+---------+---------+---------+---- 12.5 15.0 17.5 20.0

Page 18: STAT 2120 Tim Keaton. ANalysis Of VAriance (ANOVA) ANOVA is a generalization of the comparison of two population means In ANOVA, we compare k population

Tukey 95.0% Simultaneous Confidence IntervalsResponse Variable anxietyAll Pairwise Comparisons among Levels of treatment

control subtracted from:

Lower Center Upper --+---------+---------+---------+-------gestalt -7.665 -2.000 3.665 (-------------*-------------)psycho -8.665 -3.000 2.665 (--------------*-------------)behave -7.665 -2.000 3.665 (-------------*-------------) --+---------+---------+---------+------- -8.0 -4.0 0.0 4.0

gestalt subtracted from:

Lower Center Upper --+---------+---------+---------+-------psycho -6.402 -1.000 4.402 (-------------*------------)behave -5.402 0.000 5.402 (-------------*-------------) --+---------+---------+---------+------- -8.0 -4.0 0.0 4.0

psycho subtracted from:

Lower Center Upper --+---------+---------+---------+-------behave -4.402 1.000 6.402 (-------------*------------) --+---------+---------+---------+------- -8.0 -4.0 0.0 4.0

Pairwise Comparisons