General Full Factorial Designs: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 235: Line 235:
where <math>{{\tau }_{i}}\,\!</math> represents the <math>i\,\!</math>th treatment of factor <math>A\,\!</math> (speed) with <math>i\,\!</math> =1, 2, 3; <math>{{\delta }_{j}}\,\!</math> represents the <math>j\,\!</math>th treatment of factor <math>B\,\!</math> (fuel additive) with <math>j\,\!</math> =1, 2; and <math>{{(\tau \delta )}_{ij}}\,\!</math> represents the interaction effect. In order to calculate the test statistics, it is convenient to express the ANOVA model of the equation given above in the form <math>y=X\beta +\epsilon \,\!</math>. This can be done as explained next.
where <math>{{\tau }_{i}}\,\!</math> represents the <math>i\,\!</math>th treatment of factor <math>A\,\!</math> (speed) with <math>i\,\!</math> =1, 2, 3; <math>{{\delta }_{j}}\,\!</math> represents the <math>j\,\!</math>th treatment of factor <math>B\,\!</math> (fuel additive) with <math>j\,\!</math> =1, 2; and <math>{{(\tau \delta )}_{ij}}\,\!</math> represents the interaction effect. In order to calculate the test statistics, it is convenient to express the ANOVA model of the equation given above in the form <math>y=X\beta +\epsilon \,\!</math>. This can be done as explained next.


====Expression of the ANOVA Model as <math>y=X\beta +\epsilon \,\!</math>====
====Expression of the ANOVA Model as <i>y</i> = <i>&Chi;&Beta;</i> + <i>&epsilon;</i>====


Since the effects <math>{{\tau }_{i}}\,\!</math>, <math>{{\delta }_{j}}\,\!</math> and <math>{{(\tau \delta )}_{ij}}\,\!</math> represent deviations from the overall mean, the following constraints exist.
Since the effects <math>{{\tau }_{i}}\,\!</math>, <math>{{\delta }_{j}}\,\!</math> and <math>{{(\tau \delta )}_{ij}}\,\!</math> represent deviations from the overall mean, the following constraints exist.
Line 384: Line 384:


Knowing <math>y\,\!</math>, <math>X\,\!</math> and <math>\beta \,\!</math>, the sum of squares for the ANOVA model and the extra sum of squares for each of the factors can be calculated. These are used to calculate the mean squares that are used to obtain the test statistics.
Knowing <math>y\,\!</math>, <math>X\,\!</math> and <math>\beta \,\!</math>, the sum of squares for the ANOVA model and the extra sum of squares for each of the factors can be calculated. These are used to calculate the mean squares that are used to obtain the test statistics.


====Calculation of Sum of Squares for the Model====
====Calculation of Sum of Squares for the Model====

Revision as of 21:28, 30 January 2013

New format available! This reference is now available in a new format that offers faster page load, improved display for calculations and images, more targeted search and the latest content available as a PDF. As of September 2023, this Reliawiki page will not continue to be updated. Please update all links and bookmarks to the latest reference at help.reliasoft.com/reference/experiment_design_and_analysis

Chapter 6: General Full Factorial Designs


DOEbox.png

Chapter 6  
General Full Factorial Designs  

Synthesis-icon.png

Available Software:
Weibull++

Examples icon.png

More Resources:
DOE examples


Experiments with two or more factors are encountered frequently. The best way to carry out such experiments is by using factorial experiments. Factorial experiments are experiments in which all combinations of factors are investigated in each replicate of the experiment. Factorial experiments are the only means to completely and systematically study interactions between factors in addition to identifying significant factors. One-factor-at-a-time experiments (where each factor is investigated separately by keeping all the remaining factors constant) do not reveal the interaction effects between the factors. Further, in one-factor-at-a-time experiments full randomization is not possible.

To illustrate factorial experiments consider an experiment where the response is investigated for two factors, A and B. Assume that the response is studied at two levels of factor A with Alow representing the lower level of A and Ahigh representing the higher level of A. Similarly, let Blow and Bhigh represent the two levels of factor B that are being investigated in this experiment. Since there are two factors with two levels, a total of 2×2=4 combinations exist (Alow - Blow, - Bhigh, Ahigh - Blow, - Bhigh). Thus, four runs are required for each replicate if a factorial experiment is to be carried out in this case. Assume that the response values for each of these four possible combinations are obtained as shown in the third table.


Two-factor factorial experiment.


