H 0 : H 1 : α = Decision Rule: If then do not reject H 0 , otherwise reject H 0 . Test Statistic:

32
© Buddy Freeman, 2015 H 0 : H 1 : α = Decision Rule: If then do not reject H 0 , otherwise reject H 0 . Test Statistic: Decision: Conclusion: We have found ________________ evidence at the _____ level of significance that

description

H 0 : H 1 : α = Decision Rule: If then do not reject H 0 , otherwise reject H 0 . Test Statistic: Decision: Conclusion: We have found ________________ evidence at the _____ level of significance that. H 0 : H 1 : α = Decision Rule: If - PowerPoint PPT Presentation

Transcript of H 0 : H 1 : α = Decision Rule: If then do not reject H 0 , otherwise reject H 0 . Test Statistic:

© Buddy Freeman, 2015

H0:

H1:

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that

© Buddy Freeman, 2015

H0:

H1:

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that

.05

.05

© Buddy Freeman, 2015

H0:

H1:

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that the means of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

not all the means are equal

μ1 = μ2 = μ3

A B C

© Buddy Freeman, 2014

# of groups?

Parameter?

Can we make all

fe > 5?

Normalpopulations

?

Hartley’s Fmax *(not in text)

Resample and try again.

yes

no

yes

no

chi-squaredf = (R-1)(C-1)pp. 368-374

yes

no Kruskal-Wallis*pp. 621-625

1-way ANOVApp. 386-395ANOVA

OK?

meanor

median

proportion

varianceor

standard deviation

morethan

2

Parameter?

RelatedSamples

?

meanor

median

proportionvariance

orstandard deviation Normal

populations?

yes

no

Levine-Brown-Forsythe

F = S12/S2

2

pp. 344-354

Z for proportionspp. 322-328

yes

no unequal-variances t-testp. 307-315

pooled-variances t-testpp. 307-315

Wilcoxon Rank Sum*pp. 616-621

no

yesNormalpopulations

?

Normalpopulations

?

yes

noyes

non1 > 30

andn2 > 30

?

Z for means with σ1 & σ2 pp. 307-315

yes

no

σ1 and σ2

both known?

no

Normalpopulations

?

yes

noyes

at leastinterval

level data?

yes

noSign Test*pp. 631-634.

Wilcoxon Signed-Ranks*pp. 614-616

paired-difference t-testpp. 315-322

2

chi-square goodness-of-fit test pp. for the Multinomial Experiment 362-368and the Normal Distribution 374-376

2 Groups and > 2 Groups FlowchartSpearman Rank Correlation testpp. 625-630 1

2

3

4

5

7

8

9

10

11

12

13

14

15

yes

no

n1 > 30and

n2 > 30?

6

σ1 = σ2

?

Levine-Brown-Forsythe

Jaggiaand Kelly

(1st edition)

Default case

* means coverage is different from text.

© Buddy Freeman, 2015

ANOVAOK?

There are three major assumptions for doing an Analysis of Variance (ANOVA) Test:

1. Normality: All the populations are normal.2. Equality of Variances: The variances of all the populations are equal.3. Independence of Error: The deviation of each value from the mean of the group containing that value should be independent of any other such deviation.

© Buddy Freeman, 2015

For this part of the course you may assume thethird one (Independence of Error). Care takenwhen obtaining the sample results should minimize the possibility of a violation of thisassumption. However, when data is collectedover a lengthy interval of time, this assumption should be checked. We will discuss this furtherwhen we get into regression analysis.

You are expected to check the othertwo assumptions:

1. Normality2. Equality of Variances

© Buddy Freeman, 2015

This problem has the normality assumption as a given.Later on in the course, we will cover a procedure totest a population to see if it is normally distributed.

How do we determine if all the population variances are equal ?

© Buddy Freeman, 2015

We can use the following hypothesis test:

23

22

21 H0:

H1: not all variances are equal

© Buddy Freeman, 2015

If we do not reject the null hypothesiswe can perform an ANOVA test tocompare the means, but if we do rejectthe null hypothesis, the ANOVA testis NOT appropriate.

If you have one or more of yourpopulations that are definitely NOTnormal the ANOVA test is NOTappropriate.

© Buddy Freeman, 2015

The flowchart can be used todetermine the test statisticneeded to test:

23

22

21 H0:

H1: not all variances are equal

© Buddy Freeman, 2014

# of groups?

Parameter?

Can we make all

fe > 5?

Normalpopulations

?

Hartley’s Fmax *(not in text)

Resample and try again.

yes

no

yes

no

chi-squaredf = (R-1)(C-1)pp. 368-374

yes

no Kruskal-Wallis*pp. 621-625

1-way ANOVApp. 386-395ANOVA

OK?

meanor

median

proportion

varianceor

standard deviation

morethan

2

Parameter?

RelatedSamples

?

meanor

