Conditional Effects Contrasts of interest main effects" for factor 1: μ i: μ:: i = 1; ; : : : ; a μ i: μ k: i = k main effects" for factor : μ :j μ::

Size: px
Start display at page:

Download "Conditional Effects Contrasts of interest main effects" for factor 1: μ i: μ:: i = 1; ; : : : ; a μ i: μ k: i = k main effects" for factor : μ :j μ::"

Transcription

1 8. Two-way crossed classifications Example 8.1 Days to germination of three varieties of carrot seed grown in two types of potting soil. Soil Variety Type 1 1 Y 111 = Y 11 = 1 Y 11 = 1 Y 11 = 10 Y 1 = 1 Y 1 = Y 11 = 11 Y 11 = 1 Y 1 = 1 Y 1 = 18 Y 1 = 1 Y = 9 Y 1 = 19 Y = 1 Y 1 = 18 9 This is called an unbalanced" factorial experiment. Sample sizes Soil Variety type 1 1 n 11 = n 1 = n 1 = n 1 = n = 1 n = In general we have i = 1; ; : : : ; a j = 1; ; : : : ; b n ij > 0 levels for the first factor levels for the second factor observations at the i-th level of the first factor and the j-th level of the second factor 9 We will restrict our attention to normal-theory Gauss-Markov models. Cell means" model: where Y ijk = μ ij + ijk ijk ο NID(0; ff ) 8 >< >: i = 1; : : : ; a j = 1; : : : ; b k = 1; : : : ; n ij Clearly, E(Y ijk ) = μ ij is estimable if n ij > 0. 9 Overall mean response: μ:: = 1 ab ax bx μ ij i=1 j=1 Mean response at the i-th level of factor 1, averaging across the levels of factor. μ i: = 1 b bx j=1 μ ij Mean response at the j-th level of factor, averaging across the levels of factor 1 μ :j = 1 a ax i=1 μ ij 98

2 Conditional Effects Contrasts of interest main effects" for factor 1: μ i: μ:: i = 1; ; : : : ; a μ i: μ k: i = k main effects" for factor : μ :j μ:: j = 1; ; : : : ; b μ :j μ :` j = ` μ ij μ kj 8>< μ ij μ i` 8>< >: >: i = k j = 1; ; : : : ; b j = ` i = 1; ; : : : ; a Interaction Contrasts (μ ij μ kj ) (μ i` μ k`) = (μ ij μ i`) (μ kj μ k`) = μ ij μ kj μ i` + μ k` All of these contrasts are estimable when n ij > 0 for all (i; j) An effects" model Y ijk = μ + ff i + fi j + fl ij + ij because E( μ Y ij: ) = μ ij Any linear function of estimable functions is estimable where ijk ο NID(0; ff ) i = 1; ; : : : ; a j = 1; ; : : : ; b k = 1; ; : : : ; n ij >

3 Y Y 11 Y 11 Y 11 μ Y 1 ff 1 Y 11 ff Y 1 fi 1 Y 11 fi = Y 1 fi Y 1 fl 11 Y 1 fl 1 Y 1 fl 1 Y fl 1 Y fl fl Y The resulting restricted model is where Y ijk = μ + ff i + fi j + fl ij + ijk ijk ο NID(0; ff ) and ff 1 = 0 fi 1 = 0 8 >< >: i = 1; : : : ; a j = 1; : : : ; b k = 1; : : : ; n ij fl i1 = 0 for all i = 1; : : : ; a fl 1j = 0 for all j = 1; : : : ; b 0 We will call these baseline" restrictions. 0 Soil Type Soil Variety 1 Variety Variety Means 1 μ 11 = μ μ 1 = μ + fi μ 1 = μ + fi μ + fi1+fi μ 1 = μ + ff 1 μ = μ + ff μ = μ + ff μ + ff +fi + fl +fi + fl + fi+fi + fl+fl μ + ff μ + ff fl + fi + μ + ff Interpretation: μ = μ 11 = E(Y 11k ) + fi + fl is the mean response with both factors at the first level. ff i = μ i1 μ 11 = E(Y i1k ) E(Y 11k ) is the difference in mean responses between levels i and 1 of factor 1 when factor is at level 1. 0 Soil Type Soil Variety 1 Variety Variety Means 1 μ 11 = μ μ 1 = μ + fi μ 1 = μ + fi μ + fi1+fi μ 1 = μ + ff 1 μ = μ + ff μ = μ + ff μ + ff +fi + fl +fi + fl + fi+fi + fl+fl μ + ff μ + ff fl + fi + μ + ff Interpretation + fi + fl fi j = μ 1j μ 11 = E(Y 1jk ) E(Y 11k ) for j = 1; ; : : : ; b is the difference in the mean responses for levels j and 1 of factor when factor 1 is at level 1. 0