Interaction plot for the data in the third table.


Investigating Factor Effects

The effect of factor A on the response can be obtained by taking the difference between the average response when A is high and the average response when A is low. The change in the response due to a change in the level of a factor is called the main effect of the factor. The main effect of A as per the response values in the third table is:


A=Average response at AhighAverage response at Alow=45+55225+352=5030=20


Therefore, when A is changed from the lower level to the higher level, the response increases by 20 units. A plot of the response for the two levels of A at different levels of B is shown in the figure above. The plot shows that change in the level of A leads to an increase in the response by 20 units regardless of the level of B. Therefore, no interaction exists in this case as indicated by the parallel lines on the plot. The main effect of B can be obtained as:


B=Average response at BhighAverage response at Blow=35+55225+452=4535=10


Investigating Interactions

Now assume that the response values for each of the four treatment combinations were obtained as shown in the fourth table. The main effect of A in this case is:


A=Average response at AhighAverage response at Alow=40+10220+302=0


Two factor factorial experiment.


It appears that A does not have an effect on the response. However, a plot of the response of A at different levels of B shows that the response does change with the levels of A but the effect of A on the response is dependent on the level of B (see the figure below). Therefore, an interaction between A and B exists in this case (as indicated by the non-parallel lines of the figure). The interaction effect between A and B can be calculated as follows:


Interaction plot for the data in the fourth table.


AB=Average response at Ahigh-Bhigh and Alow-BlowAverage response at Alow-Bhigh and Ahigh-Blow=10+20240+302=20


Note that in this case, if a one-factor-at-a-time experiment were used to investigate the effect of factor A on the response, it would lead to incorrect conclusions. For example, if the response at factor A was studied by holding B constant at its lower level, then the main effect of A would be obtained as 4020=20, indicating that the response increases by 20 units when the level of A is changed from low to high. On the other hand, if the response at factor A was studied by holding B constant at its higher level than the main effect of A would be obtained as 1030=20, indicating that the response decreases by 20 units when the level of A is changed from low to high.

Analysis of General Factorial Experiments

In DOE++, factorial experiments are referred to as factorial designs. The experiments explained in this section are referred to as general factorial designs. This is done to distinguish these experiments from the other factorial designs supported by DOE++ (see the figure below).


Factorial experiments available in DOE++.


The other designs (such as the two level full factorial designs that are explained in Two Level Factorial Experiments) are special cases of these experiments in which factors are limited to a specified number of levels. The ANOVA model for the analysis of factorial experiments is formulated as shown next. Assume a factorial experiment in which the effect of two factors, A and B, on the response is being investigated. Let there be na levels of factor A and nb levels of factor B. The ANOVA model for this experiment can be stated as:


Yijk=μ+τi+δj+(τδ)ij+ϵijk


where:


  • μ represents the overall mean effect
  • τi is the effect of the ith level of factor A (i=1,2,...,na)
  • δj is the effect of the jth level of factor B (j=1,2,...,nb)
  • (τδ)ij represents the interaction effect between A and B
  • ϵijk represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of σ2)
  • and the subscript k denotes the m replicates (k=1,2,...,m)


Since the effects τi, δj and (τδ)ij represent deviations from the overall mean, the following constraints exist:


nai=1τi=0


nbj=1δj=0


nai=1(τδ)ij=0


nbj=1(τδ)ij=0


Hypothesis Tests in General Factorial Experiments

These tests are used to check whether each of the factors investigated in the experiment is significant or not. For the previous example, with two factors, A and B, and their interaction, AB, the statements for the hypothesis tests can be formulated as follows:


1.H0:τ1=τ2=...=τna=0 (Main effect of A is absent)H1:τi0 for at least one i2.H0:δ1=δ2=...=δnb=0 (Main effect of B is absent)H1:δj0 for at least one j3.H0:(τδ)11=(τδ)12=...=(τδ)nanb=0 (Interaction AB is absent)H1:(τδ)ij0 for at least one ij


The test statistics for the three tests are as follows:


1)(F0)A=MSAMSE
where MSA is the mean square due to factor A and MSE is the error mean square.


2)(F0)B=MSBMSE
where MSB is the mean square due to factor B and MSE is the error mean square.


3)(F0)AB=MSABMSE
where MSAB is the mean square due to interaction AB and MSE is the error mean square.


The tests are identical to the partial F test explained in Multiple Linear Regression Analysis. The sum of squares for these tests (to obtain the mean squares) are calculated by splitting the model sum of squares into the extra sum of squares due to each factor. The extra sum of squares calculated for each of the factors may either be partial or sequential. For the present example, if the extra sum of squares used is sequential, then the model sum of squares can be written as:


SSTR=SSA+SSB+SSAB


where SSTR represents the model sum of squares, SSA represents the sequential sum of squares due to factor A, SSB represents the sequential sum of squares due to factor and SSAB represents the sequential sum of squares due to the interaction AB. The mean squares are obtained by dividing the sum of squares by the associated degrees of freedom. Once the mean squares are known the test statistics can be calculated. For example, the test statistic to test the significance of factor A (or the hypothesis H0:τi=0) can then be obtained as:


(F0)A=MSAMSE=SSA/dof(SSA)SSE/dof(SSE)


Similarly the test statistic to test significance of factor B and the interaction AB can be respectively obtained as:


(F0)B=MSBMSE=SSB/dof(SSB)SSE/dof(SSE)(F0)AB=MSABMSE=SSAB/dof(SSAB)SSE/dof(SSE)


It is recommended to conduct the test for interactions before conducting the test for the main effects. This is because, if an interaction is present, then the main effect of the factor depends on the level of the other factors and looking at the main effect is of little value. However, if the interaction is absent then the main effects become important.


Example

Consider an experiment to investigate the effect of speed and type of fuel additive used on the mileage of a sports utility vehicle. Three speeds and two types of fuel additives are investigated. Each of the treatment combinations are replicated three times. The mileage values observed are displayed in the fifth table.


Mileage data for different speeds and fuel additive types.


The experimental design for the data in the fifth table is shown in the figure below. In the figure, the factor Speed is represented as factor A and the factor Fuel Additive is represented as factor B. The experimenter would like to investigate if speed, fuel additive or the interaction between speed and fuel additive affects the mileage of the sports utility vehicle. In other words, the following hypotheses need to be tested:


1.H0:τ1=τ2=τ3=0 (No main effect of factor A, speed)H1:τi0 for at least one i2.H0:δ1=δ2=δ3=0 (No main effect of factor B, fuel additive)H1:δj0 for at least one j3.H0:(τδ)11=(τδ)12=...=(τδ)33=0 (No interaction AB)H1:(τδ)ij0 for at least one ij


The test statistics for the three tests are:


1.(F0)A=MSAMSE
where MSA is the mean square for factor A and MSE is the error mean square


2.(F0)B=MSBMSE
where MSB is the mean square for factor B and MSE is the error mean square


3.(F0)AB=MSABMSE
where MSAB is the mean square for interaction AB and MSE is the error mean square


Experimental design for the data in the fifth table.


The ANOVA model for this experiment can be written as:


Yijk=μ+τi+δj+(τδ)ij+ϵijk


where τi represents the ith treatment of factor A (speed) with i =1, 2, 3; δj represents the jth treatment of factor B (fuel additive) with j =1, 2; and (τδ)ij represents the interaction effect. In order to calculate the test statistics, it is convenient to express the ANOVA model of the equation given above in the form y=Xβ+ϵ. This can be done as explained next.

Expression of the ANOVA Model as y = ΧΒ + ε

Since the effects τi, δj and (τδ)ij represent deviations from the overall mean, the following constraints exist. Constraints on τi are:


3i=1τi=0or τ1+τ2+τ3=0


Therefore, only two of the τi effects are independent. Assuming that τ1 and τ2 are independent, τ3=(τ1+τ2). (The null hypothesis to test the significance of factor A can be rewritten using only the independent effects as H0:τ1=τ2=0.) DOE++ displays only the independent effects because only these effects are important to the analysis. The independent effects, τ1 and τ2, are displayed as A[1] and A[2] respectively because these are the effects associated with factor A (speed). Constraints on δj are:


2j=1δj=0or δ1+δ2=0


Therefore, only one of the δj effects are independent. Assuming that δ1 is independent, δ2=δ1. (The null hypothesis to test the significance of factor B can be rewritten using only the independent effect as H0:δ1=0.) The independent effect δ1 is displayed as B:B in DOE++. Constraints on (τδ)ij are:


3i=1(τδ)ij=0and 2j=1(τδ)ij=0or (τδ)11+(τδ)21+(τδ)31=0(τδ)12+(τδ)22+(τδ)32=0and (τδ)11+(τδ)12=0(τδ)21+(τδ)22=0(τδ)31+(τδ)32=0


The last five equations given above represent four constraints, as only four of these five equations are independent. Therefore, only two out of the six (τδ)ij effects are independent. Assuming that (τδ)11 and (τδ)21 are independent, the other four effects can be expressed in terms of these effects. (The null hypothesis to test the significance of interaction AB can be rewritten using only the independent effects as H0:(τδ)11=(τδ)21=0.) The effects (τδ)11 and (τδ)21 are displayed as A[1]B and A[2]B respectively in DOE++.

The regression version of the ANOVA model can be obtained using indicator variables, similar to the case of the single factor experiment in Fitting ANOVA Models. Since factor A has three levels, two indicator variables, x1 and x2, are required which need to be coded as shown next:


Treatment Effect τ1:x1=1, x2=0Treatment Effect τ2:x1=0, x2=1 Treatment Effect τ3:x1=1, x2=1 


Factor B has two levels and can be represented using one indicator variable, x3, as follows:


Treatment Effect δ1:x3=1Treatment Effect δ2:x3=1


The AB interaction will be represented by all possible terms resulting from the product of the indicator variables representing factors A and B. There are two such terms here - x1x3 and x2x3. The regression version of the ANOVA model can finally be obtained as:


Y=μ+τ1x1+τ2x2+δ1x3+(τδ)11x1x3+(τδ)21x2x3+ϵ


In matrix notation this model can be expressed as:


y=Xβ+ϵ


where:


y=[Y111Y211Y311Y121Y221Y321Y112Y212..Y323]=Xβ+ϵ=[110110101101111111110110101101111111110110101101............111111][μτ1τ2δ1(τδ)11(τδ)21]+[ϵ111ϵ211ϵ311ϵ121ϵ221ϵ321ϵ112ϵ212..ϵ323]


The vector y can be substituted with the response values from the fifth table to get:

y=[Y111Y211Y311Y121Y221Y321Y112Y212..Y323]=[17.318.917.118.719.118.817.818.2..18.3]


Knowing y, X and β, the sum of squares for the ANOVA model and the extra sum of squares for each of the factors can be calculated. These are used to calculate the mean squares that are used to obtain the test statistics.

Calculation of Sum of Squares for the Model

The model sum of squares, SSTR, for the regression version of the ANOVA model can be obtained as:


SSTR=y[H(1nanbm)J]y=y[H(118)J]y=9.7311


where H is the hat matrix and J is the matrix of ones. Since five effect terms (τ1, τ2, δ1, (τδ)11 and (τδ)21) are used in the model, the number of degrees of freedom associated with SSTR is five (dof(SSTR)=5).

The total sum of squares, SST, can be calculated as:


SST=y[I(1nanbm)J]y=y[I(118)J]y=10.7178


Since there are 18 observed response values, the number of degrees of freedom associated with the total sum of squares is 17 (dof(SST)=17). The error sum of squares can now be obtained:


SSE=SSTSSTR=10.71789.7311=0.9867


Since there are three replicates of the full factorial experiment, all of the error sum of squares is pure error. (This can also be seen from the preceding figure, where each treatment combination of the full factorial design is repeated three times.) The number of degrees of freedom associated with the error sum of squares is:


dof(SSE)=dof(SST)dof(SSTR)=175=12


Calculation of Extra Sum of Squares for the Factors

The sequential sum of squares for factor A can be calculated as:


SSA=SSTR(μ,τ1,τ2)SSTR(μ)=y[Hμ,τ1,τ2(118)J]y0


where Hμ,τ1,τ2=Xμ,τ1,τ2(Xμ,τ1,τ2Xμ,τ1,τ2)1Xμ,τ1,τ2 and Xμ,τ1,τ2 is the matrix containing only the first three columns of the X matrix. Thus:


SSA=y[Hμ,τ1,τ2(118)J]y0=4.58110=4.5811


Since there are two independent effects (τ1, τ2) for factor A, the degrees of freedom associated with SSA are two (dof(SSA)=2).

Similarly, the sum of squares for factor B can be calculated as:


SSB=SSTR(μ,τ1,τ2,δ1)SSTR(μ,τ1,τ2)=y[Hμ,τ1,τ2,δ1(118)J]yy[Hμ,τ1,τ2(118)J]y=9.49004.5811=4.9089


Since there is one independent effect, δ1, for factor B, the number of degrees of freedom associated with SSB is one (dof(SSB)=1).