median

proportionvariance

orstandard deviation Normal

populations?

yes

no

Levine-Brown-Forsythe

F = S12/S2

2

pp. 344-354

Z for proportionspp. 322-328

yes

no unequal-variances t-testp. 307-315

pooled-variances t-testpp. 307-315

Wilcoxon Rank Sum*pp. 616-621

no

yesNormalpopulations

?

Normalpopulations

?

yes

noyes

non1 > 30

andn2 > 30

?

Z for means with σ1 & σ2 pp. 307-315

yes

no

σ1 and σ2

both known?

no

Normalpopulations

?

yes

noyes

at leastinterval

level data?

yes

noSign Test*pp. 631-634.

Wilcoxon Signed-Ranks*pp. 614-616

paired-difference t-testpp. 315-322

2

chi-square goodness-of-fit test pp. for the Multinomial Experiment 362-368and the Normal Distribution 374-376

2 Groups and > 2 Groups FlowchartSpearman Rank Correlation testpp. 625-630 1

2

3

4

5

7

8

9

10

11

12

13

14

15

yes

no

n1 > 30and

n2 > 30?

6

σ1 = σ2

?

Levine-Brown-Forsythe

Jaggiaand Kelly

(1st edition)

Default case

* means coverage is different from text.

© Buddy Freeman, 2015

H0:

H1: not all the variances are equal

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that that the variances of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

23

22

21

A B C

2min

2max

,max S

SF

c

© Buddy Freeman, 2015

H0:

H1: not all the variances are equal

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that that the variances of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

23

22

21

A B C

2min

2max

,max S

SF

c

More than 2 groupsis an upper-tail test.

© Buddy Freeman, 2015

Do not reject H0 Reject H0

.05

Do not reject H0 Reject H0

.05

H0:

H1: not all the variances are equal

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that that the variances of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

23

22

21

A B C

2min

2max

,max S

SF

c

More than 2 groupsis an upper-tail test.

Fmax = 5.34

c = number of groups = 39 1 10 1 n

© Buddy Freeman, 2015

Do not reject H0 Reject H0

.05

Do not reject H0 Reject H0

.05

H0:

H1: not all the variances are equal

α =

Decision Rule:

If Fmaxcomputed < 5.34

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that that the variances of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

23

22

21

A B CMore than 2 groupsis an upper-tail test.

Fmax = 5.34

c = number of groups = 39 1 10 1 n

2min

2max

,max S

SF

c

© Buddy Freeman, 2015

Calculation of Variations(and Variances)

© Buddy Freeman, 2015

Method Method Method A B C n 10 10 10 X = 900 840 810 X2 = 81,882 72,076 67,048

Calculation of Variations(and Variances)

