ANOVA for Designed Experiments: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
 
(45 intermediate revisions by 4 users not shown)
Line 4: Line 4:
The studies that enable the establishment of a cause-and-effect relationship are called ''experiments''. In experiments the response is investigated by studying only the effect of the factor(s) of interest and excluding all other effects that may provide alternative justifications to the observed change in response. This is done in two ways. First, the levels of the factors to be investigated are carefully selected and then strictly controlled during the execution of the experiment. The aspect of selecting what factor levels should be investigated in the experiment is called the ''design'' of the experiment. The second distinguishing feature of experiments is that observations in an experiment are recorded in a random order. By doing this, it is hoped that the effect of all other factors not being investigated in the experiment will get cancelled out so that the change in the response is the result of only the investigated factors. Using these two techniques, experiments tend to ensure that alternative justifications to observed changes in the response are voided, thereby enabling the establishment of a cause-and-effect relationship between the response and the investigated factors.
The studies that enable the establishment of a cause-and-effect relationship are called ''experiments''. In experiments the response is investigated by studying only the effect of the factor(s) of interest and excluding all other effects that may provide alternative justifications to the observed change in response. This is done in two ways. First, the levels of the factors to be investigated are carefully selected and then strictly controlled during the execution of the experiment. The aspect of selecting what factor levels should be investigated in the experiment is called the ''design'' of the experiment. The second distinguishing feature of experiments is that observations in an experiment are recorded in a random order. By doing this, it is hoped that the effect of all other factors not being investigated in the experiment will get cancelled out so that the change in the response is the result of only the investigated factors. Using these two techniques, experiments tend to ensure that alternative justifications to observed changes in the response are voided, thereby enabling the establishment of a cause-and-effect relationship between the response and the investigated factors.


===Randomization===
'''Randomization'''


The aspect of recording observations in an experiment in a random order is referred to as ''randomization''. Specifically, randomization is the process of assigning the various levels of the investigated factors to the experimental units in a random fashion.  An experiment is said to be ''completely randomized'' if the probability of an experimental unit to be subjected to any level of a factor is equal for all the experimental units. The importance of randomization can be illustrated using an example. Consider an experiment where the effect of the speed of a lathe machine on the surface finish of a product is being investigated. In order to save time, the experimenter records surface finish values by running the lathe machine continuously and recording observations in the order of increasing speeds. The analysis of the experiment data shows that an increase in lathe speeds causes a decrease in the quality of surface finish. However the results of the experiment are disputed by the lathe operator who claims that he has been able to obtain better surface finish quality in the products by operating the lathe machine at higher speeds. It is later found that the faulty results were caused because of overheating of the tool used in the machine. Since the lathe was run continuously in the order of increased speeds the observations were recorded in the order of increased tool temperatures. This problem could have been avoided if the experimenter had randomized the experiment and taken reading at the various lathe speeds in a random fashion. This would require the experimenter to stop and restart the machine at every observation, thereby keeping the temperature of the tool within a reasonable range. Randomization would have ensured that the effect of heating of the machine tool is not included in the experiment.
The aspect of recording observations in an experiment in a random order is referred to as ''randomization''. Specifically, randomization is the process of assigning the various levels of the investigated factors to the experimental units in a random fashion.  An experiment is said to be ''completely randomized'' if the probability of an experimental unit to be subjected to any level of a factor is equal for all the experimental units. The importance of randomization can be illustrated using an example. Consider an experiment where the effect of the speed of a lathe machine on the surface finish of a product is being investigated. In order to save time, the experimenter records surface finish values by running the lathe machine continuously and recording observations in the order of increasing speeds. The analysis of the experiment data shows that an increase in lathe speeds causes a decrease in the quality of surface finish. However the results of the experiment are disputed by the lathe operator who claims that he has been able to obtain better surface finish quality in the products by operating the lathe machine at higher speeds. It is later found that the faulty results were caused because of overheating of the tool used in the machine. Since the lathe was run continuously in the order of increased speeds the observations were recorded in the order of increased tool temperatures. This problem could have been avoided if the experimenter had randomized the experiment and taken reading at the various lathe speeds in a random fashion. This would require the experimenter to stop and restart the machine at every observation, thereby keeping the temperature of the tool within a reasonable range. Randomization would have ensured that the effect of heating of the machine tool is not included in the experiment.
Line 83: Line 83:


The coefficients of the treatment effects <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math> can be expressed using two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, as follows:
The coefficients of the treatment effects <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math> can be expressed using two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, as follows:


::<math>\begin{align}
::<math>\begin{align}
Line 103: Line 104:
The equation given above represents the "regression version" of the ANOVA model.
The equation given above represents the "regression version" of the ANOVA model.


====Comparison of ANOVA and Regression Models====


It can be seen from the equation given above that in an ANOVA model each factor is treated as a qualitative factor. In the present example the factor, lathe speed, is a quantitative factor with three levels. But the ANOVA model treats this factor as a qualitative factor with three levels. Therefore, two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, are required to represent this factor. Note that if a regression model were to be fitted to the data in the first table then a distinction is made between quantitative and qualitative factors. For regression models, the factor, lathe speed, would be used as a quantitative factor and represented with a single predictor variable. For example, if a first order regression model were to be fitted to the data in the first table, then the regression model would take the form <math>{{Y}_{ij}}={{\beta }_{0}}+{{\beta }_{1}}{{x}_{i1}}+{{\epsilon }_{ij}}\,\!</math>. If a second order regression model were to be fitted, the regression model would be <math>{{Y}_{ij}}={{\beta }_{0}}+{{\beta }_{1}}{{x}_{i1}}+{{\beta }_{2}}x_{i1}^{2}+{{\epsilon }_{ij}}\,\!</math>. Notice that unlike these regression models, the regression version of the ANOVA model does not make any assumption about the nature of relationship between the response and the factor being investigated.
===Treat Numerical Factors as Qualitative or Quantitative ?===
 
It can be seen from the equation given above that in an ANOVA model each factor is treated as a qualitative factor. In the present example the factor, lathe speed, is a quantitative factor with three levels. But the ANOVA model treats this factor as a qualitative factor with three levels. Therefore, two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, are required to represent this factor.  


The choice of the two models for a particular data set depends on the objective of the experimenter. In the case of the data of the first table, the objective of the experimenter is to compare the levels of the factor to see if change in the levels leads to a significant change in the response.  The objective is not to make predictions on the response for a given level of the factor. Therefore, the ANOVA model is used in this case. If the objective of the experimenter were prediction or optimization, the experimenter would use a regression model and focus on aspects such as the nature of relationship between the factor, lathe speed, and the response, surface finish, so that the regression model obtained is able to make accurate predictions.
Note that in a regression model a variable can either be treated as a quantitative or a qualitative variable. The factor, lathe speed, would be used as a quantitative factor and represented with a single predictor variable in a regression model. For example, if a first order model were to be fitted to the data in the first table, then the regression model would take the form <math>{{Y}_{ij}}={{\beta }_{0}}+{{\beta }_{1}}{{x}_{i1}}+{{\epsilon }_{ij}}\,\!</math>. If a second order regression model were to be fitted, the regression model would be <math>{{Y}_{ij}}={{\beta }_{0}}+{{\beta }_{1}}{{x}_{i1}}+{{\beta }_{2}}x_{i1}^{2}+{{\epsilon }_{ij}}\,\!</math>. Notice that unlike these regression models, the regression version of the ANOVA model does not make any assumption about the nature of relationship between the response and the factor being investigated.


The choice of treating a particular factor as a quantitative or qualitative variable depends on the objective of the experimenter. In the case of the data of the first table, the objective of the experimenter is to compare the levels of the factor to see if change in the levels leads to a significant change in the response.  The objective is not to make predictions on the response for a given level of the factor. Therefore, the factor is treated as a qualitative factor in this case. If the objective of the experimenter were prediction or optimization, the experimenter would focus on aspects such as the nature of relationship between the factor, lathe speed, and the response, surface finish, so that the factor should be modeled as a quantitative factor to make accurate predictions.


====Expression of the ANOVA Model in the Form <math>y=X\beta +\epsilon \,\!</math>====
====Expression of the ANOVA Model in the Form <math>y=X\beta +\epsilon \,\!</math>====
Line 131: Line 134:


::<math>y=X\beta +\epsilon \,\!</math>
::<math>y=X\beta +\epsilon \,\!</math>


:where
:where


::<math>y=\left[ \begin{matrix}
::<math>y=\left[ \begin{matrix}
Line 172: Line 177:


:Thus:
:Thus:


::<math>\begin{align}
::<math>\begin{align}
Line 222: Line 228:


The hypothesis test in single factor experiments examines the ANOVA model to see if the response at any level of the investigated factor is significantly different from that at the other levels. If this is not the case and the response at all levels is not significantly different, then it can be concluded that the investigated factor does not affect the response. The test on the ANOVA model is carried out by checking to see if any of the treatment effects, <math>{{\tau }_{i}}\,\!</math>, are non-zero. The test is similar to the test of significance of regression mentioned in [[Simple_Linear_Regression_Analysis| Simple Linear Regression Analysis]] and [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]] in the context of regression models. The hypotheses statements for this test are:
The hypothesis test in single factor experiments examines the ANOVA model to see if the response at any level of the investigated factor is significantly different from that at the other levels. If this is not the case and the response at all levels is not significantly different, then it can be concluded that the investigated factor does not affect the response. The test on the ANOVA model is carried out by checking to see if any of the treatment effects, <math>{{\tau }_{i}}\,\!</math>, are non-zero. The test is similar to the test of significance of regression mentioned in [[Simple_Linear_Regression_Analysis| Simple Linear Regression Analysis]] and [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]] in the context of regression models. The hypotheses statements for this test are:


::<math>\begin{align}
::<math>\begin{align}
Line 230: Line 237:


The test for <math>{{H}_{0}}\,\!</math> is carried out using the following statistic:
The test for <math>{{H}_{0}}\,\!</math> is carried out using the following statistic:


::<math>{{F}_{0}}=\frac{M{{S}_{TR}}}{M{{S}_{E}}}\,\!</math>
::<math>{{F}_{0}}=\frac{M{{S}_{TR}}}{M{{S}_{E}}}\,\!</math>




where <math>M{{S}_{TR}}\,\!</math> represents the mean square for the ANOVA model and <math>M{{S}_{E}}\,\!</math> is the error mean square. Note that in the case of ANOVA models we use the notation <math>M{{S}_{TR}}\,\!</math> (treatment mean square) for the model mean square and <math>S{{S}_{TR}}\,\!</math> (treatment sum of squares) for the model sum of squares (instead of <math>M{{S}_{R}}\,\!</math>, regression mean square, and <math>S{{S}_{R}}\,\!</math>, regression sum of squares, used in Chapters 4 and 5). This is done to indicate that the model under consideration is the ANOVA model and not the regression model. The calculations to obtain <math>M{{S}_{TR}}\,\!</math> and <math>S{{S}_{TR}}\,\!</math> are identical to the calculations to obtain <math>M{{S}_{R}}\,\!</math> and <math>S{{S}_{R}}\,\!</math> explained in [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]].  
where <math>M{{S}_{TR}}\,\!</math> represents the mean square for the ANOVA model and <math>M{{S}_{E}}\,\!</math> is the error mean square. Note that in the case of ANOVA models we use the notation <math>M{{S}_{TR}}\,\!</math> (treatment mean square) for the model mean square and <math>S{{S}_{TR}}\,\!</math> (treatment sum of squares) for the model sum of squares (instead of <math>M{{S}_{R}}\,\!</math>, regression mean square, and <math>S{{S}_{R}}\,\!</math>, regression sum of squares, used in [[Simple_Linear_Regression_Analysis| Simple Linear Regression Analysis]] and [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]]). This is done to indicate that the model under consideration is the ANOVA model and not the regression model. The calculations to obtain <math>M{{S}_{TR}}\,\!</math> and <math>S{{S}_{TR}}\,\!</math> are identical to the calculations to obtain <math>M{{S}_{R}}\,\!</math> and <math>S{{S}_{R}}\,\!</math> explained in [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]].  




Line 240: Line 248:


The sum of squares to obtain the statistic <math>{{F}_{0}}\,\!</math> can be calculated as explained in [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]]. Using the data in the first table, the model sum of squares, <math>S{{S}_{TR}}\,\!</math>, can be calculated as:
The sum of squares to obtain the statistic <math>{{F}_{0}}\,\!</math> can be calculated as explained in [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]]. Using the data in the first table, the model sum of squares, <math>S{{S}_{TR}}\,\!</math>, can be calculated as:


::<math>\begin{align}
::<math>\begin{align}
Line 268: Line 277:
In the previous equation, <math>{{n}_{a}}\,\!</math> represents the number of levels of the factor, <math>m\,\!</math> represents the replicates at each level, <math>y\,\!</math> represents the vector of the response values, <math>H\,\!</math> represents the hat matrix and <math>J\,\!</math> represents the matrix of ones. (For details on each of these terms, refer to [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]].)
In the previous equation, <math>{{n}_{a}}\,\!</math> represents the number of levels of the factor, <math>m\,\!</math> represents the replicates at each level, <math>y\,\!</math> represents the vector of the response values, <math>H\,\!</math> represents the hat matrix and <math>J\,\!</math> represents the matrix of ones. (For details on each of these terms, refer to [[Multiple_Linear_Regression_Analysis| Multiple Linear Regression Analysis]].)
Since two effect terms, <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math>, are used in the regression version of the ANOVA model, the degrees of freedom associated with the model sum of squares, <math>S{{S}_{TR}}\,\!</math>, is two.
Since two effect terms, <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math>, are used in the regression version of the ANOVA model, the degrees of freedom associated with the model sum of squares, <math>S{{S}_{TR}}\,\!</math>, is two.


::<math>dof(S{{S}_{TR}})=2\,\!</math>
::<math>dof(S{{S}_{TR}})=2\,\!</math>
Line 273: Line 283:


The total sum of squares, <math>S{{S}_{T}}\,\!</math>, can be obtained as follows:
The total sum of squares, <math>S{{S}_{T}}\,\!</math>, can be obtained as follows:


::<math>\begin{align}
::<math>\begin{align}
Line 298: Line 309:
\end{align}\,\!</math>
\end{align}\,\!</math>




In the previous equation, <math>I\,\!</math> is the identity matrix. Since there are 12 data points in all, the number of degrees of freedom associated with <math>S{{S}_{T}}\,\!</math> is 11.  
In the previous equation, <math>I\,\!</math> is the identity matrix. Since there are 12 data points in all, the number of degrees of freedom associated with <math>S{{S}_{T}}\,\!</math> is 11.  
Line 338: Line 348:


The <math>p\,\!</math> value for the statistic based on the <math>F\,\!</math> distribution with 2 degrees of freedom in the numerator and 9 degrees of freedom in the denominator is:  
The <math>p\,\!</math> value for the statistic based on the <math>F\,\!</math> distribution with 2 degrees of freedom in the numerator and 9 degrees of freedom in the denominator is:  


::<math>\begin{align}
::<math>\begin{align}
Line 349: Line 360:




[[Image:doe6.2.png|thumb|center|500px|ANOVA table for the data in the first table.]]
[[Image:doe6.2.png|thumb|center|650px|ANOVA table for the data in the first table.]]
 


===Confidence Interval on the <math>i\,\!</math>th Treatment Mean===
===Confidence Interval on the ''i''<sup>th</sup> Treatment Mean===