The sum of squares for the interaction AB is:


SSAB=SSTR(μ,τ1,τ2,δ1,(τδ)11,(τδ)21)SSTR(μ,τ1,τ2,δ1)=SSTRSSTR(μ,τ1,τ2,δ1)=9.73119.4900=0.2411


Since there are two independent interaction effects, (τδ)11 and (τδ)21, the number of degrees of freedom associated with SSAB is two (dof(SSAB)=2).

Calculation of the Test Statistics

Knowing the sum of squares, the test statistic for each of the factors can be calculated. Analyzing the interaction first, the test statistic for interaction AB is:


(f0)AB=MSABMSE=0.2411/20.9867/12=1.47


The p value corresponding to this statistic, based on the F distribution with 2 degrees of freedom in the numerator and 12 degrees of freedom in the denominator, is:


p value=1P(F(f0)AB)=10.7307=0.2693


Assuming that the desired significance level is 0.1, since p value > 0.1, we fail to reject H0:(τδ)ij=0 and conclude that the interaction between speed and fuel additive does not significantly affect the mileage of the sports utility vehicle. DOE++ displays this result in the ANOVA table, as shown in the following figure. In the absence of the interaction, the analysis of main effects becomes important.


The test statistic for factor A is:


(f0)A=MSAMSE=SSA/dof(SSA)SSE/dof(SSE)=4.5811/20.9867/12=27.86


The p value corresponding to this statistic based on the F distribution with 2 degrees of freedom in the numerator and 12 degrees of freedom in the denominator is:


p value=1P(F(f0)A)=10.99997=0.00003


Since p value < 0.1, H0:τi=0 is rejected and it is concluded that factor A (or speed) has a significant effect on the mileage.

The test statistic for factor B is:


(f0)B=MSBMSE=4.9089/10.9867/12=59.7


The p value corresponding to this statistic based on the F distribution with 2 degrees of freedom in the numerator and 12 degrees of freedom in the denominator is:


p value=1P(F(f0)B)=10.999995=0.000005


Since p value < 0.1, H0:δj=0 is rejected and it is concluded that factor B (or fuel additive type) has a significant effect on the mileage. Therefore, it can be concluded that speed and fuel additive type affect the mileage of the vehicle significantly. The results are displayed in the ANOVA table of the following figure.


Analysis results for the experiment in the fifth table.


Calculation of Effect Coefficients

Results for the effect coefficients of the model of the regression version of the ANOVA model are displayed in the Regression Information table in the following figure. Calculations of the results in this table are discussed next. The effect coefficients can be calculated as follows:


β^=(XX)1Xy=[18.28890.20560.69440.52220.00560.1389]


Therefore, μ^=18.2889, τ^1=0.2056, τ^2=0.6944 etc. As mentioned previously, these coefficients are displayed as Intercept, A[1] and A[2] respectively depending on the name of the factor used in the experimental design. The standard error for each of these estimates is obtained using the diagonal elements of the variance-covariance matrix C.


C=σ^2(XX)1=MSE(XX)1=[0.00460000000.00910.004600000.00460.00910000000.00460000000.00910.004600000.00460.0091]


For example, the standard error for τ^1 is:


se(τ^1)=C22=0.0091=0.0956


Then the t statistic for τ^1 can be obtained as:


t0=τ^1se(τ^1)=0.20560.0956=2.1506


The p value corresponding to this statistic is:


Confidence intervals on τ1 can also be calculated. The 90% limits on τ1 are:


=τ^1±tα/2,n(k+1)C22=τ1±t0.05,12C22=0.2056±0.1704


Thus, the 90% limits on τ1 are 0.3760 and 0.0352 respectively. Results for other coefficients are obtained in a similar manner.

Least Squares Means

The estimated mean response corresponding to the ith level of any factor is obtained using the adjusted estimated mean which is also called the least squares mean. For example, the mean response corresponding to the first level of factor A is μ+τ1. An estimate of this is μ^+τ^1 or (18.2889+(0.2056)=18.0833). Similarly, the estimated response at the third level of factor A is μ^+τ^3 or μ^+(τ^1τ^2) or (18.2889+(0.20560.6944)=17.8001).


Residual Analysis

As in the case of single factor experiments, plots of residuals can also be used to check for model adequacy in factorial experiments. Box-Cox transformations are also available in DOE++ for factorial experiments.