© Buddy Freeman, 2015

)1(2

ndf

ssssS

Method Method Method A B C n 10 10 10 X = 900 840 810 X2 = 81,882 72,076 67,048

n

xxSS

22 )(

Calculation of Variations(and Variances)

© Buddy Freeman, 2015

9

882

)1(2

ndf

ssssS

Method Method Method A B C n 10 10 10 X = 900 840 810 X2 = 81,882 72,076 67,048

n

xxSS

22 )(

Method A:

88210

90081882

2

SS

Calculation of Variations(and Variances)

© Buddy Freeman, 2015

9

516,1

)1(2

ndf

ssssS

Method Method Method A B C n 10 10 10 X = 900 840 810 X2 = 81,882 72,076 67,048

n

xxSS

22 )(

Method B:

151610

84072076

2

SS

Calculation of Variations(and Variances)

© Buddy Freeman, 2015

9

438,1

)1(2

ndf

ssssS

Method Method Method A B C n 10 10 10 X = 900 840 810 X2 = 81,882 72,076 67,048

n

xxSS

22 )(

Method C:

143810

81067048

2

SS

Calculation of Variations(and Variances)

© Buddy Freeman, 2015

Method Method Method A B C n 10 10 10 X = 900 840 810 X2 = 81,882 72,076 67,048

SS = 882 1,516 1,438

S2 = 882/9 1,516/9 1,438/9

Calculation of Variations(and Variances)

Largestvariance

Smallestvariance

© Buddy Freeman, 2015

Do not reject H0 Reject H0

.05

Do not reject H0 Reject H0

.05

72.1

9

8829

1516

2min

2max

,max

S

SF

c

H0:

H1: not all the variances are equal

α =

Decision Rule:

If Fmaxcomputed < 5.34

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that that the variances of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

23

22

21

A B CMore than 2 groupsis an upper-tail test.

Fmax = 5.34

c = number of groups = 39 1 10 1 n

Do not reject H0

Do not reject H0.

insufficient

© Buddy Freeman, 2015

We have found no evidence of any difference in the variancesso the ANOVA test is appropriateto use to test the means.

We now resume our interruptedhypothesis test of the means.

© Buddy Freeman, 2015

H0:

H1:

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that the means of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

not all the means are equal

μ1 = μ2 = μ3

A B C

where k = # of groupsand nT = n1 + n2 + … + nk

2

2

,1W

Bknk S

SF

T

)( kn

SSW

T

)1(k

SSB

More than 2 groupsis an upper-tail test.

© Buddy Freeman, 2015

Do not reject H0 Reject H0

.050

Do not reject H0 Reject H0

.050

H0:

H1:

α =

Decision Rule:

If

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that the means of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

not all the means are equal

μ1 = μ2 = μ3

A B C

where k = # of groupsand nT = n1 + n2 + … + nk

2

2

,1W

Bknk S

SF

T

)( kn

SSW

T

)1(k

SSB

dfd = nT - k = 30 - 3 = 27

dfn = k - 1 = 3 - 1 = 2

F = 3.354

More than 2 groupsis an upper-tail test.

© Buddy Freeman, 2015

Do not reject H0 Reject H0

.050

Do not reject H0 Reject H0

.050

H0:

H1:

α =

Decision Rule:

If Fcomputed < 3.354

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that the means of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

not all the means are equal

μ1 = μ2 = μ3

A B C

where k = # of groupsand nT = n1 + n2 + … + nk

2

2

,1W

Bknk S

SF

T

)( kn

SSW

T

)1(k

SSB

dfd = nT - k = 30 - 3 = 27

dfn = k - 1 = 3 - 1 = 2

F = 3.354

More than 2 groupsis an upper-tail test.

© Buddy Freeman, 2015

Calculation of the ANOVA test statistic: The Denominator Variance

The denominator is the variance within the groups,but remember variance = variation/df.

Therefore, (SW)2 = SSW/dfW.

SSW is the variation WITHIN the groups =variation WITHIN group 1 + variation WITHIN group 2+ … + variation WITHIN group k = SS1 + SS2 + … + SSk.Here k = 3, so SSW = SS1 + SS2 + SS3 = 882 + 1516 + 1438 = 3836.

dfW = df WITHIN group 1 + df WITHIN group 2 + … +df WITHIN group k = (n1 - 1) + (n2 - 1) + (n3 - 1) = (nT - k) = 27.

© Buddy Freeman, 2015

Calculation of the ANOVA test statistic: The Numerator Variance

The numerator is the variance between the groups,but remember variance = variation/df. Therefore, (SB)2 = SSB/dfB.

THE CONCEPTHere the group is the ‘entity.’ If you have k groups then you have(k-1) degrees of freedom, so dfB = (k-1).

Recall that the variation of a sample is defined as: SS = å(X-X)2. We will expand this concept to groups. The X represents the group, so we will replace X with a value to represent the group, the mean of the group, X. In the sample variation the Xrepresents the mean of all the X values, so we will replace it withthe mean of all values in all the groups, X. The catch is that youmust remember to multiply each square by the sample size of the group to account all the values of each group appropriately.

© Buddy Freeman, 2015

The definition formula for SSB is given by:

The means of each group are:

SSB = 10(90-85)2 + 10(84-85)2 + 10(81-85)2 = 420

The next slide shows an alternative way to calculate SSB.

21

XXnSSB j

k

jj

85

30

2550

101010

810840900

Here, groups. theallin values theall ofmean theis

X

X

8110

810 84

10

840 90

10

900321 XXX

Calculating SSB by Definition

© Buddy Freeman, 2015

SSB + SSW = SST, the total variation.Therefore, SSB = SST – SSW = SST – 3,836.To calculate SST, just add a column with the totals.

Method Method Method A B C Total n 10 10 10 30 X = 900 840 810 2,550 X2 = 81,882 72,076 67,048 221,006

n

xxSS

22 )(

Total:

256,430

550,2006,221

2

SST

Hence, SSB = SST – SSW = 4,256 – 3,836 = 420.With SSB, SSW, and the dfs, the test statistic may be computed.

Alternative Way to Calculate SSB

© Buddy Freeman, 2015

478.1074.142

210

273836

2420

12

2

,1

knSSW

kSSB

S

SF

T

W

Bknk T

Do not reject H0 Reject H0

.050

Do not reject H0 Reject H0

.050

H0:

H1:

α =

Decision Rule:

If Fcomputed < 3.354

then do not reject H0, otherwise reject H0.

Test Statistic:

Decision:

Conclusion: We have found ________________ evidence at the _____ level of significance that the means of the number of parts produced per hour using methods: A, B, and C are not all equal.

.05

.05

not all the means are equal

μ1 = μ2 = μ3

A B C

dfd = nT - k = 30 - 3 = 27

dfn = k - 1 = 3 - 1 = 2

F = 3.354

More than 2 groupsis an upper-tail test.

Do not reject H0

Do not reject H0.

insufficient