The response at each treatment of a single factor experiment can be assumed to be a normal population with a mean of <math>{{\mu }_{i}}\,\!</math> and variance of <math>{{\sigma }^{2}}\,\!</math> provided that the error terms can be assumed to be normally distributed. A point estimator of <math>{{\mu }_{i}}\,\!</math> is the average response at each treatment, <math>{{\bar{y}}_{i\cdot }}\,\!</math>. Since this is a sample average, the associated variance is <math>{{\sigma }^{2}}/{{m}_{i}}\,\!</math>, where <math>{{m}_{i}}\,\!</math> is the number of replicates at the <math>i\,\!</math>th treatment. Therefore, the confidence interval on <math>{{\mu }_{i}}\,\!</math> is based on the <math>t\,\!</math> distribution. Recall from [[Statistical_Background_on_DOE| Statistical Background on DOE]] (inference on population mean when variance is unknown) that:  
The response at each treatment of a single factor experiment can be assumed to be a normal population with a mean of <math>{{\mu }_{i}}\,\!</math> and variance of <math>{{\sigma }^{2}}\,\!</math> provided that the error terms can be assumed to be normally distributed. A point estimator of <math>{{\mu }_{i}}\,\!</math> is the average response at each treatment, <math>{{\bar{y}}_{i\cdot }}\,\!</math>. Since this is a sample average, the associated variance is <math>{{\sigma }^{2}}/{{m}_{i}}\,\!</math>, where <math>{{m}_{i}}\,\!</math> is the number of replicates at the <math>i\,\!</math>th treatment. Therefore, the confidence interval on <math>{{\mu }_{i}}\,\!</math> is based on the <math>t\,\!</math> distribution. Recall from [[Statistical_Background_on_DOE| Statistical Background on DOE]] (inference on population mean when variance is unknown) that:  


::<math>\begin{align}
::<math>\begin{align}
Line 362: Line 375:


has a <math>t\,\!</math> distribution with degrees of freedom <math>=dof(S{{S}_{E}})\,\!</math>. Therefore, a 100 (<math>1-\alpha \,\!</math>) percent confidence interval on the <math>i\,\!</math>th treatment mean, <math>{{\mu }_{i}}\,\!</math>, is:
has a <math>t\,\!</math> distribution with degrees of freedom <math>=dof(S{{S}_{E}})\,\!</math>. Therefore, a 100 (<math>1-\alpha \,\!</math>) percent confidence interval on the <math>i\,\!</math>th treatment mean, <math>{{\mu }_{i}}\,\!</math>, is:


::<math>{{\bar{y}}_{i\cdot }}\pm {{t}_{\alpha /2,dof(S{{S}_{E}})}}\sqrt{\frac{M{{S}_{E}}}{{{m}_{i}}}}\,\!</math>
::<math>{{\bar{y}}_{i\cdot }}\pm {{t}_{\alpha /2,dof(S{{S}_{E}})}}\sqrt{\frac{M{{S}_{E}}}{{{m}_{i}}}}\,\!</math>
Line 367: Line 381:


For example, for the first treatment of the lathe speed we have:
For example, for the first treatment of the lathe speed we have:


::<math>\begin{align}
::<math>\begin{align}
Line 375: Line 390:




In DOE++, this value is displayed as the Estimated Mean for the first level, as shown in the Data Summary Table in the figure below. The value displayed as the standard deviation for this level is simply the sample standard deviation calculated using the observations corresponding to this level.  The 90% confidence interval for this treatment is:  
In DOE++, this value is displayed as the Estimated Mean for the first level, as shown in the Data Summary table in the figure below. The value displayed as the standard deviation for this level is simply the sample standard deviation calculated using the observations corresponding to this level.  The 90% confidence interval for this treatment is:  
 


::<math>\begin{align}
::<math>\begin{align}
Line 389: Line 405:




[[Image:doe6.3.png|thumb|center|400px|Data Summary table for the single factor experiment in the first table.]]
[[Image:doe6.3.png|thumb|center|650px|Data Summary table for the single factor experiment in the first table.]]
 


===Confidence Interval on the Difference in Two Treatment Means===
===Confidence Interval on the Difference in Two Treatment Means===


The confidence interval on the difference in two treatment means, <math>{{\mu }_{i}}-{{\mu }_{j}}\,\!</math>, is used to compare two levels of the factor at a given significance. If the confidence interval does not include the value of zero, it is concluded that the two levels of the factor are significantly different. The point estimator of <math>{{\mu }_{i}}-{{\mu }_{j}}\,\!</math> is <math>{{\bar{y}}_{i\cdot }}-{{\bar{y}}_{j\cdot }}\,\!</math>. The variance for <math>{{\bar{y}}_{i\cdot }}-{{\bar{y}}_{j\cdot }}\,\!</math> is:
The confidence interval on the difference in two treatment means, <math>{{\mu }_{i}}-{{\mu }_{j}}\,\!</math>, is used to compare two levels of the factor at a given significance. If the confidence interval does not include the value of zero, it is concluded that the two levels of the factor are significantly different. The point estimator of <math>{{\mu }_{i}}-{{\mu }_{j}}\,\!</math> is <math>{{\bar{y}}_{i\cdot }}-{{\bar{y}}_{j\cdot }}\,\!</math>. The variance for <math>{{\bar{y}}_{i\cdot }}-{{\bar{y}}_{j\cdot }}\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 426: Line 444:


Then a 100 (1- <math>\alpha \,\!</math>) percent confidence interval on the difference in two treatment means, <math>{{\mu }_{i}}-{{\mu }_{j}}\,\!</math>, is:
Then a 100 (1- <math>\alpha \,\!</math>) percent confidence interval on the difference in two treatment means, <math>{{\mu }_{i}}-{{\mu }_{j}}\,\!</math>, is:


::<math>{{\bar{y}}_{i\cdot }}-{{\bar{y}}_{j\cdot }}\pm {{t}_{\alpha /2,dof(S{{S}_{E}})}}\sqrt{\frac{2M{{S}_{E}}}{m}}\,\!</math>
::<math>{{\bar{y}}_{i\cdot }}-{{\bar{y}}_{j\cdot }}\pm {{t}_{\alpha /2,dof(S{{S}_{E}})}}\sqrt{\frac{2M{{S}_{E}}}{m}}\,\!</math>




Line 442: Line 459:


The pooled standard error for this difference is:
The pooled standard error for this difference is:


::<math>\begin{align}
::<math>\begin{align}
Line 452: Line 470:




To test <math>{{H}_{0}}\ \ :\ \ {{\mu }_{1}}-{{\mu }_{2}}=0\,\!</math>, the <math>t\,\!</math> statistic is:
To test <math>{{H}_{0}}:{{\mu }_{1}}-{{\mu }_{2}}=0\,\!</math>, the <math>t\,\!</math> statistic is:
 


::<math>\begin{align}
::<math>\begin{align}
Line 463: Line 482:


In DOE++, the value of the statistic is displayed in the Mean Comparisons table under the column T Value as shown in the figure below. The 90% confidence interval on the difference <math>{{\mu }_{1}}-{{\mu }_{2}}\,\!</math> is:
In DOE++, the value of the statistic is displayed in the Mean Comparisons table under the column T Value as shown in the figure below. The 90% confidence interval on the difference <math>{{\mu }_{1}}-{{\mu }_{2}}\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 491: Line 511:




[[Image:doe6.4.png|thumb|center|400px|Mean Comparisons table for the data in the first table.]]
[[Image:doe6.4.png|thumb|center|644px|Mean Comparisons table for the data in the first table.]]
 


Equality of variance is checked by plotting residuals against the treatments and the treatment averages, <math>{{\bar{y}}_{i\cdot }}\,\!</math>  (also referred to as fitted values), and inspecting the spread in the residuals. If a pattern is seen in these plots, then this indicates the need to use a suitable transformation on the response that will ensure variance equality. Box-Cox transformations are discussed in the next section. To check for independence of the random error terms residuals are plotted against time or run-order to ensure that a pattern does not exist in these plots. Residual plots for the given example are shown in the following two figures. The plots show that the assumptions associated with the ANOVA model are not violated.   
Equality of variance is checked by plotting residuals against the treatments and the treatment averages, <math>{{\bar{y}}_{i\cdot }}\,\!</math>  (also referred to as fitted values), and inspecting the spread in the residuals. If a pattern is seen in these plots, then this indicates the need to use a suitable transformation on the response that will ensure variance equality. Box-Cox transformations are discussed in the next section. To check for independence of the random error terms residuals are plotted against time or run-order to ensure that a pattern does not exist in these plots. Residual plots for the given example are shown in the following two figures. The plots show that the assumptions associated with the ANOVA model are not violated.   




[[Image:doe6.5.png|thumb|center|400px|Normal probability plot of residuals for the single factor experiment in the first table.]]
[[Image:doe6.5.png|thumb|center|550px|Normal probability plot of residuals for the single factor experiment in the first table.]]
<br>
 
 
[[Image:doe6.6.png|thumb|center|550px|Plot of residuals against fitted values for the single factor experiment in the first table.]]
 


[[Image:doe6.6.png|thumb|center|400px|Plot of residuals against fitted values for the single factor experiment in the first table.]]
<br>
<br>
===Box-Cox Method===
===Box-Cox Method===


Transformations on the response may be used when residual plots for an experiment show a pattern. This indicates that the equality of variance does not hold for the residuals of the given model. The Box-Cox method can be used to automatically identify a suitable power transformation for the data based on the relation:
Transformations on the response may be used when residual plots for an experiment show a pattern. This indicates that the equality of variance does not hold for the residuals of the given model. The Box-Cox method can be used to automatically identify a suitable power transformation for the data based on the following relationship:
 


::<math>{{Y}^{*}}={{Y}^{\lambda }}\,\!</math>
::<math>{{Y}^{*}}={{Y}^{\lambda }}\,\!</math>




<math>\lambda \,\!</math> is determined using the given data such that <math>S{{S}_{E}}\,\!</math> is minimized. The values of <math>{{Y}^{\lambda }}\,\!</math> are not used as is because of issues related to calculation or comparison of <math>S{{S}_{E}}\,\!</math> values for different values of <math>\lambda \,\!</math>. For example, for <math>\lambda =0\,\!</math> all response values will become 1. Therefore, the following relation is used to obtain <math>{{Y}^{\lambda }}\,\!</math> :
<math>\lambda \,\!</math> is determined using the given data such that <math>S{{S}_{E}}\,\!</math> is minimized. The values of <math>{{Y}^{\lambda }}\,\!</math> are not used as is because of issues related to calculation or comparison of <math>S{{S}_{E}}\,\!</math> values for different values of <math>\lambda \,\!</math>. For example, for <math>\lambda =0\,\!</math> all response values will become 1. Therefore, the following relationship is used to obtain <math>{{Y}^{\lambda }}\,\!</math> :


::<math>{{Y}^{\lambda }}=\{\begin{matrix}
  \frac{{{Y}^{\lambda }}-1}{\lambda {{{\dot{y}}}^{\lambda -1}}}  \
  \dot{y}\ln y  \
\end{matrix}\text{    }\begin{matrix}
  \lambda \ne 0\begin{matrix}
    \
    \
\end{matrix}  \
  \lambda =0  \
\end{matrix}\,\!</math>


::<math>Y^{\lambda }=\left\{
\begin{array}{cc}
\frac{y^{\lambda }-1}{\lambda \dot{y}^{\lambda -1}} & \lambda \neq 0 \
\dot{y}\ln y & \lambda =0
\end{array}
\right.\,\!</math>


where <math>\dot{y}={{\ln }^{-1}}[(1/n)\mathop{}_{}^{}\ln y]\,\!</math>.
Once all <math>{{Y}^{\lambda }}\,\!</math> values are obtained for a value of <math>\lambda \,\!</math>, the corresponding <math>S{{S}_{E}}\,\!</math> for these values is obtained using <math>{{y}^{\lambda \prime }}[I-H]{{y}^{\lambda }}\,\!</math>. The process is repeated for a number of <math>\lambda \,\!</math> values to obtain a plot of <math>S{{S}_{E}}\,\!</math> against <math>\lambda \,\!</math>. Then the value of <math>\lambda \,\!</math> corresponding to the minimum <math>S{{S}_{E}}\,\!</math> is selected as the required transformation for the given data. DOE++ plots <math>\ln S{{S}_{E}}\,\!</math> values against <math>\lambda \,\!</math> values because the range of <math>S{{S}_{E}}\,\!</math> values is large and if this is not done, all values cannot be displayed on the same plot. The range of search for the best <math>\lambda \,\!</math> value in the software is from <math>-5\,\!</math> to <math>5\,\!</math>, because larger values of of <math>\lambda \,\!</math> are usually not meaningful. DOE++ also displays a recommended transformation based on the best <math>\lambda \,\!</math> value obtained as per the second table.


where <math>\dot{y}=\exp \left[ \frac{1}{n}\sum\limits_{i=1}^{n}y_{i}\right]\,\!</math>.
Once all <math>{{Y}^{\lambda }}\,\!</math> values are obtained for a value of <math>\lambda \,\!</math>, the corresponding <math>S{{S}_{E}}\,\!</math> for these values is obtained using <math>{{y}^{\lambda \prime }}[I-H]{{y}^{\lambda }}\,\!</math>. The process is repeated for a number of <math>\lambda \,\!</math> values to obtain a plot of <math>S{{S}_{E}}\,\!</math> against <math>\lambda \,\!</math>. Then the value of <math>\lambda \,\!</math> corresponding to the minimum <math>S{{S}_{E}}\,\!</math> is selected as the required transformation for the given data. DOE++ plots <math>\ln S{{S}_{E}}\,\!</math> values against <math>\lambda \,\!</math> values because the range of <math>S{{S}_{E}}\,\!</math> values is large and if this is not done, all values cannot be displayed on the same plot. The range of search for the best <math>\lambda \,\!</math> value in the software is from <math>-5\,\!</math> to <math>5\,\!</math>, because larger values of of <math>\lambda \,\!</math> are usually not meaningful. DOE++ also displays a recommended transformation based on the best <math>\lambda \,\!</math> value obtained as shown in the table below.
<table border="2" cellpadding="5" align="center" >
  <tr>
    <th><font size="3">Best Lambda</font></th>
    <th><font size="3">Recommended Transformation</font></th>
    <th><font size="3">Equation</font></th>
  </tr>
  <tr align="center">
    <td><math>-2.5<\lambda \leq -1.5\,\!</math></td>
    <td><math>Powerλ=2\,\!</math></td>
    <td><math>Y^{\ast }=\frac{1}{Y^{2}}\,\!</math></td>
  </tr>
  <tr align="center">
    <td><math>-1.5<\lambda \leq -0.75\,\!</math></td>
    <td><math>Reciprocalλ=1\,\!</math></td>
    <td><math>Y^{\ast }=\frac{1}{Y}\,\!</math></td>
  </tr>
  <tr align="center">
    <td><math>-0.75<\lambda \leq -0.25\,\!</math></td>
    <td><math>Reciprocal Square Rootλ=0.5\,\!</math></td>
    <td><math>Y^{\ast }=\frac{1}{\sqrt{Y}}\,\!</math></td>
  </tr>
  <tr align="center">
    <td><math>-0.25<\lambda \leq 0.25\,\!</math></td>
    <td><math>Natural Logλ=0\,\!</math></td>
    <td><math>Y^{\ast }=\ln Y\,\!</math></td>
  </tr>
  <tr align="center">
    <td><math>0.25<\lambda \leq 0.75\,\!</math></td>
    <td><math>Square Rootλ=0.5\,\!</math></td>
    <td><math>Y^{\ast }=\sqrt{Y}\,\!</math></td>
  </tr>
  <tr align="center">
    <td><math>0.75<\lambda \leq 1.5\,\!</math></td>
    <td><math>Noneλ=1\,\!</math></td>
    <td><math>Y^{\ast }=Y\,\!</math></td>
  </tr>
  <tr align="center">
    <td><math>1.5<\lambda \leq 2.5\,\!</math></td>
    <td><math>Powerλ=2\,\!</math></td>
    <td><math>Y^{\ast }=Y^{2}\,\!</math></td>
  </tr>
</table>


[[Image:doet6.2.png|thumb|center|400px|Recommended Box-Cox power transformations.]]




Confidence intervals on the selected <math>\lambda \,\!</math> values are also available. Let <math>S{{S}_{E}}(\lambda )\,\!</math> be the value of <math>S{{S}_{E}}\,\!</math> corresponding to the selected value of <math>\lambda \,\!</math>. Then, to calculate the 100 (1- <math>\alpha \,\!</math>) percent confidence intervals on <math>\lambda \,\!</math>, we need to calculate <math>S{{S}^{*}}\,\!</math> as shown next:
Confidence intervals on the selected <math>\lambda \,\!</math> values are also available. Let <math>S{{S}_{E}}(\lambda )\,\!</math> be the value of <math>S{{S}_{E}}\,\!</math> corresponding to the selected value of <math>\lambda \,\!</math>. Then, to calculate the 100 (1- <math>\alpha \,\!</math>) percent confidence intervals on <math>\lambda \,\!</math>, we need to calculate <math>S{{S}^{*}}\,\!</math> as shown next:


::<math>S{{S}^{*}}=S{{S}_{E}}(\lambda )\left( 1+\frac{t_{\alpha /2,dof(S{{S}_{E}})}^{2}}{dof(S{{S}_{E}})} \right)\,\!</math>
::<math>S{{S}^{*}}=S{{S}_{E}}(\lambda )\left( 1+\frac{t_{\alpha /2,dof(S{{S}_{E}})}^{2}}{dof(S{{S}_{E}})} \right)\,\!</math>
Line 538: Line 600:
Note that the power transformations are not defined for response values that are negative or zero. DOE++ deals with negative and zero response values using the following equations (that involve addition of a suitable quantity to all of the response values if a zero or negative response value is encountered).  
Note that the power transformations are not defined for response values that are negative or zero. DOE++ deals with negative and zero response values using the following equations (that involve addition of a suitable quantity to all of the response values if a zero or negative response value is encountered).  


::<math>\begin{align}
 
  & y(i)= & y(i)+\left| {{y}_{\min }} \right|\times 1.1\text{       Negative Response} \  
::<math>\begin{array}{rll}
& y(i)= & y(i)+1\text{                         Zero Response}
y\left( i\right) =& y\left( i\right) +\left| y_{\min }\right|\times 1.1 & \text{Negative Response} \  
\end{align}\,\!</math>
y\left( i\right) =& y\left( i\right) +1 & \text{Zero Response}
\end{array}\,\!</math>




Here <math>{{y}_{\min }}\,\!</math> represents the minimum response value and <math>\left| {{y}_{\min }} \right|\,\!</math> represents the absolute value of the minimum response.  
Here <math>{{y}_{\min }}\,\!</math> represents the minimum response value and <math>\left| {{y}_{\min }} \right|\,\!</math> represents the absolute value of the minimum response.  


====Example====
====Example====


To illustrate the Box-Cox method, consider the experiment given in the first table. Transformed response values for various values of <math>\lambda \,\!</math> can be calculated using the equation for <math>{Y}^{\lambda}\,\!</math> given in [[ANOVA_for_Designed_Experiments#Box-Cox_Method|Box-Cox Method]]. Knowing the hat matrix, <math>H\,\!</math>, <math>S{{S}_{E}}\,\!</math> values corresponding to each of these <math>\lambda \,\!</math> values can easily be obtained using <math>{{y}^{\lambda \prime }}[I-H]{{y}^{\lambda }}\,\!</math>.  <math>S{{S}_{E}}\,\!</math> values calculated for <math>\lambda \,\!</math> values between <math>-5\,\!</math> and <math>5\,\!</math> for the given data are shown below:


To illustrate the Box-Cox method, consider the experiment given in the first table. Transformed response values for various values of <math>\lambda \,\!</math> can be calculated using the equation for <math>{Y}^{\lambda}\,\!</math> given in [[ANOVA_for_Designed_Experiments#Box-Cox_Method|Box-Cox Method]]. Knowing the hat matrix, <math>H\,\!</math>, <math>S{{S}_{E}}\,\!</math> values corresponding to each of these <math>\lambda \,\!</math> values can easily be obtained using <math>{{y}^{\lambda \prime }}[I-H]{{y}^{\lambda }}\,\!</math>.  <math>S{{S}_{E}}\,\!</math> values calculated for <math>\lambda \,\!</math> values between <math>-5\,\!</math> and <math>5\,\!</math> for the given data are shown below:


<center><math>\begin{matrix}
<center><math>\begin{matrix}
Line 570: Line 632:


A plot of <math>\ln S{{S}_{E}}\,\!</math> for various <math>\lambda \,\!</math> values, as obtained from DOE++, is shown in the following figure. The value of <math>\lambda \,\!</math> that gives the minimum <math>S{{S}_{E}}\,\!</math> is identified as 0.7841. The <math>S{{S}_{E}}\,\!</math> value corresponding to this value of <math>\lambda \,\!</math> is 73.74. A 90% confidence interval on this <math>\lambda \,\!</math> value is calculated as follows. <math>S{{S}^{*}}\,\!</math> can be obtained as shown next:
A plot of <math>\ln S{{S}_{E}}\,\!</math> for various <math>\lambda \,\!</math> values, as obtained from DOE++, is shown in the following figure. The value of <math>\lambda \,\!</math> that gives the minimum <math>S{{S}_{E}}\,\!</math> is identified as 0.7841. The <math>S{{S}_{E}}\,\!</math> value corresponding to this value of <math>\lambda \,\!</math> is 73.74. A 90% confidence interval on this <math>\lambda \,\!</math> value is calculated as follows. <math>S{{S}^{*}}\,\!</math> can be obtained as shown next:


::<math>\begin{align}
::<math>\begin{align}
Line 577: Line 640:
= & 101.27   
= & 101.27   
\end{align}\,\!</math>
\end{align}\,\!</math>


Therefore, <math>\ln S{{S}^{*}}=4.6178\,\!</math>. The <math>\lambda \,\!</math> values corresponding to this value from the following figure are <math>-0.4686\,\!</math> and <math>2.0052\,\!</math>. Therefore, the 90% confidence limits on are <math>-0.4689\,\!</math> and <math>2.0055\,\!</math>. Since the confidence limits include the value of 1, this indicates that a transformation is not required for the data in the first table.
Therefore, <math>\ln S{{S}^{*}}=4.6178\,\!</math>. The <math>\lambda \,\!</math> values corresponding to this value from the following figure are <math>-0.4686\,\!</math> and <math>2.0052\,\!</math>. Therefore, the 90% confidence limits on are <math>-0.4689\,\!</math> and <math>2.0055\,\!</math>. Since the confidence limits include the value of 1, this indicates that a transformation is not required for the data in the first table.
Line 591: Line 655:


[[Image:doet6.3.png|thumb|center|400px|Two-factor factorial experiment.]]
[[Image:doet6.3.png|thumb|center|400px|Two-factor factorial experiment.]]
<br>
 


[[Image:doe6.8.png|thumb|center|400px|Interaction plot for the data in the third table.]]
[[Image:doe6.8.png|thumb|center|400px|Interaction plot for the data in the third table.]]
Line 599: Line 663:


The effect of factor <math>A\,\!</math> on the response can be obtained by taking the difference between the average response when <math>A\,\!</math> is high and the average response when <math>A\,\!</math> 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 <math>A\,\!</math> as per the response values in the third table is:
The effect of factor <math>A\,\!</math> on the response can be obtained by taking the difference between the average response when <math>A\,\!</math> is high and the average response when <math>A\,\!</math> 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 <math>A\,\!</math> as per the response values in the third table is:


::<math>\begin{align}
::<math>\begin{align}
Line 609: Line 674:


Therefore, when <math>A\,\!</math> 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 <math>A\,\!</math> at different levels of <math>B\,\!</math> is shown in the figure above. The plot shows that change in the level of <math>A\,\!</math> leads to an increase in the response by 20 units regardless of the level of <math>B\,\!</math>. Therefore, no interaction exists in this case as indicated by the parallel lines on the plot. The main effect of <math>B\,\!</math> can be obtained as:  
Therefore, when <math>A\,\!</math> 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 <math>A\,\!</math> at different levels of <math>B\,\!</math> is shown in the figure above. The plot shows that change in the level of <math>A\,\!</math> leads to an increase in the response by 20 units regardless of the level of <math>B\,\!</math>. Therefore, no interaction exists in this case as indicated by the parallel lines on the plot. The main effect of <math>B\,\!</math> can be obtained as:  


::<math>\begin{align}
::<math>\begin{align}
Line 616: Line 682:
= & 10   
= & 10   
\end{align}\,\!</math>
\end{align}\,\!</math>


===Investigating Interactions===
===Investigating Interactions===
Line 621: Line 688:


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 <math>A\,\!</math> in this case is:
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 <math>A\,\!</math> in this case is:


::<math>\begin{align}
::<math>\begin{align}
Line 629: Line 697:




[[Image:doet6.4.png|thumb|center|400px|Two-factor factorial experiment.]]
[[Image:doet6.4.png|thumb|center|400px|Two factor factorial experiment.]]
   
   


Line 650: Line 718:
==Analysis of General Factorial Experiments==
==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). The other designs (such as the 2 level full factorial designs that are explained in [[Two_Level_Factorial_Experiments| 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, <math>A\,\!</math> and <math>B\,\!</math>, on the response is being investigated. Let there be <math>{{n}_{a}}\,\!</math> levels of factor <math>A\,\!</math> and <math>{{n}_{b}}\,\!</math> levels of factor <math>B\,\!</math>. The ANOVA model for this experiment can be stated as:
In DOE++, factorial experiments are referred to as ''factorial designs''. The experiments explained in this section are referred to as g''eneral factorial designs''. This is done to distinguish these experiments from the other factorial designs supported by DOE++ (see the figure below).  


::<math>{{Y}_{ijk}}=\mu +{{\tau }_{i}}+{{\delta }_{j}}+{{(\tau \delta )}_{ij}}+{{\epsilon }_{ijk}}\,\!</math>
 
[[Image:doe6.10.png|thumb|center|518px|Factorial experiments available in DOE++.]]
 
 
The other designs (such as the two level full factorial designs that are explained in [[Two_Level_Factorial_Experiments| 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, <math>A\,\!</math> and <math>B\,\!</math>, on the response is being investigated. Let there be <math>{{n}_{a}}\,\!</math> levels of factor <math>A\,\!</math> and <math>{{n}_{b}}\,\!</math> levels of factor <math>B\,\!</math>. The ANOVA model for this experiment can be stated as:
 
 
::<math>{{Y}_{ijk}}=\mu +{{\tau }_{i}}+{{\delta }_{j}}+{{(\tau \delta )}_{ij}}+{{\epsilon }_{ijk}}\,\!</math>




where:
where:
<br>
:• <math>\mu \,\!</math> represents the overall mean effect
:• <math>{{\tau }_{i}}\,\!</math> is the effect of the <math>i\,\!</math>th level of factor <math>A\,\!</math> (<math>i=1,2,...,{{n}_{a}}\,\!</math>)
:• <math>{{\delta }_{j}}\,\!</math> is the effect of the <math>j\,\!</math>th level of factor <math>B\,\!</math> (<math>j=1,2,...,{{n}_{b}}\,\!</math>)
:• <math>{{(\tau \delta )}_{ij}}\,\!</math> represents the interaction effect between <math>A\,\!</math> and <math>B\,\!</math>
:• <math>{{\epsilon }_{ijk}}\,\!</math> represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of <math>{{\sigma }^{2}}\,\!</math>)
:• and the subscript <math>k\,\!</math> denotes the <math>m\,\!</math> replicates (<math>k=1,2,...,m\,\!</math>)


<br>
 
*<math>\mu \,\!</math> represents the overall mean effect
*<math>{{\tau }_{i}}\,\!</math> is the effect of the <math>i\,\!</math>th level of factor <math>A\,\!</math> (<math>i=1,2,...,{{n}_{a}}\,\!</math>)
*<math>{{\delta }_{j}}\,\!</math> is the effect of the <math>j\,\!</math>th level of factor <math>B\,\!</math> (<math>j=1,2,...,{{n}_{b}}\,\!</math>)
*<math>{{(\tau \delta )}_{ij}}\,\!</math> represents the interaction effect between <math>A\,\!</math> and <math>B\,\!</math>
*<math>{{\epsilon }_{ijk}}\,\!</math> represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of <math>{{\sigma }^{2}}\,\!</math>)
*and the subscript <math>k\,\!</math> denotes the <math>m\,\!</math> replicates (<math>k=1,2,...,m\,\!</math>)
 
 
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:  


::<math>\underset{i=1}{\overset{{{n}_{a}}}{\mathop \sum }}\,{{\tau }_{i}}=0\,\!</math>
::<math>\underset{i=1}{\overset{{{n}_{a}}}{\mathop \sum }}\,{{\tau }_{i}}=0\,\!</math>




[[Image:doe6.10.png|thumb|center|400px|Factorial experiments available in DOE++.]]
::<math>\underset{j=1}{\overset{{{n}_{b}}}{\mathop \sum }}\,{{\delta }_{j}}=0\,\!</math>
 
 
::<math>\underset{i=1}{\overset{{{n}_{a}}}{\mathop \sum }}\,{{(\tau \delta )}_{ij}}=0\,\!</math>
 


::<math>\begin{align}
::<math>\underset{j=1}{\overset{{{n}_{b}}}{\mathop \sum }}\,{{(\tau \delta )}_{ij}}=0\,\!</math>
\underset{j=1}{\overset{{{n}_{b}}}{\mathop \sum }}\,{{\delta }_{j}}= & 0 \
\underset{i=1}{\overset{{{n}_{a}}}{\mathop \sum }}\,{{(\tau \delta )}_{ij}}= & 0 \
\underset{j=1}{\overset{{{n}_{b}}}{\mathop \sum }}\,{{(\tau \delta )}_{ij}}= & 0
\end{align}\,\!</math>




===Hypothesis Tests in General Factorial Experiments===
===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, <math>A\,\!</math> and <math>B\,\!</math>, and their interaction, <math>AB\,\!</math>, the statements for the hypothesis tests can be formulated as follows:
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, <math>A\,\!</math> and <math>B\,\!</math>, and their interaction, <math>AB\,\!</math>, the statements for the hypothesis tests can be formulated as follows:


::<math>\begin{align}
::<math>\begin{align}
   & \begin{matrix}
   & \begin{matrix}
   1. & {}  \
   1. & {}  \
\end{matrix}{{H}_{0}}: & {{\tau }_{1}}={{\tau }_{2}}=...={{\tau }_{{{n}_{a}}}}=0\text{    (Main effect of }A\text{ is absent)} \  
\end{matrix}{{H}_{0}}:{{\tau }_{1}}={{\tau }_{2}}=...={{\tau }_{{{n}_{a}}}}=0\text{    (Main effect of }A\text{ is absent)} \  
  & \begin{matrix}
  & \begin{matrix}
   {} & {}  \
   {} & {}  \
\end{matrix}{{H}_{1}}: & {{\tau }_{i}}\ne 0\text{    for at least one }i \  
\end{matrix}{{H}_{1}}:{{\tau }_{i}}\ne 0\text{    for at least one }i \  
  & \begin{matrix}
  & \begin{matrix}
   2. & {}  \
   2. & {}  \
\end{matrix}{{H}_{0}}: & {{\delta }_{1}}={{\delta }_{2}}=...={{\delta }_{{{n}_{b}}}}=0\text{    (Main effect of }B\text{ is absent)} \  
\end{matrix}{{H}_{0}}:{{\delta }_{1}}={{\delta }_{2}}=...={{\delta }_{{{n}_{b}}}}=0\text{    (Main effect of }B\text{ is absent)} \  
  & \begin{matrix}
  & \begin{matrix}
   {} & {}  \
   {} & {}  \
\end{matrix}{{H}_{1}}: & {{\delta }_{j}}\ne 0\text{    for at least one }j \  
\end{matrix}{{H}_{1}}:{{\delta }_{j}}\ne 0\text{    for at least one }j \  
  & \begin{matrix}
  & \begin{matrix}
   3. & {}  \
   3. & {}  \
\end{matrix}{{H}_{0}}: & {{(\tau \delta )}_{11}}={{(\tau \delta )}_{12}}=...={{(\tau \delta )}_{{{n}_{a}}{{n}_{b}}}}=0\text{    (Interaction }AB\text{ is absent)} \  
\end{matrix}{{H}_{0}}:{{(\tau \delta )}_{11}}={{(\tau \delta )}_{12}}=...={{(\tau \delta )}_{{{n}_{a}}{{n}_{b}}}}=0\text{    (Interaction }AB\text{ is absent)} \  
  & \begin{matrix}
  & \begin{matrix}
   {} & {}  \
   {} & {}  \
\end{matrix}{{H}_{1}}: & {{(\tau \delta )}_{ij}}\ne 0\text{    for at least one }ij   
\end{matrix}{{H}_{1}}:{{(\tau \delta )}_{ij}}\ne 0\text{    for at least one }ij   
\end{align}\,\!</math>
\end{align}\,\!</math>




The test statistics for the three tests are as follows:
The test statistics for the three tests are as follows:


::1)<math>{(F_{0})}_{A} = \frac{MS_{A}}{MS_{E}}\,\!</math><br>
::1)<math>{(F_{0})}_{A} = \frac{MS_{A}}{MS_{E}}\,\!</math><br>
Line 717: Line 796:


The tests are identical to the partial <math>F\,\!</math> test explained in [[Multiple_Linear_Regression_Analysis| 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:
The tests are identical to the partial <math>F\,\!</math> test explained in [[Multiple_Linear_Regression_Analysis| 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:


::<math>S{{S}_{TR}}=S{{S}_{A}}+S{{S}_{B}}+S{{S}_{AB}}\,\!</math>
::<math>S{{S}_{TR}}=S{{S}_{A}}+S{{S}_{B}}+S{{S}_{AB}}\,\!</math>
Line 722: Line 802:


where <math>S{{S}_{TR}}\,\!</math> represents the model sum of squares, <math>S{{S}_{A}}\,\!</math> represents the sequential sum of squares due to factor <math>A\,\!</math>, <math>S{{S}_{B}}\,\!</math> represents the sequential sum of squares due to factor    and <math>S{{S}_{AB}}\,\!</math> represents the sequential sum of squares due to the interaction <math>AB\,\!</math>.
where <math>S{{S}_{TR}}\,\!</math> represents the model sum of squares, <math>S{{S}_{A}}\,\!</math> represents the sequential sum of squares due to factor <math>A\,\!</math>, <math>S{{S}_{B}}\,\!</math> represents the sequential sum of squares due to factor    and <math>S{{S}_{AB}}\,\!</math> represents the sequential sum of squares due to the interaction <math>AB\,\!</math>.
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 <math>A\,\!</math> (or the hypothesis <math>{{H}_{0}}\ \ :\ \ {{\tau }_{i}}=0\,\!</math>) can then be obtained as:
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 <math>A\,\!</math> (or the hypothesis <math>{{H}_{0}}:{{\tau }_{i}}=0\,\!</math>) can then be obtained as:
 


::<math>\begin{align}
::<math>\begin{align}
Line 731: Line 812:


Similarly the test statistic to test significance of factor <math>B\,\!</math> and the interaction <math>AB\,\!</math> can be respectively obtained as:
Similarly the test statistic to test significance of factor <math>B\,\!</math> and the interaction <math>AB\,\!</math> can be respectively obtained as:


::<math>\begin{align}
::<math>\begin{align}
Line 757: Line 839:
   & \begin{matrix}
   & \begin{matrix}
   1. & {}  \
   1. & {}  \
\end{matrix}{{H}_{0}}: & {{\tau }_{1}}={{\tau }_{2}}={{\tau }_{3}}=0\text{  (No main effect of factor }A\text{, speed)} \  
\end{matrix}{{H}_{0}}:{{\tau }_{1}}={{\tau }_{2}}={{\tau }_{3}}=0\text{  (No main effect of factor }A\text{, speed)} \  
  & \begin{matrix}
  & \begin{matrix}
   {} & {}  \
   {} & {}  \
\end{matrix}{{H}_{1}}: & {{\tau }_{i}}\ne 0\text{    for at least one }i \  
\end{matrix}{{H}_{1}}:{{\tau }_{i}}\ne 0\text{    for at least one }i \  
  & \begin{matrix}
  & \begin{matrix}
   2. & {}  \
   2. & {}  \
\end{matrix}{{H}_{0}}: & {{\delta }_{1}}={{\delta }_{2}}={{\delta }_{3}}=0\text{    (No main effect of factor }B\text{, fuel additive)} \  
\end{matrix}{{H}_{0}}:{{\delta }_{1}}={{\delta }_{2}}={{\delta }_{3}}=0\text{    (No main effect of factor }B\text{, fuel additive)} \  
  & \begin{matrix}
  & \begin{matrix}
   {} & {}  \
   {} & {}  \
\end{matrix}{{H}_{1}}: & {{\delta }_{j}}\ne 0\text{    for at least one }j \  
\end{matrix}{{H}_{1}}:{{\delta }_{j}}\ne 0\text{    for at least one }j \  
  & \begin{matrix}
  & \begin{matrix}
   3. & {}  \
   3. & {}  \
\end{matrix}{{H}_{0}}: & {{(\tau \delta )}_{11}}={{(\tau \delta )}_{12}}=...={{(\tau \delta )}_{33}}=0\text{    (No interaction }AB\text{)} \  
\end{matrix}{{H}_{0}}:{{(\tau \delta )}_{11}}={{(\tau \delta )}_{12}}=...={{(\tau \delta )}_{33}}=0\text{    (No interaction }AB\text{)} \  
  & \begin{matrix}
  & \begin{matrix}
   {} & {}  \
   {} & {}  \
\end{matrix}{{H}_{1}}: & {{(\tau \delta )}_{ij}}\ne 0\text{    for at least one }ij   
\end{matrix}{{H}_{1}}:{{(\tau \delta )}_{ij}}\ne 0\text{    for at least one }ij   
\end{align}\,\!</math>
\end{align}\,\!</math>


The test statistics for the three tests are:
The test statistics for the three tests are:


::1.<math>{{({{F}_{0}})}_{A}}=\frac{M{{S}_{A}}}{M{{S}_{E}}}\,\!</math><br>
::1.<math>{{({{F}_{0}})}_{A}}=\frac{M{{S}_{A}}}{M{{S}_{E}}}\,\!</math><br>
:::where <math>M{{S}_{A}}\,\!</math> is the mean square for factor <math>A\,\!</math> and <math>M{{S}_{E}}\,\!</math> is the error mean square  
:::where <math>M{{S}_{A}}\,\!</math> is the mean square for factor <math>A\,\!</math> and <math>M{{S}_{E}}\,\!</math> is the error mean square  


::2.<math>{{({{F}_{0}})}_{B}}=\frac{M{{S}_{B}}}{M{{S}_{E}}}\,\!</math>  
::2.<math>{{({{F}_{0}})}_{B}}=\frac{M{{S}_{B}}}{M{{S}_{E}}}\,\!</math>  
:::where <math>M{{S}_{B}}\,\!</math> is the mean square for factor <math>B\,\!</math> and <math>M{{S}_{E}}\,\!</math> is the error mean square
:::where <math>M{{S}_{B}}\,\!</math> is the mean square for factor <math>B\,\!</math> and <math>M{{S}_{E}}\,\!</math> is the error mean square


::3.<math>{{({{F}_{0}})}_{AB}}=\frac{M{{S}_{AB}}}{M{{S}_{E}}}\,\!</math>   
::3.<math>{{({{F}_{0}})}_{AB}}=\frac{M{{S}_{AB}}}{M{{S}_{E}}}\,\!</math>   
Line 787: Line 873:




[[Image:doe6.11.png|thumb|center|639px|Experimental design for the data in the fifth table.]]


[[Image:doe6.11.png|thumb|center|400px|Experimental design for the data in the fifth table.]]


The ANOVA model for this experiment can be written as:
The ANOVA model for this experiment can be written as:


::<math>{{Y}_{ijk}}=\mu +{{\tau }_{i}}+{{\delta }_{j}}+{{(\tau \delta )}_{ij}}+{{\epsilon }_{ijk}}\,\!</math>
::<math>{{Y}_{ijk}}=\mu +{{\tau }_{i}}+{{\delta }_{j}}+{{(\tau \delta )}_{ij}}+{{\epsilon }_{ijk}}\,\!</math>


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.
Line 800: Line 888:
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.
Constraints on <math>{{\tau }_{i}}\,\!</math> are:
Constraints on <math>{{\tau }_{i}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 807: Line 896:




Therefore, only two of the <math>{{\tau }_{i}}\,\!</math> effects are independent. Assuming that <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math> are independent, <math>{{\tau }_{3}}=-({{\tau }_{1}}+{{\tau }_{2}})\,\!</math>. (The null hypothesis to test the significance of factor <math>A\,\!</math> can be rewritten using only the independent effects as <math>{{H}_{0}}\ \ :\ \ {{\tau }_{1}}={{\tau }_{2}}=0\,\!</math>.) DOE++ displays only the independent effects because only these effects are important to the analysis. The independent effects, <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math>, are displayed as A[1] and A[2] respectively because these are the effects associated with factor <math>A\,\!</math> (speed).
Therefore, only two of the <math>{{\tau }_{i}}\,\!</math> effects are independent. Assuming that <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math> are independent, <math>{{\tau }_{3}}=-({{\tau }_{1}}+{{\tau }_{2}})\,\!</math>. (The null hypothesis to test the significance of factor <math>A\,\!</math> can be rewritten using only the independent effects as <math>{{H}_{0}}:{{\tau }_{1}}={{\tau }_{2}}=0\,\!</math>.) DOE++ displays only the independent effects because only these effects are important to the analysis. The independent effects, <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math>, are displayed as A[1] and A[2] respectively because these are the effects associated with factor <math>A\,\!</math> (speed).
Constraints on <math>{{\delta }_{j}}\,\!</math> are:
Constraints on <math>{{\delta }_{j}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 816: Line 906:




Therefore, only one of the <math>{{\delta }_{j}}\,\!</math> effects are independent. Assuming that <math>{{\delta }_{1}}\,\!</math> is independent, <math>{{\delta }_{2}}=-{{\delta }_{1}}\,\!</math>. (The null hypothesis to test the significance of factor <math>B\,\!</math> can be rewritten using only the independent effect as <math>{{H}_{0}}\ \ :\ \ {{\delta }_{1}}=0\,\!</math>.) The independent effect <math>{{\delta }_{1}}\,\!</math> is displayed as B:B in DOE++.
Therefore, only one of the <math>{{\delta }_{j}}\,\!</math> effects are independent. Assuming that <math>{{\delta }_{1}}\,\!</math> is independent, <math>{{\delta }_{2}}=-{{\delta }_{1}}\,\!</math>. (The null hypothesis to test the significance of factor <math>B\,\!</math> can be rewritten using only the independent effect as <math>{{H}_{0}}:{{\delta }_{1}}=0\,\!</math>.) The independent effect <math>{{\delta }_{1}}\,\!</math> is displayed as B:B in DOE++.
Constraints on <math>{{(\tau \delta )}_{ij}}\,\!</math> are:
Constraints on <math>{{(\tau \delta )}_{ij}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 830: Line 921:




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 <math>{{(\tau \delta )}_{ij}}\,\!</math> effects are independent. Assuming that <math>{{(\tau \delta )}_{11}}\,\!</math> and <math>{{(\tau \delta )}_{21}}\,\!</math> are independent, the other four effects can be expressed in terms of these effects. (The null hypothesis to test the significance of interaction <math>AB\,\!</math> can be rewritten using only the independent effects as <math>{{H}_{0}}\ \ :{{(\tau \delta )}_{11}}={{(\tau \delta )}_{21}}=0\,\!</math>.) The effects <math>{{(\tau \delta )}_{11}}\,\!</math> and <math>{{(\tau \delta )}_{21}}\,\!</math> are displayed as A[1]B and A[2]B respectively in DOE++.
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 <math>{{(\tau \delta )}_{ij}}\,\!</math> effects are independent. Assuming that <math>{{(\tau \delta )}_{11}}\,\!</math> and <math>{{(\tau \delta )}_{21}}\,\!</math> are independent, the other four effects can be expressed in terms of these effects. (The null hypothesis to test the significance of interaction <math>AB\,\!</math> can be rewritten using only the independent effects as <math>{{H}_{0}}:{{(\tau \delta )}_{11}}={{(\tau \delta )}_{21}}=0\,\!</math>.) The effects <math>{{(\tau \delta )}_{11}}\,\!</math> and <math>{{(\tau \delta )}_{21}}\,\!</math> 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 [[ANOVA_for_Designed_Experiments#Fitting_ANOVA_Models|Fitting ANOVA Models]]. Since factor <math>A\,\!</math> has three levels, two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, are required which need to be coded as shown next:
The regression version of the ANOVA model can be obtained using indicator variables, similar to the case of the single factor experiment in [[ANOVA_for_Designed_Experiments#Fitting_ANOVA_Models|Fitting ANOVA Models]]. Since factor <math>A\,\!</math> has three levels, two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, are required which need to be coded as shown next:


::<math>\begin{align}
::<math>\begin{align}
Line 843: Line 935:
Factor <math>B\,\!</math> has two levels and can be represented using one indicator variable, <math>{{x}_{3}}\,\!</math>, as follows:
Factor <math>B\,\!</math> has two levels and can be represented using one indicator variable, <math>{{x}_{3}}\,\!</math>, as follows:


<br>
 
::<math>\begin{align}
::<math>\begin{align}
\text{Treatment Effect }{{\delta }_{1}}: & {{x}_{3}}=1 \  
\text{Treatment Effect }{{\delta }_{1}}: & {{x}_{3}}=1 \  
Line 851: Line 943:


The <math>AB\,\!</math> interaction will be represented by all possible terms resulting from the product of the indicator variables representing factors <math>A\,\!</math> and <math>B\,\!</math>. There are two such terms here - <math>{{x}_{1}}{{x}_{3}}\,\!</math> and <math>{{x}_{2}}{{x}_{3}}\,\!</math>. The regression version of the ANOVA model can finally be obtained as:
The <math>AB\,\!</math> interaction will be represented by all possible terms resulting from the product of the indicator variables representing factors <math>A\,\!</math> and <math>B\,\!</math>. There are two such terms here - <math>{{x}_{1}}{{x}_{3}}\,\!</math> and <math>{{x}_{2}}{{x}_{3}}\,\!</math>. The regression version of the ANOVA model can finally be obtained as:


::<math>Y=\mu +{{\tau }_{1}}\cdot {{x}_{1}}+{{\tau }_{2}}\cdot {{x}_{2}}+{{\delta }_{1}}\cdot {{x}_{3}}+{{(\tau \delta )}_{11}}\cdot {{x}_{1}}{{x}_{3}}+{{(\tau \delta )}_{21}}\cdot {{x}_{2}}{{x}_{3}}+\epsilon \,\!</math>
::<math>Y=\mu +{{\tau }_{1}}\cdot {{x}_{1}}+{{\tau }_{2}}\cdot {{x}_{2}}+{{\delta }_{1}}\cdot {{x}_{3}}+{{(\tau \delta )}_{11}}\cdot {{x}_{1}}{{x}_{3}}+{{(\tau \delta )}_{21}}\cdot {{x}_{2}}{{x}_{3}}+\epsilon \,\!</math>
Line 856: Line 949:


In matrix notation this model can be expressed as:
In matrix notation this model can be expressed as:


::<math>y=X\beta +\epsilon \,\!</math>
::<math>y=X\beta +\epsilon \,\!</math>


:where:
:where:


::<math>y=\left[ \begin{matrix}
::<math>y=\left[ \begin{matrix}
Line 942: Line 1,038:


The model sum of squares, <math>S{{S}_{TR}}\,\!</math>, for the regression version of the ANOVA model can be obtained as:
The model sum of squares, <math>S{{S}_{TR}}\,\!</math>, for the regression version of the ANOVA model can be obtained as:


::<math>\begin{align}
::<math>\begin{align}
Line 953: Line 1,050:


The total sum of squares, <math>S{{S}_{T}}\,\!</math>, can be calculated as:
The total sum of squares, <math>S{{S}_{T}}\,\!</math>, can be calculated as:


::<math>\begin{align}
::<math>\begin{align}
Line 962: Line 1,060:


Since there are 18 observed response values, the number of degrees of freedom associated with the total sum of squares is 17 (<math>dof(S{{S}_{T}})=17\,\!</math>). The error sum of squares can now be obtained:
Since there are 18 observed response values, the number of degrees of freedom associated with the total sum of squares is 17 (<math>dof(S{{S}_{T}})=17\,\!</math>). The error sum of squares can now be obtained:


::<math>\begin{align}
::<math>\begin{align}
Line 971: Line 1,070:


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:
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:


::<math>\begin{align}
::<math>\begin{align}
Line 982: Line 1,082:


The sequential sum of squares for factor <math>A\,\!</math> can be calculated as:  
The sequential sum of squares for factor <math>A\,\!</math> can be calculated as:  


::<math>\begin{align}
::<math>\begin{align}
Line 990: Line 1,091:


where <math>{{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}={{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}{{(X_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}^{\prime }{{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}})}^{-1}}X_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}^{\prime }\,\!</math> and <math>{{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}\,\!</math> is the matrix containing only the first three columns of the <math>X\,\!</math> matrix. Thus:
where <math>{{H}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}={{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}{{(X_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}^{\prime }{{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}})}^{-1}}X_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}^{\prime }\,\!</math> and <math>{{X}_{\mu ,{{\tau }_{1}},{{\tau }_{2}}}}\,\!</math> is the matrix containing only the first three columns of the <math>X\,\!</math> matrix. Thus:


::<math>\begin{align}
::<math>\begin{align}
Line 1,001: Line 1,103:


Similarly, the sum of squares for factor <math>B\,\!</math> can be calculated as:
Similarly, the sum of squares for factor <math>B\,\!</math> can be calculated as:


::<math>\begin{align}
::<math>\begin{align}
Line 1,013: Line 1,116:


The sum of squares for the interaction <math>AB\,\!</math> is:
The sum of squares for the interaction <math>AB\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,027: Line 1,131:


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 <math>AB\,\!</math> is:
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 <math>AB\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,036: Line 1,141:


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


::<math>\begin{align}
::<math>\begin{align}
Line 1,043: Line 1,149:
\end{align}\,\!</math>
\end{align}\,\!</math>


Assuming that the desired significance level is 0.1, since <math>p\,\!</math> value > 0.1, we fail to reject <math>{{H}_{0}}\ \ :{{(\tau \delta )}_{ij}}=0\,\!</math> 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.
 
Assuming that the desired significance level is 0.1, since <math>p\,\!</math> value > 0.1, we fail to reject <math>{{H}_{0}}:{{(\tau \delta )}_{ij}}=0\,\!</math> 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 <math>A\,\!</math> is:
The test statistic for factor <math>A\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,058: Line 1,166:


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


::<math>\begin{align}
::<math>\begin{align}
Line 1,066: Line 1,175:




Since <math>p\,\!</math> value < 0.1, <math>{{H}_{0}}\ \ :\ \ {{\tau }_{i}}=0\,\!</math> is rejected and it is concluded that factor <math>A\,\!</math> (or speed) has a significant effect on the mileage.
Since <math>p\,\!</math> value < 0.1, <math>{{H}_{0}}:{{\tau }_{i}}=0\,\!</math> is rejected and it is concluded that factor <math>A\,\!</math> (or speed) has a significant effect on the mileage.


The test statistic for factor <math>B\,\!</math> is:
The test statistic for factor <math>B\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,078: Line 1,188:


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


::<math>\begin{align}
::<math>\begin{align}
Line 1,086: Line 1,197:




Since <math>p\,\!</math> value < 0.1, <math>{{H}_{0}}\ \ :\ \ {{\delta }_{j}}=0\,\!</math> is rejected and it is concluded that factor <math>B\,\!</math> (or fuel additive type) has a significant effect on the mileage.
Since <math>p\,\!</math> value < 0.1, <math>{{H}_{0}}:{{\delta }_{j}}=0\,\!</math> is rejected and it is concluded that factor <math>B\,\!</math> (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.  
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.  
[[Image:doe6.12.png|thumb|center|645px|Analysis results for the experiment in the fifth table.]]


====Calculation of Effect Coefficients====
====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:
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:


::<math>\begin{align}
::<math>\begin{align}
Line 1,105: Line 1,221:
\end{align}\,\!</math>
\end{align}\,\!</math>


[[Image:doe6.12.png|thumb|center|400px|Analysis results for the experiment in the fifth table.]]


Therefore, <math>\hat{\mu }=18.2889\,\!</math>, <math>{{\hat{\tau }}_{1}}=-0.2056\,\!</math>, <math>{{\hat{\tau }}_{2}}=0.6944\,\!</math> 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 <math>C\,\!</math>.


Therefore, <math>\hat{\mu }=18.2889\,\!</math>, <math>{{\hat{\tau }}_{1}}=-0.2056\,\!</math>, <math>{{\hat{\tau }}_{2}}=0.6944\,\!</math> 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 <math>C\,\!</math>.


::<math>\begin{align}
::<math>\begin{align}
Line 1,125: Line 1,240:


For example, the standard error for <math>{{\hat{\tau }}_{1}}\,\!</math> is:
For example, the standard error for <math>{{\hat{\tau }}_{1}}\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,134: Line 1,250:


Then the <math>t\,\!</math> statistic for <math>{{\hat{\tau }}_{1}}\,\!</math> can be obtained as:
Then the <math>t\,\!</math> statistic for <math>{{\hat{\tau }}_{1}}\,\!</math> can be obtained as:


::<math>\begin{align}
::<math>\begin{align}
Line 1,146: Line 1,263:


Confidence intervals on <math>{{\tau }_{1}}\,\!</math> can also be calculated. The 90% limits on <math>{{\tau }_{1}}\,\!</math> are:
Confidence intervals on <math>{{\tau }_{1}}\,\!</math> can also be calculated. The 90% limits on <math>{{\tau }_{1}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 1,170: Line 1,288:
==Blocking==
==Blocking==


Many times a factorial experiment requires so many runs that all of them cannot be completed under homogeneous conditions. This may lead to inclusion of the effects of nuisance factors into the investigation. Nuisance factors are factors that have an effect on the response but are not of primary interest to the investigator. For example two replicates of a two-factor factorial experiment require eight runs. If four runs require the duration of one day to be completed then the total experiment will require two days to be completed. The difference in the conditions on the two days may lead to introduction of effects on the response that are not the result of the two factors being investigated. Therefore, the day is a nuisance factor for this experiment.
Many times a factorial experiment requires so many runs that not all of them can be completed under homogeneous conditions. This may lead to inclusion of the effects of ''nuisance factors'' into the investigation. Nuisance factors are factors that have an effect on the response but are not of primary interest to the investigator. For example, two replicates of a two factor factorial experiment require eight runs. If four runs require the duration of one day to be completed, then the total experiment will require two days to be completed. The difference in the conditions on the two days may introduce effects on the response that are not the result of the two factors being investigated. Therefore, the day is a nuisance factor for this experiment.
Nuisance factors can be accounted for using blocking. In blocking, experimental runs are separated based on levels of the nuisance factor. For the case of the two-factor factorial experiment where the day is a nuisance factor, separation can be made into two groups or blocks -runs that are carried out on the first day belong to block 1, and runs that are carried out on the second day belong to block 2. Thus, within each block conditions are the same with respect to the nuisance factor. As a result, each block investigates the effects of the factors of interest, while the difference in the blocks measures the effect of the nuisance factor.  
Nuisance factors can be accounted for using ''blocking''. In blocking, experimental runs are separated based on levels of the nuisance factor. For the case of the two factor factorial experiment (where the day is a nuisance factor), separation can be made into two groups or ''blocks'': runs that are carried out on the first day belong to block 1, and runs that are carried out on the second day belong to block 2. Thus, within each block conditions are the same with respect to the nuisance factor. As a result, each block investigates the effects of the factors of interest, while the difference in the blocks measures the effect of the nuisance factor.  
For the example of the two factor factorial experiment, a possible assignment of runs to the blocks could be - one replicate of the experiment is assigned to block 1 and the second replicate is assigned to block 2 (now each block contains all possible treatment combinations). Within each block, runs are subjected to randomization (i.e., randomization is now restricted to the runs within a block). Such a design, where each block contains one complete replicate and the treatments within a block are subjected to randomization, is called randomized complete block design.
For the example of the two factor factorial experiment, a possible assignment of runs to the blocks could be as follows: one replicate of the experiment is assigned to block 1 and the second replicate is assigned to block 2 (now each block contains all possible treatment combinations). Within each block, runs are subjected to randomization (i.e., randomization is now restricted to the runs within a block). Such a design, where each block contains one complete replicate and the treatments within a block are subjected to randomization, is called ''randomized complete block design''.


In summary, blocking should always be used to account for the effects of nuisance factors if it is not possible to hold the nuisance factor at a constant level through all of the experimental runs. Randomization should be used within each block to counter the effects of any unknown variability that may still be present.
In summary, blocking should always be used to account for the effects of nuisance factors if it is not possible to hold the nuisance factor at a constant level through all of the experimental runs. Randomization should be used within each block to counter the effects of any unknown variability that may still be present.
Line 1,179: Line 1,297:
====Example====
====Example====


[[Image:doe6.13.png|thumb|center|400px|Randomized complete block design for the experiment in the fifth table using three blocks.]]
Consider the experiment of the fifth table where the mileage of a sports utility vehicle was investigated for the effects of speed and fuel additive type. Now assume that the three replicates for this experiment were carried out on three different vehicles. To ensure that the variation from one vehicle to another does not have an effect on the analysis, each vehicle is considered as one block. See the experiment design in the following figure.
 
 
[[Image:doe6.13.png|thumb|center|643px|Randomized complete block design for the experiment in the fifth table using three blocks.]]
 
 
For the purpose of the analysis, the block is considered as a main effect except that it is assumed that interactions between the block and the other main effects do not exist. Therefore, there is one block main effect (having three levels - block 1, block 2 and block 3), two main effects (speed -having three levels; and fuel additive type - having two levels) and one interaction effect (speed-fuel additive interaction) for this experiment. Let <math>{{\zeta }_{i}}\,\!</math> represent the block effects. The hypothesis test on the block main effect checks if there is a significant variation from one vehicle to the other. The statements for the hypothesis test are:


Consider the experiment of the fifth table where the mileage of a sports utility vehicle was investigated for the effects of speed and fuel additive type. Now assume that the three replicates for this experiment were carried out on three different vehicles. To ensure that the variation from one vehicle to another does not have an effect on the analysis, each vehicle is considered as one block. (See the experiment design in the following figure.)  For the purpose of the analysis, the block is considered as a main effect except that it is assumed that interactions between the block and the other main effects do not exist. Therefore, there is one block main effect (having three levels - block 1, block 2 and block 3), two main effects (speed -having three levels; and fuel additive type - having two levels) and one interaction effect (speed-fuel additive interaction) for this experiment. Let <math>{{\zeta }_{i}}\,\!</math> represent the block effects. The hypothesis test on the block main effect checks if there is a significant variation from one vehicle to the other. The statements for the hypothesis test are:


::<math>\begin{align}
::<math>\begin{align}
Line 1,190: Line 1,313:
   
   
The test statistic for this test is:
The test statistic for this test is:


::<math>{{F}_{0}}=\frac{M{{S}_{Block}}}{M{{S}_{E}}}\,\!</math>
::<math>{{F}_{0}}=\frac{M{{S}_{Block}}}{M{{S}_{E}}}\,\!</math>
Line 1,195: Line 1,319:


where <math>M{{S}_{Block}}\,\!</math> represents the mean square for the block main effect and <math>M{{S}_{E}}\,\!</math> is the error mean square. The hypothesis statements and test statistics to test the significance of factors <math>A\,\!</math> (speed), <math>B\,\!</math> (fuel additive) and the interaction <math>AB\,\!</math> (speed-fuel additive interaction) can be obtained as explained in the [[ANOVA_for_Designed_Experiments#Example_2| example]]. The ANOVA model for this example can be written as:
where <math>M{{S}_{Block}}\,\!</math> represents the mean square for the block main effect and <math>M{{S}_{E}}\,\!</math> is the error mean square. The hypothesis statements and test statistics to test the significance of factors <math>A\,\!</math> (speed), <math>B\,\!</math> (fuel additive) and the interaction <math>AB\,\!</math> (speed-fuel additive interaction) can be obtained as explained in the [[ANOVA_for_Designed_Experiments#Example_2| example]]. The ANOVA model for this example can be written as:


::<math>{{Y}_{ijk}}=\mu +{{\zeta }_{i}}+{{\tau }_{j}}+{{\delta }_{k}}+{{(\tau \delta )}_{jk}}+{{\epsilon }_{ijk}}\,\!</math>
::<math>{{Y}_{ijk}}=\mu +{{\zeta }_{i}}+{{\tau }_{j}}+{{\delta }_{k}}+{{(\tau \delta )}_{jk}}+{{\epsilon }_{ijk}}\,\!</math>


where:
where:
<br>
 
:• <math>\mu \,\!</math> represents the overall mean effect
 
:* <math>{{\zeta }_{i}}\,\!</math> is the effect of the <math>i\,\!</math>th level of the block (<math>i=1,2,3\,\!</math>)
*<math>\mu \,\!</math> represents the overall mean effect
:• <math>{{\tau }_{j}}\,\!</math> is the effect of the <math>j\,\!</math>th level of factor <math>A\,\!</math> (<math>j=1,2,3\,\!</math>)
*<math>{{\zeta }_{i}}\,\!</math> is the effect of the <math>i\,\!</math>th level of the block (<math>i=1,2,3\,\!</math>)
:• <math>{{\delta }_{k}}\,\!</math> is the effect of the <math>k\,\!</math>th level of factor <math>B\,\!</math> (<math>k=1,2\,\!</math>)
*<math>{{\tau }_{j}}\,\!</math> is the effect of the <math>j\,\!</math>th level of factor <math>A\,\!</math> (<math>j=1,2,3\,\!</math>)
:• <math>{{(\tau \delta )}_{jk}}\,\!</math> represents the interaction effect between <math>A\,\!</math> and <math>B\,\!</math>  
*<math>{{\delta }_{k}}\,\!</math> is the effect of the <math>k\,\!</math>th level of factor <math>B\,\!</math> (<math>k=1,2\,\!</math>)
:• and <math>{{\epsilon }_{ijk}}\,\!</math> represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of <math>{{\sigma }^{2}}\,\!</math>)
*<math>{{(\tau \delta )}_{jk}}\,\!</math> represents the interaction effect between <math>A\,\!</math> and <math>B\,\!</math>  
<br>
*and <math>{{\epsilon }_{ijk}}\,\!</math> represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of <math>{{\sigma }^{2}}\,\!</math>)
 
 
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.
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.
<br>


====Expression of the ANOVA Model as <math>y=X\beta +\epsilon \,\!</math>====
====Expression of the ANOVA Model as <math>y=X\beta +\epsilon \,\!</math>====
Line 1,215: Line 1,342:
<br>
<br>
Constraints on <math>{{\zeta }_{i}}\,\!</math> are:
Constraints on <math>{{\zeta }_{i}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 1,222: Line 1,350:




Therefore, only two of the <math>{{\zeta }_{i}}\,\!</math> effects are independent. Assuming that <math>{{\zeta }_{1}}\,\!</math> and <math>{{\zeta }_{2}}\,\!</math> are independent, <math>{{\zeta }_{3}}=-({{\zeta }_{1}}+{{\zeta }_{2}})\,\!</math>. (The null hypothesis to test the significance of the blocks can be rewritten using only the independent effects as <math>{{H}_{0}}\ \ :\ \ {{\zeta }_{1}}={{\zeta }_{2}}=0\,\!</math>.) In DOE++, the independent block effects, <math>{{\zeta }_{1}}\,\!</math> and <math>{{\zeta }_{2}}\,\!</math>, are displayed as Block[1] and Block[2], respectively.
Therefore, only two of the <math>{{\zeta }_{i}}\,\!</math> effects are independent. Assuming that <math>{{\zeta }_{1}}\,\!</math> and <math>{{\zeta }_{2}}\,\!</math> are independent, <math>{{\zeta }_{3}}=-({{\zeta }_{1}}+{{\zeta }_{2}})\,\!</math>. (The null hypothesis to test the significance of the blocks can be rewritten using only the independent effects as <math>{{H}_{0}}:{{\zeta }_{1}}={{\zeta }_{2}}=0\,\!</math>.) In DOE++, the independent block effects, <math>{{\zeta }_{1}}\,\!</math> and <math>{{\zeta }_{2}}\,\!</math>, are displayed as Block[1] and Block[2], respectively.


Constraints on <math>{{\tau }_{j}}\,\!</math> are:
Constraints on <math>{{\tau }_{j}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 1,234: Line 1,363:
Therefore, only two of the <math>{{\tau }_{j}}\,\!</math> effects are independent. Assuming that <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math> are independent, <math>{{\tau }_{3}}=-({{\tau }_{1}}+{{\tau }_{2}})\,\!</math>. The independent effects, <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math>, are displayed as A[1] and A[2], respectively.
Therefore, only two of the <math>{{\tau }_{j}}\,\!</math> effects are independent. Assuming that <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math> are independent, <math>{{\tau }_{3}}=-({{\tau }_{1}}+{{\tau }_{2}})\,\!</math>. The independent effects, <math>{{\tau }_{1}}\,\!</math> and <math>{{\tau }_{2}}\,\!</math>, are displayed as A[1] and A[2], respectively.
Constraints on <math>{{\delta }_{k}}\,\!</math> are:
Constraints on <math>{{\delta }_{k}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 1,243: Line 1,373:
Therefore, only one of the <math>{{\delta }_{k}}\,\!</math> effects is independent. Assuming that <math>{{\delta }_{1}}\,\!</math> is independent, <math>{{\delta }_{2}}=-{{\delta }_{1}}\,\!</math>. The independent effect, <math>{{\delta }_{1}}\,\!</math>, is displayed as B:B.
Therefore, only one of the <math>{{\delta }_{k}}\,\!</math> effects is independent. Assuming that <math>{{\delta }_{1}}\,\!</math> is independent, <math>{{\delta }_{2}}=-{{\delta }_{1}}\,\!</math>. The independent effect, <math>{{\delta }_{1}}\,\!</math>, is displayed as B:B.
Constraints on <math>{{(\tau \delta )}_{jk}}\,\!</math> are:
Constraints on <math>{{(\tau \delta )}_{jk}}\,\!</math> are:


::<math>\begin{align}
::<math>\begin{align}
Line 1,258: Line 1,389:


The regression version of the ANOVA model can be obtained using indicator variables. Since the block has three levels, two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, are required, which need to be coded as shown next:  
The regression version of the ANOVA model can be obtained using indicator variables. Since the block has three levels, two indicator variables, <math>{{x}_{1}}\,\!</math> and <math>{{x}_{2}}\,\!</math>, are required, which need to be coded as shown next:  


::<math>\begin{align}
::<math>\begin{align}
Line 1,267: Line 1,399:


Factor <math>A\,\!</math> has three levels and two indicator variables, <math>{{x}_{3}}\,\!</math> and <math>{{x}_{4}}\,\!</math>, are required:
Factor <math>A\,\!</math> has three levels and two indicator variables, <math>{{x}_{3}}\,\!</math> and <math>{{x}_{4}}\,\!</math>, are required:


::<math>\begin{align}
::<math>\begin{align}
Line 1,276: Line 1,409:


Factor <math>B\,\!</math> has two levels and can be represented using one indicator variable, <math>{{x}_{5}}\,\!</math>, as follows:
Factor <math>B\,\!</math> has two levels and can be represented using one indicator variable, <math>{{x}_{5}}\,\!</math>, as follows:


::<math>\begin{align}
::<math>\begin{align}
Line 1,290: Line 1,424:


In matrix notation this model can be expressed as:
In matrix notation this model can be expressed as:


::<math>y=X\beta +\epsilon \,\!</math>
::<math>y=X\beta +\epsilon \,\!</math>


:or:
:or:
Line 1,350: Line 1,486:


The model sum of squares, <math>S{{S}_{TR}}\,\!</math>, for the ANOVA model of this example can be obtained as:
The model sum of squares, <math>S{{S}_{TR}}\,\!</math>, for the ANOVA model of this example can be obtained as:


::<math>\begin{align}
::<math>\begin{align}
Line 1,361: Line 1,498:


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


::<math>\begin{align}
::<math>\begin{align}
Line 1,370: Line 1,508:


Since there are 18 observed response values, the number of degrees of freedom associated with the total sum of squares is 17 (<math>dof(S{{S}_{T}})=17\,\!</math>). The error sum of squares can now be obtained:
Since there are 18 observed response values, the number of degrees of freedom associated with the total sum of squares is 17 (<math>dof(S{{S}_{T}})=17\,\!</math>). The error sum of squares can now be obtained:


::<math>\begin{align}
::<math>\begin{align}
Line 1,379: Line 1,518:


The number of degrees of freedom associated with the error sum of squares is:
The number of degrees of freedom associated with the error sum of squares is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,392: Line 1,532:


The sequential sum of squares for the blocks can be calculated as:
The sequential sum of squares for the blocks can be calculated as:


::<math>\begin{align}
::<math>\begin{align}
Line 1,400: Line 1,541:


where <math>J\,\!</math> is the matrix of ones, <math>{{H}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}\,\!</math> is the hat matrix, which is calculated using <math>{{H}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}={{X}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}{{(X_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}^{\prime }{{X}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}})}^{-1}}X_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}^{\prime }\,\!</math>, and <math>{{X}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}\,\!</math> is the matrix containing only the first three columns of the <math>X\,\!</math> matrix. Thus
where <math>J\,\!</math> is the matrix of ones, <math>{{H}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}\,\!</math> is the hat matrix, which is calculated using <math>{{H}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}={{X}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}{{(X_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}^{\prime }{{X}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}})}^{-1}}X_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}^{\prime }\,\!</math>, and <math>{{X}_{\mu ,{{\zeta }_{1}},{{\zeta }_{2}}}}\,\!</math> is the matrix containing only the first three columns of the <math>X\,\!</math> matrix. Thus


::<math>\begin{align}
::<math>\begin{align}
Line 1,411: Line 1,553:


Similarly, the sequential sum of squares for factor <math>A\,\!</math> can be calculated as:
Similarly, the sequential sum of squares for factor <math>A\,\!</math> can be calculated as:


::<math>\begin{align}
::<math>\begin{align}
Line 1,426: Line 1,569:


Knowing the sum of squares, the test statistics for each of the factors can be calculated. For example, the test statistic for the main effect of the blocks is:
Knowing the sum of squares, the test statistics for each of the factors can be calculated. For example, the test statistic for the main effect of the blocks is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,436: Line 1,580:


The <math>p\,\!</math> value corresponding to this statistic based on the <math>F\,\!</math> distribution with 2 degrees of freedom in the numerator and 10 degrees of freedom in the denominator is:
The <math>p\,\!</math> value corresponding to this statistic based on the <math>F\,\!</math> distribution with 2 degrees of freedom in the numerator and 10 degrees of freedom in the denominator is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,444: Line 1,589:




Assuming that the desired significance level is 0.1, since <math>p\,\!</math> value > 0.1, we fail to reject <math>{{H}_{0}}\ \ :\ \ {{\zeta }_{i}}=0\,\!</math> and conclude that there is no significant variation in the mileage from one vehicle to the other. Statistics to test the significance of other factors can be calculated in a similar manner. The complete analysis results obtained from DOE++ for this experiment are presented in the following figure.   
Assuming that the desired significance level is 0.1, since <math>p\,\!</math> value > 0.1, we fail to reject <math>{{H}_{0}}:{{\zeta }_{i}}=0\,\!</math> and conclude that there is no significant variation in the mileage from one vehicle to the other. Statistics to test the significance of other factors can be calculated in a similar manner. The complete analysis results obtained from DOE++ for this experiment are presented in the following figure.   
 


[[Image:doe6.14.png|thumb|center|400px|Analysis results for the experiment in the [[ANOVA_for_Designed_Experiments#Example_3| example]].]]


<br>
[[Image:doe6.14.png|thumb|center|644px|Analysis results for the experiment in the [[ANOVA_for_Designed_Experiments#Example_3| example]].]]


==Use of Regression to Calculate Sum of Squares==
==Use of Regression to Calculate Sum of Squares==


This section explains the reason behind the use of regression in DOE++ in all calculations related to the sum of squares. A number of textbooks present the method of direct summation to calculate the sum of squares. But this method is only applicable for balanced designs and may give incorrect results for unbalanced designs. For example, the sum of squares for factor <math>A\,\!</math> in a balanced factorial experiment with two factors, <math>A\,\!</math> and <math>B\,\!</math>, is given as follows:
This section explains the reason behind the use of regression in DOE++ in all calculations related to the sum of squares. A number of textbooks present the method of direct summation to calculate the sum of squares. But this method is only applicable for balanced designs and may give incorrect results for unbalanced designs. For example, the sum of squares for factor <math>A\,\!</math> in a balanced factorial experiment with two factors, <math>A\,\!</math> and <math>B\,\!</math>, is given as follows:


::<math>\begin{align}
::<math>\begin{align}
Line 1,464: Line 1,608:


The analogous term to calculate <math>S{{S}_{A}}\,\!</math> in the case of an unbalanced design is given as:
The analogous term to calculate <math>S{{S}_{A}}\,\!</math> in the case of an unbalanced design is given as:


::<math>S{{S}_{A}}=\underset{i=1}{\overset{{{n}_{a}}}{\mathop{\sum }}}\,\frac{y_{i..}^{2}}{{{n}_{i.}}}-\frac{y_{...}^{2}}{{{n}_{..}}}\,\!</math>
::<math>S{{S}_{A}}=\underset{i=1}{\overset{{{n}_{a}}}{\mathop{\sum }}}\,\frac{y_{i..}^{2}}{{{n}_{i.}}}-\frac{y_{...}^{2}}{{{n}_{..}}}\,\!</math>
Line 1,469: Line 1,614:


where <math>{{n}_{i.}}\,\!</math> is the number of observations at the <math>i\,\!</math>th level of factor <math>A\,\!</math> and <math>{{n}_{..}}\,\!</math> is the total number of observations. Similarly, to calculate the sum of squares for factor <math>B\,\!</math> and interaction <math>AB\,\!</math>, the formulas are given as:
where <math>{{n}_{i.}}\,\!</math> is the number of observations at the <math>i\,\!</math>th level of factor <math>A\,\!</math> and <math>{{n}_{..}}\,\!</math> is the total number of observations. Similarly, to calculate the sum of squares for factor <math>B\,\!</math> and interaction <math>AB\,\!</math>, the formulas are given as:


::<math>\begin{align}
::<math>\begin{align}
Line 1,476: Line 1,622:


   
   
Applying these relations to the unbalanced data of the last table, the sum of squares for the interaction <math>AB\,\!</math> is:


Applying these relations to the unbalanced data of the last table, the sum of squares for the interaction <math>AB\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,487: Line 1,633:




which is obviously incorrect since the sum of squares cannot be negative. For a detailed discussion on this refer to [Searle].
which is obviously incorrect since the sum of squares cannot be negative. For a detailed discussion on this refer to [[DOE References|Searle(1997, 1971)]].




[[Image:doet6.6.png|thumb|center|400px|Example of an unbalanced design.]]
[[Image:doet6.6.png|thumb|center|400px|Example of an unbalanced design.]]
   
   
The correct sum of squares can be calculated as shown next. The <math>y\,\!</math> and <math>X\,\!</math> matrices for the design of the last table can be written as:
The correct sum of squares can be calculated as shown next. The <math>y\,\!</math> and <math>X\,\!</math> matrices for the design of the last table can be written as:


<center><math>y=\left[ \begin{matrix}
<center><math>y=\left[ \begin{matrix}
Line 1,510: Line 1,658:


Then the sum of squares for the interaction <math>AB\,\!</math> can be calculated as:
Then the sum of squares for the interaction <math>AB\,\!</math> can be calculated as:


::<math>S{{S}_{AB}}={{y}^{\prime }}[H-(1/5)J]y-{{y}^{\prime }}[{{H}_{\tilde{\ }AB}}-(1/5)J]y\,\!</math>
::<math>S{{S}_{AB}}={{y}^{\prime }}[H-(1/5)J]y-{{y}^{\prime }}[{{H}_{\tilde{\ }AB}}-(1/5)J]y\,\!</math>
Line 1,515: Line 1,664:


where <math>H\,\!</math> is the hat matrix and <math>J\,\!</math> is the matrix of ones. The matrix <math>{{H}_{\tilde{\ }AB}}\,\!</math> can be calculated using <math>{{H}_{\tilde{\ }AB}}={{X}_{\tilde{\ }AB}}{{(X_{\tilde{\ }AB}^{\prime }{{X}_{\tilde{\ }AB}})}^{-1}}X_{\tilde{\ }AB}^{\prime }\,\!</math> where <math>{{X}_{\tilde{\ }AB}}\,\!</math> is the design matrix, <math>X\,\!</math>, excluding the last column that represents the interaction effect <math>AB\,\!</math>. Thus, the sum of squares for the interaction <math>AB\,\!</math> is:
where <math>H\,\!</math> is the hat matrix and <math>J\,\!</math> is the matrix of ones. The matrix <math>{{H}_{\tilde{\ }AB}}\,\!</math> can be calculated using <math>{{H}_{\tilde{\ }AB}}={{X}_{\tilde{\ }AB}}{{(X_{\tilde{\ }AB}^{\prime }{{X}_{\tilde{\ }AB}})}^{-1}}X_{\tilde{\ }AB}^{\prime }\,\!</math> where <math>{{X}_{\tilde{\ }AB}}\,\!</math> is the design matrix, <math>X\,\!</math>, excluding the last column that represents the interaction effect <math>AB\,\!</math>. Thus, the sum of squares for the interaction <math>AB\,\!</math> is:


::<math>\begin{align}
::<math>\begin{align}
Line 1,526: Line 1,676:




[[Image:doe6.15.png|thumb|center|400px|Unbalanced experimental design for the data in the last table.]]
[[Image:doe6.15.png|thumb|center|471px|Unbalanced experimental design for the data in the last table.]]




[[Image:doe6.16.png|thumb|center|400px|Analysis for the unbalanced data in the last table.]]
[[Image:doe6.16.png|thumb|center|471px|Analysis for the unbalanced data in the last table.]]

Latest revision as of 03:29, 26 August 2017

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 5: ANOVA for Designed Experiments


DOEbox.png

Chapter 5  
ANOVA for Designed Experiments  

Synthesis-icon.png

Available Software:
Weibull++

Examples icon.png

More Resources:
DOE examples


In Simple Linear Regression Analysis and Multiple Linear Regression Analysis, methods were presented to model the relationship between a response and the associated factors (referred to as predictor variables in the context of regression) based on an observed data set. Such studies, where observed values of the response are used to establish an association between the response and the factors, are called observational studies. However, in the case of observational studies, it is difficult to establish a cause-and-effect relationship between the observed factors and the response. This is because a number of alternative justifications can be used to explain the observed change in the response values. For example, a regression model fitted to data on the population of cities and road accidents might show a positive regression relation. However, this relation does not imply that an increase in a city's population causes an increase in road accidents. It could be that a number of other factors such as road conditions, traffic control and the degree to which the residents of the city follow the traffic rules affect the number of road accidents in the city and the increase in the number of accidents seen in the study is caused by these factors. Since the observational study does not take the effect of these factors into account, the assumption that an increase in a city's population will lead to an increase in road accidents is not a valid one. For example, the population of a city may increase but road accidents in the city may decrease because of better traffic control. To establish a cause-and-effect relationship, the study should be conducted in such a way that the effect of all other factors is excluded from the investigation.

The studies that enable the establishment of a cause-and-effect relationship are called experiments. In experiments the response is investigated by studying only the effect of the factor(s) of interest and excluding all other effects that may provide alternative justifications to the observed change in response. This is done in two ways. First, the levels of the factors to be investigated are carefully selected and then strictly controlled during the execution of the experiment. The aspect of selecting what factor levels should be investigated in the experiment is called the design of the experiment. The second distinguishing feature of experiments is that observations in an experiment are recorded in a random order. By doing this, it is hoped that the effect of all other factors not being investigated in the experiment will get cancelled out so that the change in the response is the result of only the investigated factors. Using these two techniques, experiments tend to ensure that alternative justifications to observed changes in the response are voided, thereby enabling the establishment of a cause-and-effect relationship between the response and the investigated factors.

Randomization

The aspect of recording observations in an experiment in a random order is referred to as randomization. Specifically, randomization is the process of assigning the various levels of the investigated factors to the experimental units in a random fashion. An experiment is said to be completely randomized if the probability of an experimental unit to be subjected to any level of a factor is equal for all the experimental units. The importance of randomization can be illustrated using an example. Consider an experiment where the effect of the speed of a lathe machine on the surface finish of a product is being investigated. In order to save time, the experimenter records surface finish values by running the lathe machine continuously and recording observations in the order of increasing speeds. The analysis of the experiment data shows that an increase in lathe speeds causes a decrease in the quality of surface finish. However the results of the experiment are disputed by the lathe operator who claims that he has been able to obtain better surface finish quality in the products by operating the lathe machine at higher speeds. It is later found that the faulty results were caused because of overheating of the tool used in the machine. Since the lathe was run continuously in the order of increased speeds the observations were recorded in the order of increased tool temperatures. This problem could have been avoided if the experimenter had randomized the experiment and taken reading at the various lathe speeds in a random fashion. This would require the experimenter to stop and restart the machine at every observation, thereby keeping the temperature of the tool within a reasonable range. Randomization would have ensured that the effect of heating of the machine tool is not included in the experiment.

Analysis of Single Factor Experiments

As explained in Simple Linear Regression Analysis and Multiple Linear Regression Analysis, the analysis of observational studies involves the use of regression models. The analysis of experimental studies involves the use of analysis of variance (ANOVA) models. For a comparison of the two models see Fitting ANOVA Models. In single factor experiments, ANOVA models are used to compare the mean response values at different levels of the factor. Each level of the factor is investigated to see if the response is significantly different from the response at other levels of the factor. The analysis of single factor experiments is often referred to as one-way ANOVA.


To illustrate the use of ANOVA models in the analysis of experiments, consider a single factor experiment where the analyst wants to see if the surface finish of certain parts is affected by the speed of a lathe machine. Data is collected for three speeds (or three treatments). Each treatment is replicated four times. Therefore, this experiment design is balanced. Surface finish values recorded using randomization are shown in the following table.


Surface finish values for three speeds of a lathe machine.


The ANOVA model for this experiment can be stated as follows:


Yij=μi+ϵij


The ANOVA model assumes that the response at each factor level, i, is the sum of the mean response at the ith level, μi, and a random error term, ϵij. The subscript i denotes the factor level while the subscript j denotes the replicate. If there are na levels of the factor and m replicates at each level then i=1,2,...,na and j=1,2,...,m. The random error terms, ϵij, are assumed to be normally and independently distributed with a mean of zero and variance of σ2. Therefore, the response at each level can be thought of as a normally distributed population with a mean of μi and constant variance of σ2. The equation given above is referred to as the means model.

The ANOVA model of the means model can also be written using μi=μ+τi, where μ represents the overall mean and τi represents the effect due to the ith treatment.


Yij=μ+τi+ϵij


Such an ANOVA model is called the effects model. In the effects models the treatment effects, τi, represent the deviations from the overall mean, μ. Therefore, the following constraint exists on the τis:


nai=1τi=0


Fitting ANOVA Models

To fit ANOVA models and carry out hypothesis testing in single factor experiments, it is convenient to express the effects model of the effects model in the form y=Xβ+ϵ (that was used for multiple linear regression models in Multiple Linear Regression Analysis). This can be done as shown next. Using the effects model, the ANOVA model for the single factor experiment in the first table can be expressed as:


Yij=μ+τi+ϵij


where μ represents the overall mean and τi represents the ith treatment effect. There are three treatments in the first table (500, 600 and 700). Therefore, there are three treatment effects, τ1, τ2 and τ3. The following constraint exists for these effects:


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


For the first treatment, the ANOVA model for the single factor experiment in the above table can be written as:


Y1j=μ+τ1+0τ2+0τ3+ϵ1j


Using τ3=(τ1+τ2), the model for the first treatment is:


Y1j=μ+τ1+0τ20(τ1+τ2)+ϵ1jor Y1j=μ+τ1+0τ2+ϵ1j


Models for the second and third treatments can be obtained in a similar way. The models for the three treatments are:


First Treatment:Y1j=1μ+1τ1+0τ2+ϵ1jSecond Treatment:Y2j=1μ+0τ1+1τ2+ϵ2jThird Treatment:Y3j=1μ1τ11τ2+ϵ3j


The coefficients of the treatment effects τ1 and τ2 can be expressed using two indicator variables, x1 and x2, as follows:


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


Using the indicator variables x1 and x2, the ANOVA model for the data in the first table now becomes:

Y=μ+x1τ1+x2τ2+ϵ


The equation can be rewritten by including subscripts i (for the level of the factor) and j (for the replicate number) as:

Yij=μ+xi1τ1+xi2τ2+ϵij


The equation given above represents the "regression version" of the ANOVA model.


Treat Numerical Factors as Qualitative or Quantitative ?

It can be seen from the equation given above that in an ANOVA model each factor is treated as a qualitative factor. In the present example the factor, lathe speed, is a quantitative factor with three levels. But the ANOVA model treats this factor as a qualitative factor with three levels. Therefore, two indicator variables, x1 and x2, are required to represent this factor.

Note that in a regression model a variable can either be treated as a quantitative or a qualitative variable. The factor, lathe speed, would be used as a quantitative factor and represented with a single predictor variable in a regression model. For example, if a first order model were to be fitted to the data in the first table, then the regression model would take the form Yij=β0+β1xi1+ϵij. If a second order regression model were to be fitted, the regression model would be Yij=β0+β1xi1+β2xi12+ϵij. Notice that unlike these regression models, the regression version of the ANOVA model does not make any assumption about the nature of relationship between the response and the factor being investigated.

The choice of treating a particular factor as a quantitative or qualitative variable depends on the objective of the experimenter. In the case of the data of the first table, the objective of the experimenter is to compare the levels of the factor to see if change in the levels leads to a significant change in the response. The objective is not to make predictions on the response for a given level of the factor. Therefore, the factor is treated as a qualitative factor in this case. If the objective of the experimenter were prediction or optimization, the experimenter would focus on aspects such as the nature of relationship between the factor, lathe speed, and the response, surface finish, so that the factor should be modeled as a quantitative factor to make accurate predictions.

Expression of the ANOVA Model in the Form y=Xβ+ϵ

The regression version of the ANOVA model can be expanded for the three treatments and four replicates of the data in the first table as follows:


Y11=6=μ+1τ1+0τ2+ϵ11 Level 1, Replicate 1Y21=13=μ+0τ1+1τ2+ϵ21 Level 2, Replicate 1Y31=23=μ1τ11τ2+ϵ31 Level 3, Replicate 1Y12=13=μ+1τ1+0τ2+ϵ12 Level 1, Replicate 2Y22=16=μ+0τ1+1τ2+ϵ22 Level 2, Replicate 2Y32=20=μ1τ11τ2+ϵ32 Level 3, Replicate 2...Y34=18=μ1τ11τ2+ϵ34 Level 3, Replicate 4


The corresponding matrix notation is:


y=Xβ+ϵ


where


y=[Y11Y21Y31Y12Y22...Y34]=Xβ+ϵ=[110101111110101.........111][μτ1τ2]+[ϵ11ϵ21ϵ31ϵ12ϵ22...ϵ34]


Thus:


y=Xβ+ϵ[613231316...18]=[110101111110101.........111][μτ1τ2]+[ϵ11ϵ21ϵ31ϵ12ϵ22...ϵ34]


The matrices y, X and β are used in the calculation of the sum of squares in the next section. The data in the first table can be entered into DOE++ as shown in the figure below.


Single factor experiment design for the data in the first table.

Hypothesis Test in Single Factor Experiments

The hypothesis test in single factor experiments examines the ANOVA model to see if the response at any level of the investigated factor is significantly different from that at the other levels. If this is not the case and the response at all levels is not significantly different, then it can be concluded that the investigated factor does not affect the response. The test on the ANOVA model is carried out by checking to see if any of the treatment effects, τi, are non-zero. The test is similar to the test of significance of regression mentioned in Simple Linear Regression Analysis and Multiple Linear Regression Analysis in the context of regression models. The hypotheses statements for this test are:


H0:τ1=τ2=...=τna=0H1:τi0 for at least one i


The test for H0 is carried out using the following statistic:


F0=MSTRMSE


where MSTR represents the mean square for the ANOVA model and MSE is the error mean square. Note that in the case of ANOVA models we use the notation MSTR (treatment mean square) for the model mean square and SSTR (treatment sum of squares) for the model sum of squares (instead of MSR, regression mean square, and SSR, regression sum of squares, used in Simple Linear Regression Analysis and Multiple Linear Regression Analysis). This is done to indicate that the model under consideration is the ANOVA model and not the regression model. The calculations to obtain MSTR and SSTR are identical to the calculations to obtain MSR and SSR explained in Multiple Linear Regression Analysis.


Calculation of the Statistic F0

The sum of squares to obtain the statistic F0 can be calculated as explained in Multiple Linear Regression Analysis. Using the data in the first table, the model sum of squares, SSTR, can be calculated as:


SSTR=y[H(1nam)J]y=[613..18][0.16670.0833..0.08330.08330.1667..0.0833..........0.08330.0833..0.1667][613..18]=232.1667


In the previous equation, na represents the number of levels of the factor, m represents the replicates at each level, y represents the vector of the response values, H represents the hat matrix and J represents the matrix of ones. (For details on each of these terms, refer to Multiple Linear Regression Analysis.) Since two effect terms, τ1 and τ2, are used in the regression version of the ANOVA model, the degrees of freedom associated with the model sum of squares, SSTR, is two.


dof(SSTR)=2


The total sum of squares, SST, can be obtained as follows:


SST=y[I(1nam)J]y=[613..18][0.91670.0833..0.08330.08330.9167..0.0833..........0.08330.0833..0.9167][613..18]=306.6667


In the previous equation, I is the identity matrix. Since there are 12 data points in all, the number of degrees of freedom associated with SST is 11.


dof(SST)=11


Knowing SST and SSTR, the error sum of squares is:


SSE=SSTSSTR=306.6667232.1667=74.5


The number of degrees of freedom associated with SSE is:


dof(SSE)=dof(SST)dof(SSTR)=112=9


The test statistic can now be calculated using the equation given in Hypothesis Test in Single Factor Experiments as:


f0=MSTRMSE=SSTR/dof(SSTR)SSE/dof(SSE)=232.1667/274.5/9=14.0235


The p value for the statistic based on the F distribution with 2 degrees of freedom in the numerator and 9 degrees of freedom in the denominator is:


p value=1P(Ff0)=10.9983=0.0017


Assuming that the desired significance level is 0.1, since p value < 0.1, H0 is rejected and it is concluded that change in the lathe speed has a significant effect on the surface finish. DOE++ displays these results in the ANOVA table, as shown in the figure below. The values of S and R-sq are the standard error and the coefficient of determination for the model, respectively. These values are explained in Multiple Linear Regression Analysis and indicate how well the model fits the data. The values in the figure below indicate that the fit of the ANOVA model is fair.


ANOVA table for the data in the first table.


Confidence Interval on the ith Treatment Mean

The response at each treatment of a single factor experiment can be assumed to be a normal population with a mean of μi and variance of σ2 provided that the error terms can be assumed to be normally distributed. A point estimator of μi is the average response at each treatment, y¯i. Since this is a sample average, the associated variance is σ2/mi, where mi is the number of replicates at the ith treatment. Therefore, the confidence interval on μi is based on the t distribution. Recall from Statistical Background on DOE (inference on population mean when variance is unknown) that:


T0=y¯iμiσ^2/mi=y¯iμiMSE/mi


has a t distribution with degrees of freedom =dof(SSE). Therefore, a 100 (1α) percent confidence interval on the ith treatment mean, μi, is:


y¯i±tα/2,dof(SSE)MSEmi


For example, for the first treatment of the lathe speed we have:


μ^1=y¯1=6+13+7+84=8.5


In DOE++, this value is displayed as the Estimated Mean for the first level, as shown in the Data Summary table in the figure below. The value displayed as the standard deviation for this level is simply the sample standard deviation calculated using the observations corresponding to this level. The 90% confidence interval for this treatment is:


=y¯1±tα/2,dof(SSE)MSEmi=y¯1±t0.05,9MSE4=8.5±1.833(74.5/9)4=8.5±1.833(1.44)=8.5±2.64


The 90% limits on μ1 are 5.9 and 11.1, respectively.


Data Summary table for the single factor experiment in the first table.


Confidence Interval on the Difference in Two Treatment Means

The confidence interval on the difference in two treatment means, μiμj, is used to compare two levels of the factor at a given significance. If the confidence interval does not include the value of zero, it is concluded that the two levels of the factor are significantly different. The point estimator of μiμj is y¯iy¯j. The variance for y¯iy¯j is:


var(y¯iy¯j)=var(y¯i)+var(y¯j)=σ2/mi+σ2/mj


For balanced designs all mi=m. Therefore:


var(y¯iy¯j)=2σ2/m


The standard deviation for y¯iy¯j can be obtained by taking the square root of var(y¯iy¯j) and is referred to as the pooled standard error:


Pooled Std. Error=var(y¯iy¯j)=2σ^2/m


The t statistic for the difference is:


T0=y¯iy¯j(μiμj)2σ^2/m=y¯iy¯j(μiμj)2MSE/m


Then a 100 (1- α) percent confidence interval on the difference in two treatment means, μiμj, is:


y¯iy¯j±tα/2,dof(SSE)2MSEm


For example, an estimate of the difference in the first and second treatment means of the lathe speed, μ1μ2, is:

μ^1μ^2=y¯1y¯2=8.513.25=4.75


The pooled standard error for this difference is:


Pooled Std. Error=var(y¯1y¯2)=2σ^2/m=2MSE/m=2(74.5/9)4=2.0344


To test H0:μ1μ2=0, the t statistic is:


t0=y¯1y¯2(μ1μ2)2MSE/m=4.75(0)2(74.5/9)4=4.752.0344=2.3348


In DOE++, the value of the statistic is displayed in the Mean Comparisons table under the column T Value as shown in the figure below. The 90% confidence interval on the difference μ1μ2 is:


=y¯1y¯2±tα/2,dof(SSE)2MSEm=y¯1y¯2±t0.05,92MSEm=4.75±1.8332(74.5/9)4=4.75±1.833(2.0344)=4.75±3.729


Hence the 90% limits on μ1μ2 are 8.479 and 1.021, respectively. These values are displayed under the Low CI and High CI columns in the following figure. Since the confidence interval for this pair of means does not included zero, it can be concluded that these means are significantly different at 90% confidence. This conclusion can also be arrived at using the p value noting that the hypothesis is two-sided. The p value corresponding to the statistic t0=2.3348, based on the t distribution with 9 degrees of freedom is:


p value=2×(1P(T|t0|))=2×(1P(T2.3348))=2×(10.9778)=0.0444


Since p value < 0.1, the means are significantly different at 90% confidence. Bounds on the difference between other treatment pairs can be obtained in a similar manner and it is concluded that all treatments are significantly different.

Residual Analysis

Plots of residuals, eij, similar to the ones discussed in the previous chapters on regression, are used to ensure that the assumptions associated with the ANOVA model are not violated. The ANOVA model assumes that the random error terms, ϵij, are normally and independently distributed with the same variance for each treatment. The normality assumption can be checked by obtaining a normal probability plot of the residuals.


Mean Comparisons table for the data in the first table.


Equality of variance is checked by plotting residuals against the treatments and the treatment averages, y¯i (also referred to as fitted values), and inspecting the spread in the residuals. If a pattern is seen in these plots, then this indicates the need to use a suitable transformation on the response that will ensure variance equality. Box-Cox transformations are discussed in the next section. To check for independence of the random error terms residuals are plotted against time or run-order to ensure that a pattern does not exist in these plots. Residual plots for the given example are shown in the following two figures. The plots show that the assumptions associated with the ANOVA model are not violated.


Normal probability plot of residuals for the single factor experiment in the first table.


Plot of residuals against fitted values for the single factor experiment in the first table.


Box-Cox Method

Transformations on the response may be used when residual plots for an experiment show a pattern. This indicates that the equality of variance does not hold for the residuals of the given model. The Box-Cox method can be used to automatically identify a suitable power transformation for the data based on the following relationship:


Y=Yλ


λ is determined using the given data such that SSE is minimized. The values of Yλ are not used as is because of issues related to calculation or comparison of SSE values for different values of λ. For example, for λ=0 all response values will become 1. Therefore, the following relationship is used to obtain Yλ :


Yλ={yλ1λy˙λ1λ0y˙lnyλ=0


where y˙=exp[1ni=1nyi]. Once all Yλ values are obtained for a value of λ, the corresponding SSE for these values is obtained using yλ[IH]yλ. The process is repeated for a number of λ values to obtain a plot of SSE against λ. Then the value of λ corresponding to the minimum SSE is selected as the required transformation for the given data. DOE++ plots lnSSE values against λ values because the range of SSE values is large and if this is not done, all values cannot be displayed on the same plot. The range of search for the best λ value in the software is from 5 to 5, because larger values of of λ are usually not meaningful. DOE++ also displays a recommended transformation based on the best λ value obtained as shown in the table below.


Best Lambda Recommended Transformation Equation
2.5<λ1.5 Powerλ=2 Y=1Y2
1.5<λ0.75 Reciprocalλ=1 Y=1Y
0.75<λ0.25 Reciprocal Square Rootλ=0.5 Y=1Y
0.25<λ0.25 Natural Logλ=0 Y=lnY
0.25<λ0.75 Square Rootλ=0.5 Y=Y
0.75<λ1.5 Noneλ=1 Y=Y
1.5<λ2.5 Powerλ=2 Y=Y2


Confidence intervals on the selected λ values are also available. Let SSE(λ) be the value of SSE corresponding to the selected value of λ. Then, to calculate the 100 (1- α) percent confidence intervals on λ, we need to calculate SS as shown next:


SS=SSE(λ)(1+tα/2,dof(SSE)2dof(SSE))


The required limits for λ are the two values of λ corresponding to the value SS (on the plot of SSE against λ). If the limits for λ do not include the value of one, then the transformation is applicable for the given data. Note that the power transformations are not defined for response values that are negative or zero. DOE++ deals with negative and zero response values using the following equations (that involve addition of a suitable quantity to all of the response values if a zero or negative response value is encountered).


y(i)=y(i)+|ymin|×1.1Negative Responsey(i)=y(i)+1Zero Response


Here ymin represents the minimum response value and |ymin| represents the absolute value of the minimum response.

Example

To illustrate the Box-Cox method, consider the experiment given in the first table. Transformed response values for various values of λ can be calculated using the equation for Yλ given in Box-Cox Method. Knowing the hat matrix, H, SSE values corresponding to each of these λ values can easily be obtained using yλ[IH]yλ. SSE values calculated for λ values between 5 and 5 for the given data are shown below:


λSSElnSSE55947.88.690841946.47.57373696.56.54612282.25.64251135.84.9114083.94.4299174.54.31082101.04.61543190.45.24914429.56.062751057.66.9638


A plot of lnSSE for various λ values, as obtained from DOE++, is shown in the following figure. The value of λ that gives the minimum SSE is identified as 0.7841. The SSE value corresponding to this value of λ is 73.74. A 90% confidence interval on this λ value is calculated as follows. SS can be obtained as shown next:


SS=SSE(λ)(1+tα/2,dof(SSE)2dof(SSE))=73.74(1+t0.05,929)=73.74(1+1.83329)=101.27


Therefore, lnSS=4.6178. The λ values corresponding to this value from the following figure are 0.4686 and 2.0052. Therefore, the 90% confidence limits on are 0.4689 and 2.0055. Since the confidence limits include the value of 1, this indicates that a transformation is not required for the data in the first table.


Box-Cox power transformation plot for the data in the first table.

Experiments with Several Factors - Factorial Experiments

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=Xβ+ϵ

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.

Factorial Experiments with a Single Replicate

If a factorial experiment is run only for a single replicate then it is not possible to test hypotheses about the main effects and interactions as the error sum of squares cannot be obtained. This is because the number of observations in a single replicate equals the number of terms in the ANOVA model. Hence the model fits the data perfectly and no degrees of freedom are available to obtain the error sum of squares. For example, if the two factor experiment to study the effect of speed and fuel additive type on mileage was run only as a single replicate there would be only six response values. The regression version of the ANOVA model has six terms and therefore will fit the six response values perfectly. The error sum of squares, SSE, for this case will be equal to zero. In some single replicate factorial experiments it is possible to assume that the interaction effects are negligible. In this case, the interaction mean square can be used as error mean square, MSE, to test hypotheses about the main effects. However, such assumptions are not applicable in all cases and should be used carefully.


Blocking

Many times a factorial experiment requires so many runs that not all of them can be completed under homogeneous conditions. This may lead to inclusion of the effects of nuisance factors into the investigation. Nuisance factors are factors that have an effect on the response but are not of primary interest to the investigator. For example, two replicates of a two factor factorial experiment require eight runs. If four runs require the duration of one day to be completed, then the total experiment will require two days to be completed. The difference in the conditions on the two days may introduce effects on the response that are not the result of the two factors being investigated. Therefore, the day is a nuisance factor for this experiment. Nuisance factors can be accounted for using blocking. In blocking, experimental runs are separated based on levels of the nuisance factor. For the case of the two factor factorial experiment (where the day is a nuisance factor), separation can be made into two groups or blocks: runs that are carried out on the first day belong to block 1, and runs that are carried out on the second day belong to block 2. Thus, within each block conditions are the same with respect to the nuisance factor. As a result, each block investigates the effects of the factors of interest, while the difference in the blocks measures the effect of the nuisance factor. For the example of the two factor factorial experiment, a possible assignment of runs to the blocks could be as follows: one replicate of the experiment is assigned to block 1 and the second replicate is assigned to block 2 (now each block contains all possible treatment combinations). Within each block, runs are subjected to randomization (i.e., randomization is now restricted to the runs within a block). Such a design, where each block contains one complete replicate and the treatments within a block are subjected to randomization, is called randomized complete block design.

In summary, blocking should always be used to account for the effects of nuisance factors if it is not possible to hold the nuisance factor at a constant level through all of the experimental runs. Randomization should be used within each block to counter the effects of any unknown variability that may still be present.


Example

Consider the experiment of the fifth table where the mileage of a sports utility vehicle was investigated for the effects of speed and fuel additive type. Now assume that the three replicates for this experiment were carried out on three different vehicles. To ensure that the variation from one vehicle to another does not have an effect on the analysis, each vehicle is considered as one block. See the experiment design in the following figure.


Randomized complete block design for the experiment in the fifth table using three blocks.


For the purpose of the analysis, the block is considered as a main effect except that it is assumed that interactions between the block and the other main effects do not exist. Therefore, there is one block main effect (having three levels - block 1, block 2 and block 3), two main effects (speed -having three levels; and fuel additive type - having two levels) and one interaction effect (speed-fuel additive interaction) for this experiment. Let ζi represent the block effects. The hypothesis test on the block main effect checks if there is a significant variation from one vehicle to the other. The statements for the hypothesis test are:


H0:ζ1=ζ2=ζ3=0 (no main effect of block)H1:ζi0 for at least one i


The test statistic for this test is:


F0=MSBlockMSE


where MSBlock represents the mean square for the block main effect and MSE is the error mean square. The hypothesis statements and test statistics to test the significance of factors A (speed), B (fuel additive) and the interaction AB (speed-fuel additive interaction) can be obtained as explained in the example. The ANOVA model for this example can be written as:


Yijk=μ+ζi+τj+δk+(τδ)jk+ϵijk


where:


  • μ represents the overall mean effect
  • ζi is the effect of the ith level of the block (i=1,2,3)
  • τj is the effect of the jth level of factor A (j=1,2,3)
  • δk is the effect of the kth level of factor B (k=1,2)
  • (τδ)jk represents the interaction effect between A and B
  • and ϵijk represents the random error terms (which are assumed to be normally distributed with a mean of zero and variance of σ2)


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=Xβ+ϵ

Since the effects ζi, τj, δk, and (τδ)jk are defined as 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 the blocks can be rewritten using only the independent effects as H0:ζ1=ζ2=0.) In DOE++, the independent block effects, ζ1 and ζ2, are displayed as Block[1] and Block[2], respectively.

Constraints on τj are:


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


Therefore, only two of the τj effects are independent. Assuming that τ1 and τ2 are independent, τ3=(τ1+τ2). The independent effects, τ1 and τ2, are displayed as A[1] and A[2], respectively. Constraints on δk are:


2k=1δk=0or δ1+δ2=0


Therefore, only one of the δk effects is independent. Assuming that δ1 is independent, δ2=δ1. The independent effect, δ1, is displayed as B:B. Constraints on (τδ)jk are:


3j=1(τδ)jk=0and 2k=1(τδ)jk=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 the five equations are independent. Therefore, only two out of the six (τδ)jk effects are independent. Assuming that (τδ)11 and (τδ)21 are independent, we can express the other four effects in terms of these effects. The independent effects, (τδ)11 and (τδ)21, are displayed as A[1]B and A[2]B, respectively.

The regression version of the ANOVA model can be obtained using indicator variables. Since the block has three levels, two indicator variables, x1 and x2, are required, which need to be coded as shown next:


Block 1:x1=1, x2=0 Block 2:x1=0, x2=1 Block 3:x1=1, x2=1 


Factor A has three levels and two indicator variables, x3 and x4, are required:


Treatment Effect τ1:x3=1, x4=0Treatment Effect τ2:x3=0, x4=1 Treatment Effect τ3:x3=1, x4=1 


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


Treatment Effect δ1:x5=1Treatment Effect δ2:x5=1


The AB interaction will be represented by x3x5 and x4x5. The regression version of the ANOVA model can finally be obtained as:


Y=μ+ζ1x1+ζ2x2+τ1x3+τ2x4+δ1x5+(τδ)11x3x5+(τδ)21x4x5+ϵ


In matrix notation this model can be expressed as:


y=Xβ+ϵ


or:


[17.318.917.118.719.118.817.818.2..18.3]=[1101011011001101110111111101011011001101110111111011011010101101................11111111][μζ1ζ2τ1τ2δ1(τδ)11(τδ)21]+[ϵ111ϵ121ϵ131ϵ112ϵ122ϵ132ϵ211ϵ221..ϵ332]


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 the Sum of Squares for the Model

The model sum of squares, SSTR, for the ANOVA model of this example can be obtained as:


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


Since seven effect terms (ζ1, ζ2, τ1, τ2, δ1, (τδ)11 and (τδ)21) are used in the model the number of degrees of freedom associated with SSTR is seven (dof(SSTR)=7).

The total sum of squares can be calculated as:


SST=y[I(1nanbm)J]y=y[H(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.9256=0.7922


The number of degrees of freedom associated with the error sum of squares is:


dof(SSE)=dof(SST)dof(SSTR)=177=10


Since there are no true replicates of the treatments (as can be seen from the design of the previous figure, where all of the treatments are seen to be run just once), all of the error sum of squares is the sum of squares due to lack of fit. The lack of fit arises because the model used is not a full model since it is assumed that there are no interactions between blocks and other effects.

Calculation of the Extra Sum of Squares for the Factors

The sequential sum of squares for the blocks can be calculated as:


SSBlock=SSTR(μ,ζ1,ζ2)SSTR(μ)=y[Hμ,ζ1,ζ2(118)J]y0


where J is the matrix of ones, Hμ,ζ1,ζ2 is the hat matrix, which is calculated using 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


SSBlock=y[Hμ,ζ1,ζ2(118)J]y0=0.19440=0.1944


Since there are two independent block effects, and ζ2, the number of degrees of freedom associated with SSBlocks is two (dof(SSBlocks)=2).

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


SSA=SSTR(μ,ζ1,ζ2,τ1,τ2)SSTR(μ,ζ1,ζ2)=y[Hμ,ζ1,ζ2,τ1,τ2(118)J]yy[Hμ,ζ1,ζ2(118)J]y=4.77560.1944=4.5812


Sequential sum of squares for the other effects are obtained as SSB=4.9089 and SSAB=0.2411.


Calculation of the Test Statistics

Knowing the sum of squares, the test statistics for each of the factors can be calculated. For example, the test statistic for the main effect of the blocks is:


(f0)Block=MSBlockMSE=SSBlock/dof(SSBlocks)SSE/dof(SSE)=0.1944/20.7922/10=1.227


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


p value=1P(F(f0)Block)=10.6663=0.3337


Assuming that the desired significance level is 0.1, since p value > 0.1, we fail to reject H0:ζi=0 and conclude that there is no significant variation in the mileage from one vehicle to the other. Statistics to test the significance of other factors can be calculated in a similar manner. The complete analysis results obtained from DOE++ for this experiment are presented in the following figure.


Analysis results for the experiment in the example.

Use of Regression to Calculate Sum of Squares

This section explains the reason behind the use of regression in DOE++ in all calculations related to the sum of squares. A number of textbooks present the method of direct summation to calculate the sum of squares. But this method is only applicable for balanced designs and may give incorrect results for unbalanced designs. For example, the sum of squares for factor A in a balanced factorial experiment with two factors, A and B, is given as follows:


SSA=nai=1nbn(y¯i..y¯...)2=nai=1yi..2nbny...2nanbn


where na represents the levels of factor A, nb represents the levels of factor B, and n represents the number of samples for each combination of A and B. The term y¯i.. is the mean value for the ith level of factor A, yi.. is the sum of all observations at the ith level of factor A and y... is the sum of all observations.

The analogous term to calculate SSA in the case of an unbalanced design is given as:


SSA=nai=1yi..2ni.y...2n..


where ni. is the number of observations at the ith level of factor A and n.. is the total number of observations. Similarly, to calculate the sum of squares for factor B and interaction AB, the formulas are given as:


SSB=nbj=1y.j.2n.jy...2n..SSAB=nai=1nbj=1yij.2nijnai=1yi..2ni.nbj=1y.j.2n.j+y...2n..


Applying these relations to the unbalanced data of the last table, the sum of squares for the interaction AB is:


SSAB=nai=1nbj=1yij.2nijnai=1yi..2ni.nbj=1y.j.2n.j+y...2n..=(62+42+(42+6)22+122)(1022+6023)(5423+1622)+7025=22


which is obviously incorrect since the sum of squares cannot be negative. For a detailed discussion on this refer to Searle(1997, 1971).


Example of an unbalanced design.


The correct sum of squares can be calculated as shown next. The y and X matrices for the design of the last table can be written as:


y=[6461242] and X=[11111111111111111111]


Then the sum of squares for the interaction AB can be calculated as:


SSAB=y[H(1/5)J]yy[H ~AB(1/5)J]y


where H is the hat matrix and J is the matrix of ones. The matrix H ~AB can be calculated using H ~AB=X ~AB(X ~ABX ~AB)1X ~AB where X ~AB is the design matrix, X, excluding the last column that represents the interaction effect AB. Thus, the sum of squares for the interaction AB is:


SSAB=y[H(1/5)J]yy[H ~AB(1/5)J]y=368339.4286=28.5714


This is the value that is calculated by DOE++ (see the first figure below, for the experiment design and the second figure below for the analysis).


Unbalanced experimental design for the data in the last table.


Analysis for the unbalanced data in the last table.