1

Unit 10

10.1.1."For your convenience, the data in the table above have been listed below, reading across rows. Cut an paste these data into c1 of a Minitab worksheet, labeled Content. Also make three subscript columns: c2 for Site, using numbers 1 and 2; c3 for Batch, using numbers 1-3 as shown in the table; and c4 with batch numbers 1-6, as discussed above, labeled Bat. When you are finished the contents of your worksheet should be as in the printout below."

After pasting in the data, transposing and stacking it and adding the column indices, the data appears as follows:

Data Display

Row Content Site Batch Bat

1 5.03 1 1 1

2 5.10 1 1 1

3 5.25 1 1 1

4 4.98 1 1 1

5 5.05 1 1 1

6 4.64 1 2 2

7 4.73 1 2 2

8 4.82 1 2 2

9 4.95 1 2 2

10 5.06 1 2 2

11 5.10 1 3 3

12 5.15 1 3 3

13 5.20 1 3 3

14 5.08 1 3 3

15 5.14 1 3 3

16 5.05 2 1 4

17 4.96 2 1 4

18 5.12 2 1 4

19 5.12 2 1 4

20 5.05 2 1 4

21 5.46 2 2 5

22 5.15 2 2 5

23 5.18 2 2 5

24 5.18 2 2 5

25 5.11 2 2 5

26 4.90 2 3 6

27 4.95 2 3 6

28 4.86 2 3 6

29 4.86 2 3 6

30 5.07 2 3 6

Alternatively, here is a method of getting the same result by pasting data into the Session window. (The DATA prompts in blue appear after typing end and pressing Enter.)

MTB > name c1 'Content'

MTB > set c1

DATA> 5.03 5.10 5.25 4.98 5.05 4.64 4.73 4.82 4.95 5.06

DATA> 5.10 5.15 5.20 5.08 5.14 5.05 4.96 5.12 5.12 5.05

DATA> 5.46 5.15 5.18 5.18 5.11 4.90 4.95 4.86 4.86 5.07

DATA> end

MTB > name c2 'Site'

MTB > set c2

DATA> (1:2)15

DATA> end

MTB > name c3 'Batch'

MTB > set c3

DATA> 2(1:3)5

DATA> end

MTB > name c4 'Bat'

MTB > set c4

DATA> (1:6)5

DATA> end

10.1.2."Make a table of the data based on Site and Batch. Also, make a summary table showing the means for each batch at each site. In what way might these tables be misleading without explanation or editing of headers?"

Following is the table based on Site and Batch and the summary table with the means at each site:

Tabulated statistics: Site, Batch

Rows: Site Columns: Batch

1 2 3

1 5.03 4.64 5.10

5.10 4.73 5.15

5.25 4.82 5.20

4.98 4.95 5.08

5.05 5.06 5.14

2 5.05 5.46 4.90

4.96 5.15 4.95

5.12 5.18 4.86

5.12 5.18 4.86

5.05 5.11 5.07

Cell Contents: Content : DATA

Tabulated statistics: Site, Batch

Rows: Site / Batch

Content

Mean

1

1 5.082

2 4.840

3 5.134

2

1 5.060

2 5.216

3 4.928

All

All 5.043

These tables might be misleading if one did not know, for example, Batch 1 at Site 1 is not the same as Batch 1 at Site 2. In other words, it is not clear from the table that Batches are nested within Sites.

10.2.1."Why can there be no interaction term between Site and Batch? Explain this on two levels:

(a) From a logical point of view, why does the concept of interaction not make sense here?

(b) From a notational point of view, what subscripts would be involved in an interaction term, and why would the model not support such a term?"

(a) The concept of interaction between site and batch doesn't apply because no batch is measured at more than one site.

(b) If there were an interaction term, the notation would have to be something like (B)ij or {B()}ij(i), where i corresponds to Sites and j corresponds to batches; in short it would have to contain subscripts i and j. However, the Batch term B()j(i) contains subscripts i and j. Thus "interaction" would be confounded with Batch.

10.2.2."Make box plots of the data as follows:

(a) Broken out first by Site. Although this graphic obscures the finer batch structure of the experiment, it gives a crude overall view that might reveal any differences between the two sites (as to either location or spread). Interpret what you see.

The Q1, median, and Q3 values are very similar between the two sites. There is no evidence that Content is systematically different between the sites. In this view there are possible outliers—one on the low side for Site 1 and one on the high side for Site 2. However, there is seems to be no clear evidence that the variability is different at the two sites.

(b) Broken out by Bat (which uses values 1 through 6). Although this plot does not explicitly include Site in its display, it is easy to remember that the first three batches are from Site I and the last three from Site II. Do you see evidence of important batch-to-batch variability in Content (do the batch medians differ)? Do you see evidence of heteroscedasticity among the batches (are some batches more disperse than others)? Any skewness or outliers? (Note: you will get slightly different results here depending on whether you use character or pixel graphics box plots. The outlier rule for box plots is based on the interquartile range IQR = Q3 - Q1. Pixel box plots use the values of the lower and upper quartiles shown in the describe procedure. Character box plots use a slightly different rule for evaluating quartiles. The difference between these rules is trivial for large sample sizes, but here there are only n = 5 samples per batch.)"

There seem to be significant differences in batch medians (both among the first three 'Bat's and among the last three). This indicates that batch-to-batch variability may be important within each site. No outliers are evident. Also the variability is somewhat different from batch to batch (for example, low for Bat 3 and high for Bat 2) A formal test can determine whether these differences are significant.

MTB > gstd

MTB > boxp c1;

SUBC> by c4.

Boxplot

Bat

------

1 ---I + I *

------

------

2 ------I + I------

------

----

3 -I +----

----

-----

4 ------+ I

-----

---

5 --I + O

---

------

6 I + I------

------

--+------+------+------+------+------+----Content

4.65 4.80 4.95 5.10 5.25 5.40

10.2.3."Does Bartlett's test of homogeniety show significant differences in the variability within the

six batches? Levene's test? (Note: Levene's test measures variability by taking absolute deviations

from group medians. Bartlett's test uses squared deviations from group means. Thus Levene's test is

less sensitive to outliers and near-outliers.) In case you have forgotten, the menu path is STAT 

ANOVA  Equal Variances. Use Bat to separate all six batches for this test."

Despite the spread of the data in the batches displayed in the box plots of the previous problem, neither Bartlett's test nor Levene's test detects significant heteroscedastisticy (inequality of variance) from batch to batch.

10.2.4."Whatever you may have found in the previous two problems, suppose that you were convinced that the variability among batches for Site I is much larger than for Site II. This would violate an equal variance assumption of the model. How might you analyze the data to investigate the importance of variability among batches?"

First, analyze the two Sites separately—do a one-way random-effect ANOVA for each site to see whether batch variability is an important component of Content variability.

Second, find the means of the three batches at each site and do a separate-variances t-test to compare sites (three "observations" at each site).

10.3.1."Look at the normal probability plot of residuals (from the nested ANOVA), give the P-value of the Anderson-Darling test of normality, and interpret your findings."

The normal probability plot of the residuals is as follows:

The Anderson-Darling p-value is .046, which means that the null hypothesis of normality is (just barely) rejected at the 5% significance level. However, the normality test fails by a very small amount, departure from a straight line is not severe, and the batch effect is very strong. Therefore, any departure from normality is unlikely to invalidate the conclusions from the ANOVA.

10.3.2. "Show how the estimate 0.02028 is obtained from the ANOVA table."

According to the MLE of B2 is [MS(Batch) – MS(Error)]/5 = (.11350 – .01209)/ 5 = 0.020282.

Note: Here is a transcription of the EMS table from which it is clear that Site is tested against Batch and Batch is tested against Error. This also provides the basis for finding the MLE of B2.

(The coefficient 15 and the definition of are correct under the restriction ii = 0.)

EMS(Site): 2 + 52B + 15

EMS(Batch): 2 + 52B

EMS(Error):2

with  = ii2/(a-1)

10.3.3."Suppose that the last two observations (4.86 and 5.07) for Batch 3 at Site 2 were not taken. Analyze the resulting unbalanced experiment. Are the conclusions different than for the full balanced experiment?"

Because the design is now unbalanced, the ANOVA cannot be done using Minitab's 'balanced anova' procedure. The results using Minitab's 'glm' procedure are as follows:

General Linear Model: Content versus Site, Batch

Factor Type Levels Values

Site fixed 2 1, 2

Batch(Site) random 6 1, 2, 3, 1, 2, 3

Analysis of Variance for Content, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F P

Site 1 0.02959 0.01141 0.01141 0.11 0.759 x

Batch(Site) 4 0.43409 0.43409 0.10852 9.06 0.000

Error 22 0.26359 0.26359 0.01198

Total 27 0.72727

x Not an exact F-test.

S = 0.109459 R-Sq = 63.76% R-Sq(adj) = 55.52%

Unusual Observations for Content

Obs Content Fit SE Fit Residual St Resid

6 4.64000 4.84000 0.04895 -0.20000 -2.04 R

10 5.06000 4.84000 0.04895 0.22000 2.25 R

21 5.46000 5.21600 0.04895 0.24400 2.49 R

R denotes an observation with a large standardized residual.

Expected Mean Squares, using Adjusted SS

Expected Mean Square

Source for Each Term

1 Site (3) + 4.5000 (2) + Q[1]

2 Batch(Site) (3) + 4.6154 (2)

3 Error (3)

Error Terms for Tests, using Adjusted SS

Source Error DF Error MS Synthesis of Error MS

1 Site 4.02 0.10611 0.9750 (2) + 0.0250 (3)

2 Batch(Site) 22.00 0.01198 (3)

Variance Components, using Adjusted SS

Estimated

Source Value

Batch(Site) 0.02092

Error 0.01198

The conclusions with missing data are very similar to conclusions for the balanced experiment: Batch is highly significant at the 5% level (P-value = .000) and Site is not significant (P-value = .759). Note that the F-test is only approximate in the unbalanced design because there is no line in the ANOVA table that has EMS 2 + 4.50002B.

10.4.1."Suppose that you read the results of this experiment in a report. The average Content is given for each of the three batches at each site (six averages in all), but individual observations are not given. The claim is made that there is no systematic difference in content between the sites.

(a) Make a table of the six batch means, put them into a Minitab worksheet, and perform an ANOVA to test for a difference between the two sites. What conclusion do you draw? How does your F-test for the Site effect compare to F-test shown in Section 3 for Site using the fully detailed dataset?

In this version of the problem, the six batch means become the replications – 3 for each site and the analysis is a 1-way ANOVA. The results are as follows:

ANOVA: BatchMean versus SiteNew

Factor Type Levels Values

SiteNew fixed 2 1, 2

Analysis of Variance for BatchMean

Source DF SS MS F P

SiteNew 1 0.00365 0.00365 0.16 0.709

Error 4 0.09080 0.02270

Total 5 0.09445

S = 0.150667 R-Sq = 3.87% R-Sq(adj) = 0.00%

Expected

Mean Square

for Each

Term (using

Variance Error restricted

Source component term model)

1 SiteNew 2 (2) + 3 Q[1]

2 Error 0.02270 (2)

The F-test for SiteNew is identical to that for Site in section 3, with an F of .16 and a p-value of .709. This is true even though all the MS terms are different and the TSS's are not the same. (How can it be that the F-ratiosarethe same when the denominators and numerators are different?)

This ANOVA is equivalent to a pooled, two-sided two-sample t-test in which the T statistic has 4 DF.

(b) Suppose it is important for you to detect a difference in content between sites that is 1/2 unit or larger. In fact you do not want the probability of a Type II error for such a difference to be larger than 10% when testing at the 10% level. How many batches should you use from each site? (Hint: Use standard formulas for sample size in a 2-sample t-test such as those in O/L 6e, p324. Compare with the results from the procedure in the menu path STAT Power and sample size under either two-sample
t-test or one-way ANOVA.)"

From part a, the standard deviation is .151. To detect a .5 difference between the sites, with a Type II error of 10% and a Type I error of 10%, the number of batches can be calculated as follows:

n = 2s2(z/2 + z)2/2 = 2(.151)2(1.645+ 1.28)2/.52 = 1.53  2

In Minitab, the following commands perform a power test for the 2-sample t-test:

MTB > Power;

SUBC> TTwo;

SUBC> Difference .5;

SUBC> Power .9;

SUBC> Sigma .151;

SUBC> Alpha 0.1.

Power and Sample Size

2-Sample t Test

Testing mean 1 = mean 2 (versus not =)

Calculating power for mean 1 = mean 2 + difference

Alpha = 0.1 Assumed standard deviation = 0.151

Sample Target

Difference Size Power Actual Power

0.5 3 0.9 0.949049

The sample size is for each group.

The discrepancy (2 in the hand computation, 3 in the Minitab output) is due to the fact that the hand computation is really for a two-sample z-test. With relatively large sample sizes, results are very similar for z-tests and t-tests. But when the sample sizes are small, as here, there can be important differences.

10.4.2."Returning to the full data in Section 1, consider two alternate, fictional scenarios for how the data were collected.

(a) Suppose that there are exactly three production facilities at each of the two sites. One batch comes from each facility. Why would you now consider Batch (or maybe now better called "Facility") to be a fixed effect? Would this make any difference in how the F-ratios are formed?

Facility would now be a fixed effect, still nested within Site. From the EMS table on page 1011, the
F-ratios for both effects fixed have MSE in the denominator: MSA/MSE for Site and MSB(A)/MSE for Facility. When Batch was a random effect, the F-ratio for Batch was the same: MSB(A)/MSE. However, in the original data structure, the F-ratio for Site was MSA/MSB(A).

ANOVA: Content versus Site, Batch

Factor Type Levels Values

Site fixed 2 1, 2

Facil(Site) fixed 3 1, 2, 3

Analysis of Variance for Content

Source DF SS MS F P

Site 1 0.01825 0.01825 1.51 0.231

Facil(Site) 4 0.45401 0.11350 9.39 0.000

Error 24 0.29020 0.01209

Total 29 0.76247

S = 0.109962 R-Sq = 61.94% R-Sq(adj) = 54.01%

Expected Mean Square

Variance Error for Each Term(using

Source component term restricted model)

1 Site 3 (3) + 15 Q[1]

2 Facil(Site) 3 (3) + 5 Q[2]

3 Error 0.01209 (3)

(b) At both sites suppose that Batch 1 is newly manufactured, Batch 2 has been stored for one year, and Batch 3 has been stored for two years. Is Batch (or maybe now better called "Age") a fixed or a random effect? What important difference does this change make in the story make in the model?"

Batch is now a fixed effect because the batches aren't randomly selected. Furthermore, Batch is now a crossed effect because the meaning of Batch is the same for both sites – Batch 2 at both sites denotes a batch that has been stored for two years. The appropriate model becomes a two-factor fixed-effects ANOVA with interaction.

ANOVA: Content versus Site, Batch

Factor Type Levels Values

Site fixed 2 1, 2

Age fixed 3 1, 2, 3

Analysis of Variance for Content

Source DF SS MS F P

Site 1 0.01825 0.01825 1.51 0.231

Age 2 0.01153 0.00576 0.48 0.627

Site*Age 2 0.44249 0.22124 18.30 0.000

Error 24 0.29020 0.01209

Total 29 0.76247

S = 0.109962 R-Sq = 61.94% R-Sq(adj) = 54.01%

Expected Mean Square

Variance Error for Each term (using

Source component term restricted model)

1 Site 4 (4) + 15 Q[1]

2 Age 4 (4) + 10 Q[2]

3 Site*Age 4 (4) + 5 Q[3]

4 Error 0.01209 (4)

If the data had actually been collected according to this crossed two-factor design, there would have been disorderly interaction between Site and "Age."

Copyright © 2005, 2010 by Bruce E. Trumbo. All rights reserved. Intended primarily for use in Stat 6305 at CSU East Bay. Please request permission for other uses. This is a draft comments/corrections welcome: . These notes based in part upon notes by Elizabeth Ellinger.