Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Minitab Notes for STAT 3503: Contrasts of Sample Means in ANOVA, Study notes of Statistics

Notes on contrasts of sample means in analysis of variance (anova) using minitab. It covers the definition of a contrast, estimation and hypothesis testing of contrasts, orthogonal contrasts, and deriving a two-way anova from a one-way design using contrasts. Examples and computations.

Typology: Study notes

2009/2010

Uploaded on 02/24/2010

koofers-user-9i2
koofers-user-9i2 🇺🇸

8 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Minitab Notes for STAT 3503
Dept. of Statistics — CSU Hayward
Unit 9: Contrasts of Sample Means
9.1. Definition of a Contrast
In designing an experiment with a balanced ANOVA model one often has in mind to estimate a linear
combination Λ = T = Σi ciµi of population means µi, where the components of c add to 0, and sums
are taken over all
a levels of the appropriate factor. (Here bold face indicates row vectors and
superscript T indicates the transpose.)
The estimate of Λ is H = cmT, where m is the row vector of a sample means (y-bars based on n
observations each) that estimate the a population means µi. The quantity
H, computable from
experimental results, is called a contrast of sample means.
9.2. Confidence Intervals and Tests for Designed Contrasts
Consider a fixed-effects one-way ANOVA model with n observations in each of
a groups. The
variance of each observation is σY2, estimated by MS(Error) = MSD, and the variance of H is
σH2 = σY2ccT / n. We let K = ccT = Σi ci2 so that σH2 = KσY2 / n.
The variance of the contrast H is estimated by sH2 = K(MSD/n). Thus a 95% confidence interval for Λ
is H ± t*sH, where t* = t(.025; ν) and ν is the df of MSD.
The quantity Q = nH2 / K is called the component of SS(Factor) corresponding to the contrast Λ. An
appropriate test of the hypothesis H0: Λ = 0 against the two-sided alternative is to reject (5% level)
when
Q/MSD = H2 / sH2 > F* = F(.05; 1, ν).
Note that t*2 = F*.
Properly interpreted, the formula for
Q given above holds for a wide variety of ANOVA models.
SS(Factor) may refer to any factor in the model. Then MSD is the denominator mean square of the
F-statistic for testing the significance of that factor, ν = df(MSD), and n is the number of observations
for each level of the factor (in more complex designs, including all cells that may be relevant).
Example: Refer to Example 15.2 in Ott & Longnecker (page 868). This is a randomized block
design with a = 3 insecticides and b = 4 plots considered as blocks. The observations are numbers
of seedlings. Insecticide means, based on n = b = 4 observations each, are 58 for Insecticide 1,
87 for Insecticide 2, and 80 for Insecticide 3. MS(Error) = 4.333 with ν = 6 degrees of freedom.
Suppose that Insecticide 1 is of one chemical type and that Insecticides 2 and 3 are both of
another type. Then one point of the experiment, as originally designed, may have been to
compare types of insecticides. That is, we would look at the difference between Insecticide 1
and the average of Insecticides 2 and 3.
The appropriate contrast would be H = 58 – 0.5(87 + 80) = –25.5, so that the vector of
components is c = (1, –.5, –.5), giving K = 1 + 0.25 + 0.25 = 1.50. Hence,
Q = bH2 / K = (4)(–25.5)2/1.50 = 1734.
pf3
pf4
pf5

Partial preview of the text

Download Minitab Notes for STAT 3503: Contrasts of Sample Means in ANOVA and more Study notes Statistics in PDF only on Docsity!

Minitab Notes for STAT 3503 Dept. of Statistics — CSU Hayward

Unit 9: Contrasts of Sample Means

9.1. Definition of a Contrast

In designing an experiment with a balanced ANOVA model one often has in mind to estimate a linear combination Λ = cμ T^ = Σ i ci μ i of population means μ i , where the components of c add to 0, and sums are taken over all a levels of the appropriate factor. (Here bold face indicates row vectors and superscript T^ indicates the transpose.) The estimate of Λ is H = cmT , where m is the row vector of a sample means (y-bars based on n observations each) that estimate the a population means μ i. The quantity H , computable from experimental results, is called a contrast of sample means.

9.2. Confidence Intervals and Tests for Designed Contrasts