4 Soil Type Soil Variety 1 Variety Variety Means 1 μ 11 = μ μ 1 = μ + fi μ 1 = μ + fi μ + fi1+fi μ 1 = μ + ff 1 μ = μ + ff μ = μ + ff μ + ff +fi + fl +fi + fl + fi+fi + fl+fl μ + ff μ + ff + fi + fl μ + ff + fi + fl Interaction: fl ij = (μ ij μ ib ) (μ aj μ ab ) = (μ ij μ aj ) (μ ib μ ab ) Note that fl ij fl i` fl kj +fl k` = μ ij μ i` μ kj +μ k` for any (i; j) and (k; `) 0 Matrix formulation: Y 111 Y 11 Y 11 Y 11 Y 1 Y 11 Y 1 Y 11 Y 1 Y 1 Y 1 Y 1 Y 1 Y Y = μ ff fi fi fl fl " " Y = Xfi + where Y ο N(Xfi;ff I) 08 Least squares estimation: b = ^μ ^ff ^fi ^fi ^fl ^fl = (X T X) 1 X T Y = μy 11 μy 1 μ Y 11 μy 1 μ Y 11 μy 1 μ Y 11 μy μ Y 1 μ Y 1 + μ Y 11 μy μ Y 1 μ Y 1 + μ Y Restrictions must involve nonestimable" quantities for the unrestricted effects" model. Baseline restrictions: (SAS) ffa = 0 fi b = 0 fl ib = 0 for all i = 1; : : : ; a fl aj = 0 for all j = 1; : : : ; b Baseline restrictions: (S-PLUS) ff 1 = 0 fi 1 = 0 fl i1 = 0 for all i = 1; : : : ; a fl 1j = 0 for all j = 1; : : : ; b 10

5 ±-restrictions: Y ijk =! + fl i + ffi j + ij + ijk where - μ ij = E(Y ijk ) Variety 1 Variety Variety Means Soil μ 11 =! + fl 1 μ 1 =! + fl 1 μ 1 =! + fl 1 μ 1: =! + fl 1 type 1 +ffi ffi + 1 +ffi + 1 Soil μ 1 =! + fl μ =! + fl μ =! + fl μ : =! + fl type +ffi ffi + +ffi + means μ :1 =! + ffi 1 μ : =! + ffi μ : =! + ffi ijk ο NID(0; ff ) ax i=1 fl i = 0 bx j=1 ffi j = 0 ax i=1 ij = 0 for each j = 1; : : : ; b bx j=1 ij = 0 for each i = 1; : : : ; a Interpretation:! = 1 ab ax bx μ ij i=1 j=1 is the overall mean germination time, averaging across all soil types and all varieties used in this study Variety 1 Variety Variety Means Soil μ 11 =! + fl 1 μ 1 =! + fl 1 μ 1 =! + fl 1 μ 1: =! + fl 1 type 1 +ffi ffi + 1 +ffi + 1 Soil μ 1 =! + fl μ =! + fl μ =! + fl μ : =! + fl type +ffi ffi + +ffi + means μ :1 =! + ffi 1 μ : =! + ffi μ : =! + ffi Interpretation: and! + ffi j = μ :j ffi j = μ :j μ:: ffi j ffi k = (μ :j μ::) (μ :k μ::) = μ :j μ :k is the difference between mean germination times for varieties j and k, averaging across soil types. 1 Variety 1 Variety Variety Means Soil μ 11 =! + fl 1 μ 1 =! + fl 1 μ 1 =! + fl 1 μ 1: =! + fl 1 type 1 +ffi ffi + 1 +ffi + 1 Soil μ 1 =! + fl μ =! + fl μ =! + fl μ : =! + fl type +ffi ffi + +ffi + means μ :1 =! + ffi 1 μ : =! + ffi μ : =! + ffi Interpretation: fl 1 fl = μ 1: μ : is the difference in the mean germination times for different soil types, averaging across varieties. 1

6 Variety 1 Variety Variety Means Soil μ 11 =! + fl 1 μ 1 =! + fl 1 μ 1 =! + fl 1 μ 1: =! + fl 1 type 1 +ffi ffi + 1 +ffi + 1 Soil μ 1 =! + fl μ =! + fl μ =! + fl μ : =! + fl type +ffi ffi + +ffi + means μ :1 =! + ffi 1 μ : =! + ffi μ : =! + ffi Interaction: ij = μ ij (! + fl i + ffi j ) is a deviation from an additive model. Then, ij kj i` + k` = μ ij μ kj μ i` + μ k` Matrix formulation Y 111 Y 11 Y Y Y 11 1 Y Y 1! 1 Y 11 fl 1 11 = Y 1 ffi 1 1 Y 1 ffi + 11 Y Y Y Y 1 1 Y This uses the ±-restrictions to obtain fl = fl 1 ffi = ffi 1 ffi 1 = 11 1 = 11 1 = 1 = 1 = Least squares estimation b = ^! ^fl ^ffi 1 ^ffi ^ 11 ^ 1 = (X T X) 1 X T Y = 1 X X μy ij: i j 1 X j 1 X i μy 1j: 1 μy i1: 1 X X μy ij: X X μy ij: = X X μy ij: 1 X μy i: 1 i μy 11: ^! ^fl 1 ^ffi 1 μy 1: ^! ^fl 1 ^ffi 1:8 :1 : : 0: : If restrictions are placed on nonestimable" functions of parameters in the unrestricted effects" model, then The resulting models are reparameterizations of each other. 1 18

7 The solution to the normal equations ^Y = P X Y e = Y ^Y = (I P X )Y SSE = e T e = Y T (I P X )Y ^Y T ^Y = Y T PX Y SS model = Y T (P X P 1 )Y are the same for any set of restrictions. b = (X T X) 1 X T Y and interpretations of the corresponding parameters will not be the same for all such sets of restrictions. If you were to place restrictions on estimable functions of parameters in Y ijk = μ + ff 1 + fi j + fl ij + ijk then you would change 19 Analysis of variance rank(x) Y T Y = Y T PμY + Y T (Pμ;ff Pμ)Y X space spanned by the columns of ^Y = X(X T X) X T Y and OLS estimators of other estimable quantities. +Y T (P μ;ff;fi Pμ;ff)Y +Y T (P X P μ;ff;fi )Y +Y T (I P X )Y = R(μ) + R(ffjμ) + R(fijμ; ff) +R(fljμ; ff; fi) + SSE 0

8 Y 111 Y 11 Y 11 Y 11 Y 1 Y 11 Y 1 Y 11 = Y 1 Y 1 Y 1 Y 1 Y 1 Y Y μ ff 1 ff fi 1 fi fi fl 11 + fl 1 fl fl 1 fl fl " - - " call this call this call this call this X μ X ff X fi X fl Define: X μ = X μ X μ;ff = [X μ jx ff ] X μ;ff;fi = [X μ jx ff jx fi ] X = [X μ jx ff jx fi jx fl ] P μ = X μ (X T μ X μ) 1 X T μ P μ;ff = X μ;ff (X T μ;ff X μ;ff) X T μ;ff P μ;ff;fi = X μ;ff;fi (X T μ;ff;fi X μ;ff;fi) X T μ;ff;fi P X = X(X T X) X T 1 The following three model matrices correspond to reparameterizations of the same model: μ ff 1 ff fi 1 fi fi fl 11 fl 1 fl 1 fl 1 fl fl R(μ) = Y T P μ Y is the same for all three models μ ff 1 ff fi 1 fi fi fl 11 fl 1 fl fl 1 fl fl

9 R(μ; ff) = Y T P μ;ff Y is the same for all three models and so is R(ffjμ) = R(μ; ff) R(μ) μ ff 1 ff fi 1 fi fi fl 11 fl 1 fl fl 1 fl fl R(μ; ff; fi) = Y T P μ;ff;fi Y is the same for all three models and so is R(fijff) = R(μ; ff; fi) R(μ; ff) μ ff 1 ff fi 1 fi fi fl 11 fl 1 fl fl 1 fl fl R(μ; ff; fi; fl) = Y T P X Y is the same for all three models and so is R(fljμ; ff; fi) = R(μ; ff; fi; fl) R(μ; ff; fi) μ ff 1 ff fi 1 fi fi fl 11 fl 1 fl fl 1 fl fl Consequently, the partition Y T Y = Y T PμY + Y T (P μ;fi Pμ)Y +Y T (P μ;ff;fi P μ;fi )Y +Y T (P X P μ;ff;fi )Y +Y T (I P X )Y = R(μ) + R(fijμ) + R(ffjμ; fi) +R(fljμ; ff; fi) + SSE is the same for all three models. 8

10 Normal Theory Gauss-Markov Model ijk ο NID(0; ff ) By Cochran's Theorem, these quadratic forms (sums of squares) have independent chi-square distributions with 1; b 1; a 1; (a 1)(b 1); and n ab degrees of freedom, respectively, when n ij > 0 for all (i; j). Using result., we have also shown earlier that SSE = a X n ij X bx (Y ijk Y μ ij ) i=1 j=1 k=1 = Y T (I P X )Y ο χ n ab 9 0 The `m( ) function in S-PLUS: To allow the `m( ) function to fit a model involving classification variables, create factors. > carrot ψ read.table("carrots.dat", col.names=c("soil","variety","days")) > carrot$soil ψ as.factor(carrot$soil) > carrot$variety ψ as.factor(carrot$variety) > options(contrasts= c( contr.sum","contr.poly")) Produce ANOVA tables: > `m.out1 ψ `m(days ο soil*variety, data=carrot) > anova (`m.out1) R(ffjμ) R(fijμ; ff) R(fljμ; ff; fi) SSE > `m.out ψ `m(days ο variety*soil, data=carrot) > anova (`m.out) R(fijμ) R(ffjμ; fi) R(fljμ; ff; fi) SSE 1

11 There are four options for creating columns in the model matrix for classification variables: ># This file is posted as carrots.ssc > carrot <- read.table("c: carrots.dat", + col.names=c("soil","variety","days")) > carrot$soil <- as.factor(carrot$soil) > carrot$variety <- as.factor(carrot$variety) > carrot contr: helmert contr: treatment sets ff 1 = 0 fi 1 = 0 fl 1j = 0 for all j fl i1 = 0 for all i contr:sum contr:poly ± constraints orthogonal polynomial contrasts equal spacing equal sample sizes Soil Variety Days # Set up the axes and title of the # profile plot. # Compute sample means of germination # times for all combinations of soil # type and varieties of carrot seeds # and make a profile plot. > means <- tapply(carrot$days, list(carrot$variety,carrot$soil),mean) > means > par(fin=c(,),cex=1.,lwd=,mex=1.) > x.axis <- unique(carrot$variety) > matplot(c(1,,1), c(0,0,10), type="n", xlab="variety", ylab="mean Time", main= "Average Time to Carrot Seed Germination") # Add a profile for each soil type > matlines(x.axis,means,type='l', lty=c(1,),lwd=) # Plot points for the observations > matpoints(x.axis,means, pch=c(1,1)) # Add a legend to the plot > legend(.,8., legend=c('soil Type 1','Soil Type '), lty=c(1,),bty='n')

12 Mean Time Average Time to Carrot Seed Germination Variety Soil Type 1 Soil Type # Fit a model with main effects and interaction # Compute both sets of Type I sums of squares > options(contrasts= c(``contr.sum'',''contr.poly'')) > lm.out1 <- lm(days~soil*variety,data=carrot) > anova(lm.out1) Analysis of Variance Table Response: Days Terms added sequentially (first to last) Df Sum Sq Mean Sq F Value Pr(F) Soil Variety Soil:Variety Residuals # Create a data frame containing the original # data and the residuals and estimated means > lm.out <- lm(days~variety*soil,data=carrot) > anova(lm.out) > data.frame(carrot$soil,carrot$variety, carrot$days, Pred=lm.out1$fitted, Resid=round(lm.out1$resid,)) Analysis of Variance Table Response: Days Terms added sequentially (first to last) Df Sum Sq Mean Sq F Value Pr(F) Variety Soil Variety:Soil Residuals X1 X X Pred Resid

13 # Create residual plots frame( ) par(cex=1.0,mex=1.0,lwd=,pch=, mkh=0.1,fig=c(0,1,.1,1), pty='m') plot(lm.out1$fitted, lm.out1$resid, xlab="estimated Means", ylab="residuals") abline(h=0, lty=, lwd=) par(fig=c(0, 1, 0, 0.9), pty='s') qqnorm(lm.out1$resid) qqline(lm.out1$resid) Residuals Estimated Means lm.out1$resid Quantiles of Standard Normal 1 # Create plots for studentized residuals # You must attach the MASS library # to have access to the studres( ) # function that computes studentized # residuals in the following code library(mass) frame( ) par(cex=1.0,mex=1.0,lwd=,pch=, mkh=0.1,fin=c(.,.)) plot(lm.out1$fitted, studres(lm.out1), xlab="estimated Means", ylab="studentized Residuals", main="studentized Residual Plot") abline(h=0, lty=, lwd=) Studentized Residuals Studentized Residual Plot qqnorm(studres(lm.out1), main="studentized Residuals") qqline(studres(lm.out1)) Estimated Means

14 # Compute Type III sums of squares and F-tests. # First create the model matrix for # the cell means model. studres(lm.out1) Studentized Residuals Quantiles of Standard Normal > cb <- as.factor(10*as.numeric(carrot$soil) + as.numeric(carrot$variety)) > lm.out <- lm(carrot$days ~ cb - 1) > D <- model.matrix(lm.out) > D cb11 cb1 cb1 cb1 cb cb # Compute the sample means > y <- matrix(carrot$days,ncol=1) > b <- solve(crossprod(d)) %*% crossprod(d,y) > b [,1] cb11 9 cb1 1 cb1 18 cb1 1 cb 1 cb 1 # Generate an identity matrix and # a vector of ones Iden <- function(n) diag(rep(1,n)) one <- function(n) matrix(rep(1,n),ncol=1) # Compute Type III sums of squares and # related F-tests > s <- length(unique(carrot$soil)) > t <- length(unique(carrot$variety)) > yhat <- D %*% b > sse <- crossprod(y-yhat) > df <- nrow(y) - s*t > c1 <- kronecker( cbind(iden(s-1),-one(s-1)), t(one(t)) ) > q1 <- t(b) %*% t(c1)%*% solve( c1 %*% solve(crossprod(d)) %*% t(c1))%*% c1 %*% b > df1<- s-1 > f <- (q1/df1)/(sse/df) > p <- 1-pf(f,df1,df) 8

15 > c1 [,1] [,] [,] [,] [,] [,] [1,] > data.frame(ss=q,df=df1,f.stat=f,p.value=p) SS df F.stat p.value > data.frame(ss=q1,df=df1,f.stat=f,p.value=p) SS df F.stat p.value > c <- kronecker( t(one(s)), cbind(iden(t-1), -one(t-1)) > q <- t(b) %*% t(c)%*% solve( c %*% solve(crossprod(d)) %*% t(c))%*% c %*% b > df1<- t-1 > f <- (q/df1)/(sse/df) > p <- 1-pf(f,df1,df) > c [,1] [,] [,] [,] [,] [,] [1,] [,] > c <- kronecker( cbind(iden(s-1),-one(s-1)), cbind(iden(t-1),-one(t-1)) ) > q <- t(b) %*% t(c)%*% solve( c %*% solve(crossprod(d)) %*% t(c))%*% c %*% b > df1<- (s-1)*(t-1) > f <- (q/df1)/(sse/df) > p <- 1-pf(f,df1,df) > c [,1] [,] [,] [,] [,] [,] [1,] [,] > data.frame(ss=q,df=df1,f.stat=f,p.value=p) SS df F.stat p.value What null hypotheses are tested by F-tests derived from such ANOVA tables? Consider Type I sums of squares: R(μ) = Y T P 1 Y = Y T P 1 P 1 Y = (P 1 Y) T (P 1 Y) 1 ff R(μ) ο χ 1 (ffi ) and F = where = ( μ Y ::: 1) T ( μ Y :::1) = n :: μy ::: R(μ) SSE=(n :: ab) ο F (1;n :: ab) (ffi ) ffi = 1 ff fit X T P 1 Xfi = 1 ff (fit X T P 1 )(P 1 Xfi) = 1 ff (P 1Xfi) T (P 1 Xfi) For the carrot seed germination study: P 1 Xfi = 1 n :: 1 1 T Xfi = 1 n :: 1[n :: ; n 1: ; n : ; n :1 ; n : ; n : ; n 11 ; n 1 ; n 1 ; n 1 ; n ; n ] fi = 1 n :: 1 n :: μ + a X + a X i=1 bx fl ij j=1 The null hypothesis is H 0 : 0 = n :: μ+ a X i=1 i=1 n i: ff i + b X j=1 n i: ff i + With respect to the cell means b X j=1 n :j fi j + X i E(Y ijk ) = μ ij = μ + ff i + fi j + fl ij this null hypothesis is X H 0 : 0 = a bx i=1 j=1 n ij n :: μ ij n :j fi j X j n ij fl ij 1

16 Consider and F = Here, R(ffjμ) = Y T (P μ;ff P μ )Y R(ffjμ)=(a 1) MSE ο F (a 1;n:: ab) (ffi ) 1 ff R(ffjμ) ο χ a 1 (ffi ) where a 1 = rank(x μ;ff) rank(x μ ) and ffi = 1 ff fit X T (P μ;ff P μ )Xfi = 1 ff [(P μ;ff P μ )Xfi] T [(P μ;ff P μ )Xfi] For the general effects model for the carrot seed germination study: P μ;ff X = X μ;ff (X T μ;ff X μ;ff) X T μ;ff X = X μ;ff n :: n 1: n : n 1: n 1: 0 n : 0 n : n :: n 1: n : n :1 n : n : n 11 n 1 n 1 n 1 n n n 1: n 1: 0 n 11 n 1 n 1 n 11 n 1 n n : 0 n : n 1 n n n 1 n n = X μ;ff n 0 1: n : # = n11 n1 n1 n11 n1 n n1: n1: n1: n :: n :: n :: n11 n n n1 n n n1: n: n: n1: n: n1: Then, the first seven rows of (P μ;ff P μ )Xfi are» μ + ff1 + P b j=1 n 1j n 1: (fi j + fl 1j )» μ+ a X i=1 n i: n :: ff i + b X j=1 n :j n :: fi j + X i X j n ij n :: fl ij The last eight rows of (P μ;ff P μ )Xfi are» μ + ff + P b j=1 n j n : (fi j + fl j )» μ+ a X i=1 n i: n :: ff i + b X j=1 n :j n :: fi j + X i X j n ij n :: fl ij The null hypothesis is X H 0 : ff i + b n ij (fi j=1 n j + fl ij ) i: are all equal (i = 1; : : : ; a) with respect to the cell means model, μ ij = E(Y ijk = μ + ff i + fi j + fl ij ; this null hypothesis is bx n H ij 0 : μ j=1 n ij are all equal (i = 1; : : : ; a): i:

Example of treatment contrasts used by R in estimating ANOVA coefficients

Example of treatment contrasts used by R in estimating ANOVA coefficients Example of treatment contrasts used by R in estimating ANOVA coefficients The first example shows a simple numerical design matrix in R (no factors) for the groups 1, a, b, ab. resp

More information

3. The F Test for Comparing Reduced vs. Full Models. opyright c 2018 Dan Nettleton (Iowa State University) 3. Statistics / 43

3. The F Test for Comparing Reduced vs. Full Models. opyright c 2018 Dan Nettleton (Iowa State University) 3. Statistics / 43 3. The F Test for Comparing Reduced vs. Full Models opyright c 2018 Dan Nettleton (Iowa State University) 3. Statistics 510 1 / 43 Assume the Gauss-Markov Model with normal errors: y = Xβ + ɛ, ɛ N(0, σ

More information

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1)

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1) Summary of Chapter 7 (Sections 7.2-7.5) and Chapter 8 (Section 8.1) Chapter 7. Tests of Statistical Hypotheses 7.2. Tests about One Mean (1) Test about One Mean Case 1: σ is known. Assume that X N(µ, σ

More information

Unbalanced Data in Factorials Types I, II, III SS Part 1

Unbalanced Data in Factorials Types I, II, III SS Part 1 Unbalanced Data in Factorials Types I, II, III SS Part 1 Chapter 10 in Oehlert STAT:5201 Week 9 - Lecture 2 1 / 14 When we perform an ANOVA, we try to quantify the amount of variability in the data accounted

More information

MEMORIAL UNIVERSITY OF NEWFOUNDLAND DEPARTMENT OF MATHEMATICS AND STATISTICS FINAL EXAM - STATISTICS FALL 1999

MEMORIAL UNIVERSITY OF NEWFOUNDLAND DEPARTMENT OF MATHEMATICS AND STATISTICS FINAL EXAM - STATISTICS FALL 1999 MEMORIAL UNIVERSITY OF NEWFOUNDLAND DEPARTMENT OF MATHEMATICS AND STATISTICS FINAL EXAM - STATISTICS 350 - FALL 1999 Instructor: A. Oyet Date: December 16, 1999 Name(Surname First): Student Number INSTRUCTIONS

More information

Multivariate Regression

Multivariate Regression Multivariate Regression The so-called supervised learning problem is the following: we want to approximate the random variable Y with an appropriate function of the random variables X 1,..., X p with the

More information

Lecture 15 Topic 11: Unbalanced Designs (missing data)

Lecture 15 Topic 11: Unbalanced Designs (missing data) Lecture 15 Topic 11: Unbalanced Designs (missing data) In the real world, things fall apart: plants are destroyed/trampled/eaten animals get sick volunteers quit assistants are sloppy accidents happen

More information

In a one-way ANOVA, the total sums of squares among observations is partitioned into two components: Sums of squares represent:

In a one-way ANOVA, the total sums of squares among observations is partitioned into two components: Sums of squares represent: Activity #10: AxS ANOVA (Repeated subjects design) Resources: optimism.sav So far in MATH 300 and 301, we have studied the following hypothesis testing procedures: 1) Binomial test, sign-test, Fisher s

More information

Ch 2: Simple Linear Regression

Ch 2: Simple Linear Regression Ch 2: Simple Linear Regression 1. Simple Linear Regression Model A simple regression model with a single regressor x is y = β 0 + β 1 x + ɛ, where we assume that the error ɛ is independent random component

More information

Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, E(X i X) 2 = (µ i µ) 2 + n 1 n σ2

Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, E(X i X) 2 = (µ i µ) 2 + n 1 n σ2 identity Y ijk Ȳ = (Y ijk Ȳij ) + (Ȳi Ȳ ) + (Ȳ j Ȳ ) + (Ȳij Ȳi Ȳ j + Ȳ ) Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, (1) E(MSE) = E(SSE/[IJ(K 1)]) = (2) E(MSA) = E(SSA/(I

More information

The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization.

The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization. 1 Chapter 1: Research Design Principles The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization. 2 Chapter 2: Completely Randomized Design

More information

Allow the investigation of the effects of a number of variables on some response

Allow the investigation of the effects of a number of variables on some response Lecture 12 Topic 9: Factorial treatment structures (Part I) Factorial experiments Allow the investigation of the effects of a number of variables on some response in a highly efficient manner, and in a

More information

DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya

DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Genap 2017/2018 Jurusan Teknik Industri Universitas Brawijaya DESAIN EKSPERIMEN Analysis of Variances (ANOVA) Semester Jurusan Teknik Industri Universitas Brawijaya Outline Introduction The Analysis of Variance Models for the Data Post-ANOVA Comparison of Means Sample

More information

Lecture 15 Multiple regression I Chapter 6 Set 2 Least Square Estimation The quadratic form to be minimized is

Lecture 15 Multiple regression I Chapter 6 Set 2 Least Square Estimation The quadratic form to be minimized is Lecture 15 Multiple regression I Chapter 6 Set 2 Least Square Estimation The quadratic form to be minimized is Q = (Y i β 0 β 1 X i1 β 2 X i2 β p 1 X i.p 1 ) 2, which in matrix notation is Q = (Y Xβ) (Y

More information

Lec 5: Factorial Experiment

Lec 5: Factorial Experiment November 21, 2011 Example Study of the battery life vs the factors temperatures and types of material. A: Types of material, 3 levels. B: Temperatures, 3 levels. Example Study of the battery life vs the

More information

Chap The McGraw-Hill Companies, Inc. All rights reserved.

Chap The McGraw-Hill Companies, Inc. All rights reserved. 11 pter11 Chap Analysis of Variance Overview of ANOVA Multiple Comparisons Tests for Homogeneity of Variances Two-Factor ANOVA Without Replication General Linear Model Experimental Design: An Overview

More information

Ma 3/103: Lecture 25 Linear Regression II: Hypothesis Testing and ANOVA

Ma 3/103: Lecture 25 Linear Regression II: Hypothesis Testing and ANOVA Ma 3/103: Lecture 25 Linear Regression II: Hypothesis Testing and ANOVA March 6, 2017 KC Border Linear Regression II March 6, 2017 1 / 44 1 OLS estimator 2 Restricted regression 3 Errors in variables 4

More information

Two-Way Analysis of Variance - no interaction

Two-Way Analysis of Variance - no interaction 1 Two-Way Analysis of Variance - no interaction Example: Tests were conducted to assess the effects of two factors, engine type, and propellant type, on propellant burn rate in fired missiles. Three engine

More information

1 Use of indicator random variables. (Chapter 8)

1 Use of indicator random variables. (Chapter 8) 1 Use of indicator random variables. (Chapter 8) let I(A) = 1 if the event A occurs, and I(A) = 0 otherwise. I(A) is referred to as the indicator of the event A. The notation I A is often used. 1 2 Fitting

More information

Multiple Predictor Variables: ANOVA

Multiple Predictor Variables: ANOVA Multiple Predictor Variables: ANOVA 1/32 Linear Models with Many Predictors Multiple regression has many predictors BUT - so did 1-way ANOVA if treatments had 2 levels What if there are multiple treatment

More information

Two-Way Factorial Designs

Two-Way Factorial Designs 81-86 Two-Way Factorial Designs Yibi Huang 81-86 Two-Way Factorial Designs Chapter 8A - 1 Problem 81 Sprouting Barley (p166 in Oehlert) Brewer s malt is produced from germinating barley, so brewers like

More information

22s:152 Applied Linear Regression. Take random samples from each of m populations.

22s:152 Applied Linear Regression. Take random samples from each of m populations. 22s:152 Applied Linear Regression Chapter 8: ANOVA NOTE: We will meet in the lab on Monday October 10. One-way ANOVA Focuses on testing for differences among group means. Take random samples from each

More information

Stats fest Analysis of variance. Single factor ANOVA. Aims. Single factor ANOVA. Data

Stats fest Analysis of variance. Single factor ANOVA. Aims. Single factor ANOVA. Data 1 Stats fest 2007 Analysis of variance murray.logan@sci.monash.edu.au Single factor ANOVA 2 Aims Description Investigate differences between population means Explanation How much of the variation in response

More information

ANOVA (Analysis of Variance) output RLS 11/20/2016

ANOVA (Analysis of Variance) output RLS 11/20/2016 ANOVA (Analysis of Variance) output RLS 11/20/2016 1. Analysis of Variance (ANOVA) The goal of ANOVA is to see if the variation in the data can explain enough to see if there are differences in the means.

More information

22s:152 Applied Linear Regression. There are a couple commonly used models for a one-way ANOVA with m groups. Chapter 8: ANOVA

22s:152 Applied Linear Regression. There are a couple commonly used models for a one-way ANOVA with m groups. Chapter 8: ANOVA 22s:152 Applied Linear Regression Chapter 8: ANOVA NOTE: We will meet in the lab on Monday October 10. One-way ANOVA Focuses on testing for differences among group means. Take random samples from each

More information

Lecture 15. Hypothesis testing in the linear model

Lecture 15. Hypothesis testing in the linear model 14. Lecture 15. Hypothesis testing in the linear model Lecture 15. Hypothesis testing in the linear model 1 (1 1) Preliminary lemma 15. Hypothesis testing in the linear model 15.1. Preliminary lemma Lemma

More information

. Example: For 3 factors, sse = (y ijkt. " y ijk

. Example: For 3 factors, sse = (y ijkt.  y ijk ANALYSIS OF BALANCED FACTORIAL DESIGNS Estimates of model parameters and contrasts can be obtained by the method of Least Squares. Additional constraints must be added to estimate non-estimable parameters.

More information

Factorial designs. Experiments

Factorial designs. Experiments Chapter 5: Factorial designs Petter Mostad mostad@chalmers.se Experiments Actively making changes and observing the result, to find causal relationships. Many types of experimental plans Measuring response

More information

Topic 9: Factorial treatment structures. Introduction. Terminology. Example of a 2x2 factorial

Topic 9: Factorial treatment structures. Introduction. Terminology. Example of a 2x2 factorial Topic 9: Factorial treatment structures Introduction A common objective in research is to investigate the effect of each of a number of variables, or factors, on some response variable. In earlier times,

More information

These are multifactor experiments that have

These are multifactor experiments that have Design of Engineering Experiments Nested Designs Text reference, Chapter 14, Pg. 525 These are multifactor experiments that have some important industrial applications Nested and split-plot designs frequently

More information

Factorial and Unbalanced Analysis of Variance

Factorial and Unbalanced Analysis of Variance Factorial and Unbalanced Analysis of Variance Nathaniel E. Helwig Assistant Professor of Psychology and Statistics University of Minnesota (Twin Cities) Updated 04-Jan-2017 Nathaniel E. Helwig (U of Minnesota)

More information

Orthogonal contrasts for a 2x2 factorial design Example p130

Orthogonal contrasts for a 2x2 factorial design Example p130 Week 9: Orthogonal comparisons for a 2x2 factorial design. The general two-factor factorial arrangement. Interaction and additivity. ANOVA summary table, tests, CIs. Planned/post-hoc comparisons for the

More information

16.3 One-Way ANOVA: The Procedure

16.3 One-Way ANOVA: The Procedure 16.3 One-Way ANOVA: The Procedure Tom Lewis Fall Term 2009 Tom Lewis () 16.3 One-Way ANOVA: The Procedure Fall Term 2009 1 / 10 Outline 1 The background 2 Computing formulas 3 The ANOVA Identity 4 Tom

More information

Lecture 1 Linear Regression with One Predictor Variable.p2

Lecture 1 Linear Regression with One Predictor Variable.p2 Lecture Linear Regression with One Predictor Variablep - Basics - Meaning of regression parameters p - β - the slope of the regression line -it indicates the change in mean of the probability distn of

More information

THE ANOVA APPROACH TO THE ANALYSIS OF LINEAR MIXED EFFECTS MODELS

THE ANOVA APPROACH TO THE ANALYSIS OF LINEAR MIXED EFFECTS MODELS THE ANOVA APPROACH TO THE ANALYSIS OF LINEAR MIXED EFFECTS MODELS We begin with a relatively simple special case. Suppose y ijk = µ + τ i + u ij + e ijk, (i = 1,..., t; j = 1,..., n; k = 1,..., m) β =

More information

STAT22200 Spring 2014 Chapter 8A

STAT22200 Spring 2014 Chapter 8A STAT22200 Spring 2014 Chapter 8A Yibi Huang May 13, 2014 81-86 Two-Way Factorial Designs Chapter 8A - 1 Problem 81 Sprouting Barley (p166 in Oehlert) Brewer s malt is produced from germinating barley,

More information

Increasing precision by partitioning the error sum of squares: Blocking: SSE (CRD) à SSB + SSE (RCBD) Contrasts: SST à (t 1) orthogonal contrasts

Increasing precision by partitioning the error sum of squares: Blocking: SSE (CRD) à SSB + SSE (RCBD) Contrasts: SST à (t 1) orthogonal contrasts Lecture 13 Topic 9: Factorial treatment structures (Part II) Increasing precision by partitioning the error sum of squares: s MST F = = MSE 2 among = s 2 within SST df trt SSE df e Blocking: SSE (CRD)

More information

Linear Algebra Review

Linear Algebra Review Linear Algebra Review Yang Feng http://www.stat.columbia.edu/~yangfeng Yang Feng (Columbia University) Linear Algebra Review 1 / 45 Definition of Matrix Rectangular array of elements arranged in rows and

More information

y = µj n + β 1 b β b b b + α 1 t α a t a + e

y = µj n + β 1 b β b b b + α 1 t α a t a + e The contributions of distinct sets of explanatory variables to the model are typically captured by breaking up the overall regression (or model) sum of squares into distinct components This is useful quite

More information

Suppose we needed four batches of formaldehyde, and coulddoonly4runsperbatch. Thisisthena2 4 factorial in 2 2 blocks.

Suppose we needed four batches of formaldehyde, and coulddoonly4runsperbatch. Thisisthena2 4 factorial in 2 2 blocks. 58 2. 2 factorials in 2 blocks Suppose we needed four batches of formaldehyde, and coulddoonly4runsperbatch. Thisisthena2 4 factorial in 2 2 blocks. Some more algebra: If two effects are confounded with

More information

EXST Regression Techniques Page 1. We can also test the hypothesis H :" œ 0 versus H :"

EXST Regression Techniques Page 1. We can also test the hypothesis H : œ 0 versus H : EXST704 - Regression Techniques Page 1 Using F tests instead of t-tests We can also test the hypothesis H :" œ 0 versus H :" Á 0 with an F test.! " " " F œ MSRegression MSError This test is mathematically

More information

Example: Poisondata. 22s:152 Applied Linear Regression. Chapter 8: ANOVA

Example: Poisondata. 22s:152 Applied Linear Regression. Chapter 8: ANOVA s:5 Applied Linear Regression Chapter 8: ANOVA Two-way ANOVA Used to compare populations means when the populations are classified by two factors (or categorical variables) For example sex and occupation

More information

Econ 3790: Business and Economic Statistics. Instructor: Yogesh Uppal

Econ 3790: Business and Economic Statistics. Instructor: Yogesh Uppal Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal Email: yuppal@ysu.edu Chapter 13, Part A: Analysis of Variance and Experimental Design Introduction to Analysis of Variance Analysis

More information

Lecture 2: Linear Models. Bruce Walsh lecture notes Seattle SISG -Mixed Model Course version 23 June 2011

Lecture 2: Linear Models. Bruce Walsh lecture notes Seattle SISG -Mixed Model Course version 23 June 2011 Lecture 2: Linear Models Bruce Walsh lecture notes Seattle SISG -Mixed Model Course version 23 June 2011 1 Quick Review of the Major Points The general linear model can be written as y = X! + e y = vector

More information

ANOVA: Analysis of Variation

ANOVA: Analysis of Variation ANOVA: Analysis of Variation The basic ANOVA situation Two variables: 1 Categorical, 1 Quantitative Main Question: Do the (means of) the quantitative variables depend on which group (given by categorical

More information

Lec 1: An Introduction to ANOVA

Lec 1: An Introduction to ANOVA Ying Li Stockholm University October 31, 2011 Three end-aisle displays Which is the best? Design of the Experiment Identify the stores of the similar size and type. The displays are randomly assigned to

More information

Biostatistics 380 Multiple Regression 1. Multiple Regression

Biostatistics 380 Multiple Regression 1. Multiple Regression Biostatistics 0 Multiple Regression ORIGIN 0 Multiple Regression Multiple Regression is an extension of the technique of linear regression to describe the relationship between a single dependent (response)

More information

Stat 217 Final Exam. Name: May 1, 2002

Stat 217 Final Exam. Name: May 1, 2002 Stat 217 Final Exam Name: May 1, 2002 Problem 1. Three brands of batteries are under study. It is suspected that the lives (in weeks) of the three brands are different. Five batteries of each brand are

More information

Sociology 6Z03 Review II

Sociology 6Z03 Review II Sociology 6Z03 Review II John Fox McMaster University Fall 2016 John Fox (McMaster University) Sociology 6Z03 Review II Fall 2016 1 / 35 Outline: Review II Probability Part I Sampling Distributions Probability

More information

ST430 Exam 2 Solutions

ST430 Exam 2 Solutions ST430 Exam 2 Solutions Date: November 9, 2015 Name: Guideline: You may use one-page (front and back of a standard A4 paper) of notes. No laptop or textbook are permitted but you may use a calculator. Giving

More information

STAT5044: Regression and Anova

STAT5044: Regression and Anova STAT5044: Regression and Anova Inyoung Kim 1 / 25 Outline 1 Multiple Linear Regression 2 / 25 Basic Idea An extra sum of squares: the marginal reduction in the error sum of squares when one or several

More information

Chapter 11 - Lecture 1 Single Factor ANOVA

Chapter 11 - Lecture 1 Single Factor ANOVA Chapter 11 - Lecture 1 Single Factor ANOVA April 7th, 2010 Means Variance Sum of Squares Review In Chapter 9 we have seen how to make hypothesis testing for one population mean. In Chapter 10 we have seen

More information

Design of Engineering Experiments Chapter 5 Introduction to Factorials

Design of Engineering Experiments Chapter 5 Introduction to Factorials Design of Engineering Experiments Chapter 5 Introduction to Factorials Text reference, Chapter 5 page 170 General principles of factorial experiments The two-factor factorial with fixed effects The ANOVA

More information

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS

ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS ANALYSIS OF VARIANCE OF BALANCED DAIRY SCIENCE DATA USING SAS Ravinder Malhotra and Vipul Sharma National Dairy Research Institute, Karnal-132001 The most common use of statistics in dairy science is testing

More information

Analysis of Variance

Analysis of Variance Statistical Techniques II EXST7015 Analysis of Variance 15a_ANOVA_Introduction 1 Design The simplest model for Analysis of Variance (ANOVA) is the CRD, the Completely Randomized Design This model is also

More information

Design & Analysis of Experiments 7E 2009 Montgomery

Design & Analysis of Experiments 7E 2009 Montgomery 1 What If There Are More Than Two Factor Levels? The t-test does not directly apply ppy There are lots of practical situations where there are either more than two levels of interest, or there are several

More information

Lecture 3: Inference in SLR

Lecture 3: Inference in SLR Lecture 3: Inference in SLR STAT 51 Spring 011 Background Reading KNNL:.1.6 3-1 Topic Overview This topic will cover: Review of hypothesis testing Inference about 1 Inference about 0 Confidence Intervals

More information

ST 512-Practice Exam I - Osborne Directions: Answer questions as directed. For true/false questions, circle either true or false.

ST 512-Practice Exam I - Osborne Directions: Answer questions as directed. For true/false questions, circle either true or false. ST 512-Practice Exam I - Osborne Directions: Answer questions as directed. For true/false questions, circle either true or false. 1. A study was carried out to examine the relationship between the number

More information

Jian WANG, PhD. Room A115 College of Fishery and Life Science Shanghai Ocean University

Jian WANG, PhD. Room A115 College of Fishery and Life Science Shanghai Ocean University Jian WANG, PhD j_wang@shou.edu.cn Room A115 College of Fishery and Life Science Shanghai Ocean University Contents 1. Introduction to R 2. Data sets 3. Introductory Statistical Principles 4. Sampling and

More information

Stat 6640 Solution to Midterm #2

Stat 6640 Solution to Midterm #2 Stat 6640 Solution to Midterm #2 1. A study was conducted to examine how three statistical software packages used in a statistical course affect the statistical competence a student achieves. At the end

More information

The One-Way Repeated-Measures ANOVA. (For Within-Subjects Designs)

The One-Way Repeated-Measures ANOVA. (For Within-Subjects Designs) The One-Way Repeated-Measures ANOVA (For Within-Subjects Designs) Logic of the Repeated-Measures ANOVA The repeated-measures ANOVA extends the analysis of variance to research situations using repeated-measures

More information

Economics 620, Lecture 2: Regression Mechanics (Simple Regression)

Economics 620, Lecture 2: Regression Mechanics (Simple Regression) 1 Economics 620, Lecture 2: Regression Mechanics (Simple Regression) Observed variables: y i ; x i i = 1; :::; n Hypothesized (model): Ey i = + x i or y i = + x i + (y i Ey i ) ; renaming we get: y i =

More information

Linear regression. We have that the estimated mean in linear regression is. ˆµ Y X=x = ˆβ 0 + ˆβ 1 x. The standard error of ˆµ Y X=x is.

Linear regression. We have that the estimated mean in linear regression is. ˆµ Y X=x = ˆβ 0 + ˆβ 1 x. The standard error of ˆµ Y X=x is. Linear regression We have that the estimated mean in linear regression is The standard error of ˆµ Y X=x is where x = 1 n s.e.(ˆµ Y X=x ) = σ ˆµ Y X=x = ˆβ 0 + ˆβ 1 x. 1 n + (x x)2 i (x i x) 2 i x i. The

More information

Inference for Regression

Inference for Regression Inference for Regression Section 9.4 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Department of Mathematics University of Houston Lecture 13b - 3339 Cathy Poliak, Ph.D. cathy@math.uh.edu

More information

ij i j m ij n ij m ij n i j Suppose we denote the row variable by X and the column variable by Y ; We can then re-write the above expression as

ij i j m ij n ij m ij n i j Suppose we denote the row variable by X and the column variable by Y ; We can then re-write the above expression as page1 Loglinear Models Loglinear models are a way to describe association and interaction patterns among categorical variables. They are commonly used to model cell counts in contingency tables. These

More information

PLS205 Lab 6 February 13, Laboratory Topic 9

PLS205 Lab 6 February 13, Laboratory Topic 9 PLS205 Lab 6 February 13, 2014 Laboratory Topic 9 A word about factorials Specifying interactions among factorial effects in SAS The relationship between factors and treatment Interpreting results of an

More information

Lecture 10. Factorial experiments (2-way ANOVA etc)

Lecture 10. Factorial experiments (2-way ANOVA etc) Lecture 10. Factorial experiments (2-way ANOVA etc) Jesper Rydén Matematiska institutionen, Uppsala universitet jesper@math.uu.se Regression and Analysis of Variance autumn 2014 A factorial experiment

More information

MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7

MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7 MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7 1 Random Vectors Let a 0 and y be n 1 vectors, and let A be an n n matrix. Here, a 0 and A are non-random, whereas y is

More information

Multivariate Linear Models

Multivariate Linear Models Multivariate Linear Models Stanley Sawyer Washington University November 7, 2001 1. Introduction. Suppose that we have n observations, each of which has d components. For example, we may have d measurements

More information

Single Factor Experiments

Single Factor Experiments Single Factor Experiments Bruce A Craig Department of Statistics Purdue University STAT 514 Topic 4 1 Analysis of Variance Suppose you are interested in comparing either a different treatments a levels

More information

Formal Statement of Simple Linear Regression Model

Formal Statement of Simple Linear Regression Model Formal Statement of Simple Linear Regression Model Y i = β 0 + β 1 X i + ɛ i Y i value of the response variable in the i th trial β 0 and β 1 are parameters X i is a known constant, the value of the predictor

More information

The simple linear regression model discussed in Chapter 13 was written as

The simple linear regression model discussed in Chapter 13 was written as 1519T_c14 03/27/2006 07:28 AM Page 614 Chapter Jose Luis Pelaez Inc/Blend Images/Getty Images, Inc./Getty Images, Inc. 14 Multiple Regression 14.1 Multiple Regression Analysis 14.2 Assumptions of the Multiple

More information

Analysis of Variance

Analysis of Variance Analysis of Variance Math 36b May 7, 2009 Contents 2 ANOVA: Analysis of Variance 16 2.1 Basic ANOVA........................... 16 2.1.1 the model......................... 17 2.1.2 treatment sum of squares.................

More information

Problems. Suppose both models are fitted to the same data. Show that SS Res, A SS Res, B

Problems. Suppose both models are fitted to the same data. Show that SS Res, A SS Res, B Simple Linear Regression 35 Problems 1 Consider a set of data (x i, y i ), i =1, 2,,n, and the following two regression models: y i = β 0 + β 1 x i + ε, (i =1, 2,,n), Model A y i = γ 0 + γ 1 x i + γ 2

More information

One-Way Analysis of Variance (ANOVA)

One-Way Analysis of Variance (ANOVA) 1 One-Way Analysis of Variance (ANOVA) One-Way Analysis of Variance (ANOVA) is a method for comparing the means of a populations. This kind of problem arises in two different settings 1. When a independent

More information

Food consumption of rats. Two-way vs one-way vs nested ANOVA

Food consumption of rats. Two-way vs one-way vs nested ANOVA Food consumption of rats Lard Gender Fresh Rancid 709 592 Male 679 538 699 476 657 508 Female 594 505 677 539 Two-way vs one-way vs nested NOV T 1 2 * * M * * * * * * F * * * * T M1 M2 F1 F2 * * * * *

More information

Handout 4: Simple Linear Regression

Handout 4: Simple Linear Regression Handout 4: Simple Linear Regression By: Brandon Berman The following problem comes from Kokoska s Introductory Statistics: A Problem-Solving Approach. The data can be read in to R using the following code:

More information

Lecture 3: Multiple Regression

Lecture 3: Multiple Regression Lecture 3: Multiple Regression R.G. Pierse 1 The General Linear Model Suppose that we have k explanatory variables Y i = β 1 + β X i + β 3 X 3i + + β k X ki + u i, i = 1,, n (1.1) or Y i = β j X ji + u

More information

3. (a) (8 points) There is more than one way to correctly express the null hypothesis in matrix form. One way to state the null hypothesis is

3. (a) (8 points) There is more than one way to correctly express the null hypothesis in matrix form. One way to state the null hypothesis is Stat 501 Solutions and Comments on Exam 1 Spring 005-4 0-4 1. (a) (5 points) Y ~ N, -1-4 34 (b) (5 points) X (X,X ) = (5,8) ~ N ( 11.5, 0.9375 ) 3 1 (c) (10 points, for each part) (i), (ii), and (v) are

More information

Lecture 3: Linear Models. Bruce Walsh lecture notes Uppsala EQG course version 28 Jan 2012

Lecture 3: Linear Models. Bruce Walsh lecture notes Uppsala EQG course version 28 Jan 2012 Lecture 3: Linear Models Bruce Walsh lecture notes Uppsala EQG course version 28 Jan 2012 1 Quick Review of the Major Points The general linear model can be written as y = X! + e y = vector of observed

More information

PLS205 Lab 2 January 15, Laboratory Topic 3

PLS205 Lab 2 January 15, Laboratory Topic 3 PLS205 Lab 2 January 15, 2015 Laboratory Topic 3 General format of ANOVA in SAS Testing the assumption of homogeneity of variances by "/hovtest" by ANOVA of squared residuals Proc Power for ANOVA One-way

More information

MATH 423/533 - ASSIGNMENT 4 SOLUTIONS

MATH 423/533 - ASSIGNMENT 4 SOLUTIONS MATH 423/533 - ASSIGNMENT 4 SOLUTIONS INTRODUCTION This assignment concerns the use of factor predictors in linear regression modelling, and focusses on models with two factors X 1 and X 2 with M 1 and

More information

STAT 135 Lab 10 Two-Way ANOVA, Randomized Block Design and Friedman s Test

STAT 135 Lab 10 Two-Way ANOVA, Randomized Block Design and Friedman s Test STAT 135 Lab 10 Two-Way ANOVA, Randomized Block Design and Friedman s Test Rebecca Barter April 13, 2015 Let s now imagine a dataset for which our response variable, Y, may be influenced by two factors,

More information

Math 423/533: The Main Theoretical Topics

Math 423/533: The Main Theoretical Topics Math 423/533: The Main Theoretical Topics Notation sample size n, data index i number of predictors, p (p = 2 for simple linear regression) y i : response for individual i x i = (x i1,..., x ip ) (1 p)

More information

STAT 401A - Statistical Methods for Research Workers

STAT 401A - Statistical Methods for Research Workers STAT 401A - Statistical Methods for Research Workers One-way ANOVA Jarad Niemi (Dr. J) Iowa State University last updated: October 10, 2014 Jarad Niemi (Iowa State) One-way ANOVA October 10, 2014 1 / 39

More information

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

 M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2 Notation and Equations for Final Exam Symbol Definition X The variable we measure in a scientific study n The size of the sample N The size of the population M The mean of the sample µ The mean of the

More information

STAT763: Applied Regression Analysis. Multiple linear regression. 4.4 Hypothesis testing

STAT763: Applied Regression Analysis. Multiple linear regression. 4.4 Hypothesis testing STAT763: Applied Regression Analysis Multiple linear regression 4.4 Hypothesis testing Chunsheng Ma E-mail: cma@math.wichita.edu 4.4.1 Significance of regression Null hypothesis (Test whether all β j =

More information

General Linear Test of a General Linear Hypothesis. Copyright c 2012 Dan Nettleton (Iowa State University) Statistics / 35

General Linear Test of a General Linear Hypothesis. Copyright c 2012 Dan Nettleton (Iowa State University) Statistics / 35 General Linear Test of a General Linear Hypothesis Copyright c 2012 Dan Nettleton (Iowa State University) Statistics 611 1 / 35 Suppose the NTGMM holds so that y = Xβ + ε, where ε N(0, σ 2 I). opyright

More information

Table of z values and probabilities for the standard normal distribution. z is the first column plus the top row. Each cell shows P(X z).

Table of z values and probabilities for the standard normal distribution. z is the first column plus the top row. Each cell shows P(X z). Table of z values and probabilities for the standard normal distribution. z is the first column plus the top row. Each cell shows P(X z). For example P(X 1.04) =.8508. For z < 0 subtract the value from

More information

STATISTICS 174: APPLIED STATISTICS FINAL EXAM DECEMBER 10, 2002

STATISTICS 174: APPLIED STATISTICS FINAL EXAM DECEMBER 10, 2002 Time allowed: 3 HOURS. STATISTICS 174: APPLIED STATISTICS FINAL EXAM DECEMBER 10, 2002 This is an open book exam: all course notes and the text are allowed, and you are expected to use your own calculator.

More information

ANOVA Randomized Block Design

ANOVA Randomized Block Design Biostatistics 301 ANOVA Randomized Block Design 1 ORIGIN 1 Data Structure: Let index i,j indicate the ith column (treatment class) and jth row (block). For each i,j combination, there are n replicates.

More information

assumes a linear relationship between mean of Y and the X s with additive normal errors the errors are assumed to be a sample from N(0, σ 2 )

assumes a linear relationship between mean of Y and the X s with additive normal errors the errors are assumed to be a sample from N(0, σ 2 ) Multiple Linear Regression is used to relate a continuous response (or dependent) variable Y to several explanatory (or independent) (or predictor) variables X 1, X 2,, X k assumes a linear relationship

More information

Homework 9 Sample Solution

Homework 9 Sample Solution Homework 9 Sample Solution # 1 (Ex 9.12, Ex 9.23) Ex 9.12 (a) Let p vitamin denote the probability of having cold when a person had taken vitamin C, and p placebo denote the probability of having cold

More information

Chapter 10: Analysis of variance (ANOVA)

Chapter 10: Analysis of variance (ANOVA) Chapter 10: Analysis of variance (ANOVA) ANOVA (Analysis of variance) is a collection of techniques for dealing with more general experiments than the previous one-sample or two-sample tests. We first

More information

Chapter 14 Student Lecture Notes Department of Quantitative Methods & Information Systems. Business Statistics. Chapter 14 Multiple Regression

Chapter 14 Student Lecture Notes Department of Quantitative Methods & Information Systems. Business Statistics. Chapter 14 Multiple Regression Chapter 14 Student Lecture Notes 14-1 Department of Quantitative Methods & Information Systems Business Statistics Chapter 14 Multiple Regression QMIS 0 Dr. Mohammad Zainal Chapter Goals After completing

More information

One-Way Analysis of Variance: A Guide to Testing Differences Between Multiple Groups

One-Way Analysis of Variance: A Guide to Testing Differences Between Multiple Groups One-Way Analysis of Variance: A Guide to Testing Differences Between Multiple Groups In analysis of variance, the main research question is whether the sample means are from different populations. The

More information

MODELS WITHOUT AN INTERCEPT

MODELS WITHOUT AN INTERCEPT Consider the balanced two factor design MODELS WITHOUT AN INTERCEPT Factor A 3 levels, indexed j 0, 1, 2; Factor B 5 levels, indexed l 0, 1, 2, 3, 4; n jl 4 replicate observations for each factor level

More information

Introduction to Analysis of Variance (ANOVA) Part 2

Introduction to Analysis of Variance (ANOVA) Part 2 Introduction to Analysis of Variance (ANOVA) Part 2 Single factor Serpulid recruitment and biofilms Effect of biofilm type on number of recruiting serpulid worms in Port Phillip Bay Response variable:

More information

STAT 705 Chapter 16: One-way ANOVA

STAT 705 Chapter 16: One-way ANOVA STAT 705 Chapter 16: One-way ANOVA Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 21 What is ANOVA? Analysis of variance (ANOVA) models are regression

More information

The Multiple Regression Model

The Multiple Regression Model Multiple Regression The Multiple Regression Model Idea: Examine the linear relationship between 1 dependent (Y) & or more independent variables (X i ) Multiple Regression Model with k Independent Variables:

More information