16
Random samples of size n 1 , n 2 , …,n k are drawn from k populations with means 1 , 2 ,…, k and with common variance 2 . Let x ij be the j-th measurement in the i- th sample. The total variation in the experiment is measured by the total sum of total sum of squares squares: The Completely The Completely Randomized Design Randomized Design 2 ) ( SS Total x x ij

Random samples of size n 1, n 2, …,n k are drawn from k populations with means 1, 2,…, k and with common variance 2. Let x ij be the j-th measurement

Embed Size (px)

Citation preview

Page 1: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

• Random samples of size n1, n2, …,nk are drawn from k populations with means 1, 2,…, k and with common variance 2.

• Let xij be the j-th measurement in the i-th sample.

• The total variation in the experiment is measured by the total sum of squarestotal sum of squares:

The Completely The Completely Randomized DesignRandomized Design

2)( SS Total xxij 2)( SS Total xxij

Page 2: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The Analysis of VarianceThe Analysis of Variance

The Total SSTotal SS is divided into two parts: SSTSST (sum of squares for treatments):

measures the variation among the k sample means.

SSESSE (sum of squares for error): measures the variation within the k samples.

in such a way that:

SSE SST SS Total SSE SST SS Total

Page 3: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

Computing FormulasComputing Formulas

Page 4: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The Breakfast ProblemThe Breakfast ProblemNo Breakfast Light Breakfast Full Breakfast

8 14 10

7 16 12

9 12 16

13 17 15

T1 = 37 T2 = 59 T3 = 53 G = 149G = 149

25.58SST-SS TotalSSE

6766.46CM75.1914CM4

59

4

53

4

37SST

122.91671850.0833-1973CM15...78SS Total

0833.185012

149CM

222

222

2

25.58SST-SS TotalSSE

6766.46CM75.1914CM4

59

4

53

4

37SST

122.91671850.0833-1973CM15...78SS Total

0833.185012

149CM

222

222

2

Page 5: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

Degrees of Freedom and Degrees of Freedom and Mean SquaresMean Squares

• These sums of squaressums of squares behave like the numerator of a sample variance. When divided by the appropriate degrees of degrees of freedomfreedom, each provides a mean squaremean square, an estimate of variation in the experiment.

• Degrees of freedomDegrees of freedom are additive, just like the sums of squares.

dfdfdf Error Trt Total dfdfdf Error Trt Total

Page 6: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The ANOVA TableThe ANOVA Table

Total df = Mean SquaresTreatment df = Error df =

n1+n2+…+nk –1 = n -1

k –1

n –1 – (k – 1) = n-k

MST = SST/(k-1)

MSE = SSE/(n-k)

Source df SS MS F

Treatments k -1 SST SST/(k-1) MST/MSE

Error n - k SSE SSE/(n-k)

Total n -1 Total SS

Page 7: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The Breakfast ProblemThe Breakfast Problem

25.58SST-SS TotalSSE

6766.46CM75.1914CM4

59

4

53

4

37SST

122.91671850.0833-1973CM15...78SS Total

0833.185012

149CM

222

222

2

25.58SST-SS TotalSSE

6766.46CM75.1914CM4

59

4

53

4

37SST

122.91671850.0833-1973CM15...78SS Total

0833.185012

149CM

222

222

2

Source df SS MS F

Treatments 2 64.6667 32.3333 5.00

Error 9 58.25 6.4722

Total 11 122.9167

Page 8: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

Testing the Treatment MeansTesting the Treatment Means

Remember that 2 is the common variance for all k populations. The quantity MSE SSE/(n k) is a pooled estimate of 2, a weighted average of all k sample variances, whether or not H 0 is true.

versus... :H k3210

different ismean oneleast at :Ha

Page 9: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

• If H 0 is true, then the variation in the sample means, measured by MST [SST/ (k 1)], also provides an unbiased estimate of 2.

• However, if H 0 is false and the population means are different, then MST— which measures the variance in the sample means — is unusually large.large. The test statistic F F MST/ MSEMST/ MSE tends to be larger that usual.

Page 10: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The F TestThe F Test• Hence, you can reject H 0 for large values of

F, using a right-tailedright-tailed statistical test.• When H 0 is true, this test statistic has an F

distribution with d f 1 (k 1) and d f 2 (n k) degrees of freedom and right-tailedright-tailed critical values of the F distribution can be used.

AppletApplet

... H test To 0 k 321:

. and withFF if H RejectMSEMST

F :Statistic Test

0 dfn-k k 1

Page 11: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

Source df SS MS F

Treatments 2 64.6667 32.3333 5.00

Error 9 58.25 6.4722

Total 11 122.9167

The Breakfast ProblemThe Breakfast Problem

spans.attention averagein difference

a is e that therconclude and Hreject We

.26.4FF :regionRejection

00.54722.6

3333.32

MSE

MSTF

different ismean oneleast at :H

versus:H

0

.05

a

3210

spans.attention averagein difference

a is e that therconclude and Hreject We

.26.4FF :regionRejection

00.54722.6

3333.32

MSE

MSTF

different ismean oneleast at :H

versus:H

0

.05

a

3210

AppletApplet

Page 12: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

Confidence IntervalsConfidence Intervals

.error on based is and MSE where

11)(: Difference

: mean, singleA

22/

2/

dfts

nnstxx

n

stx

jijiji

i

ii

.error on based is and MSE where

11)(: Difference

: mean, singleA

22/

2/

dfts

nnstxx

n

stx

jijiji

i

ii

•If a difference exists between the treatment means, we can explore it with confidence intervals.

Page 13: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

Tukey’s Method forTukey’s Method forPaired ComparisonsPaired Comparisons

•Designed to test all pairs of population means simultaneously, with an overall error rate of overall error rate of .•Based on the studentized rangestudentized range, the difference between the largest and smallest of the k sample means.•Assume that the sample sizes are equalsample sizes are equal and calculate a “ruler” that measures the distance required between any pair of means to declare a significant difference.

Page 14: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

different. declared arethey

, than moreby differ means ofpair any If

11. Table from value ),(

size samplecommon

error MSE

means treatmentofnumber where

),( :Calculate

dfkq

n

dfdfs

k

n

sdfkq

i

i

different. declared arethey

, than moreby differ means ofpair any If

11. Table from value ),(

size samplecommon

error MSE

means treatmentofnumber where

),( :Calculate

dfkq

n

dfdfs

k

n

sdfkq

i

i

Tukey’s MethodTukey’s Method

Page 15: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The Breakfast ProblemThe Breakfast ProblemUse Tukey’s method to determine which of the three population means differ from the others.

02.54

4722.695.3

4)9,3(05.

sq 02.5

4

4722.695.3

4)9,3(05.

sq

No Breakfast Light Breakfast Full Breakfast

T1 = 37 T2 = 59 T3 = 53

Means 37/4 = 9.25 59/4 = 14.75 53/4 = 13.25

Page 16: Random samples of size n 1, n 2, …,n k are drawn from k populations with means  1,  2,…,  k and with common variance  2. Let x ij be the j-th measurement

The Breakfast ProblemThe Breakfast ProblemList the sample means from smallest to largest.

14.75 13.25 25.9

231 xxx14.75 13.25 25.9

231 xxx02.5 02.5

Since the difference between 9.25 and 13.25 is less than = 5.02, there is no significant difference. There is a difference between population means 1 and 2 however.

There is no difference between 13.25 and 14.75.

We can declare a significant difference in average attention spans between “no breakfast” and “light breakfast”, but not between the other pairs.