Consider a fixed-effects one-way ANOVA model with n observations in each of a groups. The variance of each observation is σ Y^2 , estimated by MS(Error) = MSD, and the variance of H is σ H^2 = σ Y^2 ccT^ / n. We let K = ccT^ = Σ i ci^2 so that σ H^2 = K σ Y^2 / n. The variance of the contrast H is estimated by s (^) H^2 = K (MSD/ n ). Thus a 95% confidence interval for Λ is H ± t* s (^) H , where t* = t(.025; ν) and ν is the df of MSD. The quantity Q = nH^2 / K is called the component of SS(Factor) corresponding to the contrast Λ. An appropriate test of the hypothesis H 0 : Λ = 0 against the two-sided alternative is to reject (5% level) when Q /MSD = H^2 / s (^) H^2 > F* = F(.05; 1, ν). Note that t^2 = F. Properly interpreted, the formula for Q given above holds for a wide variety of ANOVA models. SS(Factor) may refer to any factor in the model. Then MSD is the denominator mean square of the F-statistic for testing the significance of that factor, ν = df(MSD), and n is the number of observations for each level of the factor (in more complex designs, including all cells that may be relevant).

Example: Refer to Example 15.2 in Ott & Longnecker (page 868). This is a randomized block design with a = 3 insecticides and b = 4 plots considered as blocks. The observations are numbers of seedlings. Insecticide means, based on n = b = 4 observations each, are 58 for Insecticide 1, 87 for Insecticide 2, and 80 for Insecticide 3. MS(Error) = 4.333 with ν = 6 degrees of freedom.

Suppose that Insecticide 1 is of one chemical type and that Insecticides 2 and 3 are both of another type. Then one point of the experiment, as originally designed, may have been to compare types of insecticides. That is, we would look at the difference between Insecticide 1 and the average of Insecticides 2 and 3.

The appropriate contrast would be H = 58 – 0.5(87 + 80) = –25.5, so that the vector of components is c = (1, –.5, –.5), giving K = 1 + 0.25 + 0.25 = 1.50. Hence,

Q = bH^2 / K = (4)(–25.5)^2 /1.50 = 1734.

Because Q / MS(Error) = 1734 / 4.333 = 400.15 > F(.05; 1, 6) = 5.987, we reject the null hypothesis that Λ = 0 and conclude that the two chemical types of insecticides differ. In fact, because s (^) H^2 = (1.50)(4.333) / 4 = 1.625 = (1.274)^2 and t* = t(.025; 6) = 2.447, we estimate that the difference between types is

–25.5 ± (2.447)(1.274) or –25.5 ± 3.13. Notice that this 95% confidence interval does not include 0.

9.3. Orthogonal Contrasts

Infinitely many contrasts H may be formed using the treatment means of a factor if the coefficients ci are restricted only in that they must sum to 0. Two contrasts H 1 and H 2 are said to be orthogonal if and only if c 1 c 2 T^ = Σ i c 1 i c 2 i = 0, where the subscripts of H 1 are c 1 i and those of H 2 are c 2 i. If a factor has a – 1 df, then one can find a – 1 orthogonal contrasts H 1 , H 2 , ..., Ha –1 among the treatment means; these are called a complete set of orthogonal contrasts. It can be shown that the sum Σ j Qj of the corresponding a – 1 components is equal to SS(Factor). We say that SS(Factor) has been partitioned into a – 1 orthogonal components. Example: Returning to Ott & Longnecker's Example 15.2, we find that the contrast H 2 = 87 – 80 = 7.00 estimates the difference between the two insecticides of the second type (and ignores Insecticide 1). It has coefficients c 21 = 0, c 22 = 1, and c 23 = 1. The contrasts H 1 (called simply H in Section 9.2 above) and H 2 are orthogonal, because c 1 c 2 T^ = (1)(0) + (–.5)(1) + (–.5)(–1) = 0. There are a – 1 = 2 df for the Insecticide effect, so H 1 and H 2 are a complete set of orthogonal contrasts. The component Q 2 of SS(Insecticide) corresponding to the contrast H 2 is Q 2 = (4)(7.00)^2 / 2 = 98.00. As anticipated, Q 1 + Q 2 = 1734.00 + 98.00 = 1832.00 = SS(Insecticide). Do the two chemically similar insecticides (2 and 3) differ significantly in effect? Because Q 2 / MS(Error) = 98.00 / 4.333 = 22.6 > F(.05; 1, 6) = 5.987, we conclude that they do.

9.4. Testing Contrasts Suggested by the Data

In the case where a test of a contrast is suggested by looking at the data (rather than being one of very few contrasts established in advance as part of the experimental plan), more caution is warranted. Then H 0 is rejected at the 5% level if H^2 / s (^) H^2 = Q / MSD > S^2 = ( a – 1)F, where F = F(.05, a –1, ν). This is a relatively conservative procedure because the test statistic for Factor is MS(Factor)/MSD > F* and Q / ( a –1) cannot exceed MS(Factor) = SS(Factor) / ( a –1). In other words, in testing the contrast rather than the Factor, SS(Factor) is replaced by one of its components in forming the F-ratio. The Scheffé multiple comparison procedure is based on confidence intervals H ± S s (^) H.

Diet Weight Gain (g)—Ten Rats Per Diet Group Mean 1^73 102 118 104 81 107 100 87 117 111 100. 2^90 76 90 64 86 51 72 90 95 78 79. 3^98 74 56 111 95 88 82 77 86 92 85. 4^107 95 97 80 98 74 74 67 89 58 83.

Data taken from a larger study reported in Snedecor and Cochran: Statistical Methods, 7th ed., Chapter 16 (Factorial Designs), Iowa State University Press, 1980, Ames, IA.

9.5.2. One-Way Analysis of Variance

A one-way ANOVA shows that there are significant differences among the diet groups as to weight gain.

Analysis of Variance for WtGain

Source DF SS MS F P

Diet 3 2404.1 801.4 3.58 0. Error 36 8049.4 223.


Total 39 10453.

9.5.3. Contrasts

Standard multiple comparison methods could be used to explore the patterns of differences present. (Use Fisher's LSD to find this pattern of differences.) Here we investigate several contrasts among the group means based on additional information about the diets. Actually, the protein in these diets are of two different Kinds: Diets 1 and 2 were based on beef, while Diets 3 and 4 on cereal. Furthermore, the diets contained different Amounts of protein: Diets 1 and 3 had a high level protein, while Diets 2 and 4 were low in protein. Because the Diet effect has three degrees of freedom, a complete set of three contrasts can be specified. Suppose that, knowing the characteristics of the four diets, the experimenter designated three "design" contrasts before seeing the data. The vectors of coefficients and rationale are as follows:

(1, 1, –1, –1) Compares Beef against Cereal ("Kind") (1, –1, 1, –1) Compares High against Low ("Amount") (1, –1, –1, 1) Interaction between Kind and Amount

Also, after seeing that Beef at the High protein level gave the best results among the four treatments, suppose that the experimenter decided to consider an additional ad-hoc contrast:

(3, –1, –1, –1) Compares Beef/High against all other diets.

In terms of the notation developed earlier n = 10 and MSD = MS(Error) = 223.6. Computations of components Q and tests of the significance of these contrasts are summarized in the following table:

Status Coefficients K H Q Q /MSD Critical Value Signif @ 5%

(1, 1, –1, –1) 4 9.4 220.9 0.99 F(.05;1,36)= 4.11 No (1, –1, 1, –1) 4 22.8 1299.6 5.81 4.11 Yes

Pre-chosen (orthogonal set) (1, –1, –1, 1) 4 18.8 883.6 3.95 4.11 "Nearly"

Ad hoc (3, –1, –1, –1) 12 51.0 2167.5 9.69 3F(.05;3,36)=8.60 Yes

The designed contrasts show a significant Amount effect and suggest the possibility of interaction. The ad hoc contrast is also significant, even though it is judged against a more stringent standard. [If the first contrast is expressed as (.5, .5, –.5, –.5), then find its component Q 1. Is it still 220.9?]

9.5.4. Two-Way Analysis of Variance

In order to analyze this experiment as a two-way ANOVA using Minitab, we create columns of subscripts for Kind (with Beef=1 and Cereal=2) and for Amount (with High=1 and Low=2).

Analysis of Variance for WtGain

Source DF SS MS F P

Kind 1 220.9 220.9 0.99 0. Amount 1 1299.6 1299.6 5.81 0. Kind*Amount 1 883.6 883.6 3.95 0. Error 36 8049.4 223.


Total 39 10453.

Notice that the Diet effect (with 3 df) of the one-way ANOVA shown previously has been resolved into three effects in this two-way ANOVA: Kind, Amount, and Interaction (each with 1 df). Verify that the SSs for these three effects sum to SS(Diet) in the one-way ANOVA. The three designed contrasts also represent one degree of freedom each. They were chosen so each of them corresponds to one of the three effects in the two-way ANOVA. Verify that the components Q of these three contrasts correspond to the SSs for the three effects, and that the tests of the contrasts correspond exactly to the F-tests of the three effects in the two-way ANOVA table. Finally, notice that the component 2167.5 for the ad hoc contrast is smaller than SS(Diet) = 2404.1 in the one-way ANOVA, and that the test of significance of that contrast uses the same standard as was used to test the Diet effect: divide by 3 and reject at the 5% level if the result exceeds F(.05; 3, 36).

9.5.5. Problems

The full dataset from which the data above were taken has two additional diets, each with 10 replications. Diet 5 consisted of Pork with a High protein level, Diet 6 of Pork with a Low protein level. (There were 60 rats in the full experiment.) The additional data are given in the last two rows of the table below: