On this page
9.1 One-Way ANOVA - Fixed Effects
We will present a tool to analyze the behavior of different treatments of a factor applied to a process, product or service. For example, consider the heat treatment process in which we control the hardness of the material. In this case, our objective is to evaluate the effect of the oven temperature on the hardness of the material. To do this, we designed an experiment in which we produced parts at different oven temperature levels and measured the hardness of these parts. With these observations, we can apply the ANOVA technique to choose the appropriate temperature level that guarantees parts with good properties.
Consider a process, product or service in which we want to evaluate the impact of factor A, such that A has k levels, with these levels being fixed. Suppose that a sample of N experimental units is selected completely at random from a population of experimental units. The experimental unit is the basic unit to which treatments are applied, for more details on experimental units see experiment planning module. The data matrix is presented as shown in table 9.1.1.
| Level | Factor | A | Sums | Averages | ||
|---|---|---|---|---|---|---|
| 1 | $y_{11}$ | $y_{12}$ | . . . | $y_{1n_{1}}$ | $y_{1.}$ | $\bar{y}_{1.}$ |
| 2 | $y_{21}$ | $y_{22}$ | . . . | $y_{1n_{2}}$ | $y_{2.}$ | $\bar{y}_{2.}$ |
| $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ |
| k | $y_{k1}$ | $y_{k2}$ | . . . | $y_{1n_{k}}$ | $y_{k.}$ | $\bar{y}_{k.}$ |
Table 9.1.1: Presentation of data for a factor.
Next, we present an example in which we want to study the behavior of a process at different levels of a control factor.
Example 1.1
Consider the production process of a synthetic fiber, in which the experimenter wants to know the influence of the percentage of cotton on the fiber’s strength. For this, a completely randomized experiment was carried out, in which different levels of cotton percentage were evaluated with respect to fiber resistance. An important point in planning the experiment is that for each factor level (percentage of cotton), the other factors that influence the process (such as the environment, machine, raw material, etc.) must present a homogeneous pattern of variability. In the experiment, we took 5 levels for cotton percentage and 5 replications.
| k | Cotton | Resistance | of | Fiber | Sums ($y_{i.}$) | Averages ($\bar{y}_{i.}$) | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 15 | 7 | 7 | 15 | 11 | 9 | 49 | 9,8 |
| 2 | 20 | 12 | 17 | 12 | 18 | 18 | 77 | 15,4 |
| 3 | 25 | 14 | 18 | 18 | 19 | 19 | 88 | 17,6 |
| 4 | 30 | 19 | 25 | 22 | 19 | 23 | 108 | 21,6 |
| 5 | 35 | 7 | 10 | 11 | 15 | 11 | 54 | 10,8 |
| $y_{..} =$ 376 | $\bar{y}_{..} =$ 15,04 |
Table 9.1.2: Sample for one factor (Cotton)
To carry out the analyzes in the Action software, we must set up the table as follows:
| Factor | Resistance |
|---|---|
| 15 | 7 |
| 15 | 7 |
| 15 | 15 |
| 15 | 11 |
| 15 | 9 |
| 20 | 12 |
| 20 | 17 |
| 20 | 12 |
| 20 | 18 |
| 20 | 18 |
| 25 | 14 |
| 25 | 18 |
| 25 | 18 |
| 25 | 19 |
| 25 | 19 |
| 30 | 19 |
| 30 | 25 |
| 30 | 22 |
| 30 | 19 |
| 30 | 23 |
| 35 | 7 |
| 35 | 10 |
| 35 | 11 |
| 35 | 15 |
| 35 | 11 |
Table 9.1.3: Data organization
Initially, we will carry out a descriptive analysis of the data that facilitates their interpretation and the application of the ANOVA model. Several graphs can help us present the data, below we present some alternatives. One of the most used graphs is the Box-Plot.
Figure 9.1.1: Boxplot graph.
Another option is Dotplot. In this case, all points are allocated on the same scale, which facilitates comparison.
Figure 9.1.2: Dotplot graph
The Mean Confidence Interval graph is also widely used. In this case, we calculate the mean and standard deviation for each factor level and thus obtain the grouped standard deviation. Next, we use the t-student distribution to construct the confidence interval for the mean of each level.
| Factor | Average | Standard Deviation | Lower Limit | Upper Limit |
|---|---|---|---|---|
| 15 | 9,8 | 2,83 | 7,15 | 12,45 |
| 20 | 15,4 | 2,83 | 12,75 | 18,05 |
| 25 | 17,6 | 2,83 | 14,95 | 20,25 |
| 30 | 21,6 | 2,83 | 18,95 | 24,25 |
| 35 | 10,8 | 2,83 | 8,15 | 13,45 |
Table 9.1.4: Confidence Intervals of Means
Figure 9.1.3: Confidence Interval of Means.
We can also make a graph with just the means, which we call the main effects graph.
Figure 9.1.4: Main effects graph for Example 1.
Note that to build this graph we used the averages $ \overline{y}_{i.} $ of each level versus the factor levels, that is, for 15% cotton we have an average resistance of 9.8, for 25% the average is 15.4 and so on. The dotted line represents the overall average of the data.
Through the graphs, we observe that the resistance value increases with the percentage of cotton up to the 30% level, at the 35% level there is a drop in the fiber resistance, everything indicates that the system has saturated. Furthermore, we observed that the variability is similar across cotton percentage levels.
From a practical point of view, we want to evaluate whether variations in the factor (percentage of cotton) cause significant changes in fiber resistance. Through the graphs, we have indications that the answer is affirmative.
In this simple example, the k levels were specified and fixed by the experimenter. In this situation, we want to test hypotheses about the level means, and our conclusions cannot be extended to levels not considered in the experiment. This model is called a fixed effect model. Alternatively, if the k levels are chosen randomly from a population of levels, we can extend the conclusions to all other levels in the population. In this case, the effects are random variables and called random effects and the discussion of this content is in the model module with random effects. In this module, we will evaluate only fixed-effects ANOVA.
9.1.1 Model
Model for the data
For a good analysis it is necessary to describe the data using an appropriate model. One of the simplest is the effects model, described by:
$$y_{ij}=\mu +\alpha_i+\varepsilon_{ij} $$
in which, $ j = 1, \cdots ,n_i $ and $ i = 1;2, \cdots ,k $.
For this model $ \mu $ is a parameter common to all treatments and represents the general average of the data, $ \alpha_{i} $ is the effect that factor level i causes on the response variable. The random variable $ \varepsilon_{ij} $ corresponds to the experimental random error, that is, the variability due to other factors that influence the process, product or service and that were not considered in the experiment. The experimental error represents variations not explained by the model, which are caused by variations present in several sources not considered in the study.
In short,
$ y_{ij} $= j-th observation of level i of factor A;
$ \mu $ = overall average of the data;
$ \alpha_i $ = effect of factor level i;
$ \varepsilon_{ij} $ = random component of the error.
From the data, we will use the following notation:
$ y_{i.}=\displaystyle \sum_{j=1}^{n_{i}} y_{ij} $: sum of observations at level i of factor A,
$ \overline{y}_{i.}=\cfrac{\displaystyle\sum_{j=1}^{n_{i}} y_{ij}}{\displaystyle n_{i}} $: average of observations of level i of factor A,
$ y_{..}=\displaystyle\sum_{i=1}^{n} \sum_{j=1}^{n_{i}}y_{ij} $: sum of all observations, and
$ \overline{y}_{..}=\dfrac{\displaystyle \sum_{i=1}^{n}\sum_{j=1}^{n_{i}} y_{ij}}{\displaystyle N} $: general average of observations,
being $N = \displaystyle \sum_{i=1}^k n_{i} $, total observations.
Furthermore, we will hypothesize that the experimental error is independent and identically distributed random variables with normal distribution with zero mean and variance $ \sigma^2 $, that is, we assume that $ \varepsilon_{ij} \sim N(0, \sigma^2) $. In this way, we conclude that $ y_{ij} $ also has a normal distribution with mean $ \mu + \alpha_i $ and variance $ \sigma^2 $, for all $ j=1, \cdots , n_i $ and $ i=1, \cdots , k $.
In practice, we are interested in evaluating the impact of the factor on the response. To do this, we want to evaluate the effect that different levels of the factor have on the response variable. If we denote by $ \mu_i = \mu + \alpha_i $, we want to test the hypotheses:
$$\begin{cases} H_0: \mu_{1} = \cdots = \mu_{k} \cr H_1: \mu_{i} \neq \mu_{j} ~ (i\neq j) \end{cases} \Leftrightarrow \begin{cases} H_0: \mu_{1} = \cdots = \mu_{k} \cr H_1: \hbox{pelo menos um é diferente.} \end{cases} $$
In the fixed effect model, we have:
$ \displaystyle\mu=\cfrac{\displaystyle \sum^n_{i=1} n_{i} \mu_{i} }{\displaystyle\sum^n_{i=1}n_{i}}=\frac{\displaystyle\sum^n_{i=1}n_{i} (\mu+\alpha_{i})}{\displaystyle\sum^n_{i=1} n_{i}}=\mu + \frac{\displaystyle\sum^n_{i=1}n_{i} \alpha_{i}}{\displaystyle\sum^n_{i=1}n_{i}}, $
This definition implies that:
$ \displaystyle\sum^n_{i=1}n_{i} \alpha_{i}=0. $
Thus, we can write the hypotheses as:
$$ \begin{cases} H_0: \alpha_{1} = \cdots = \alpha_{k} = 0 \cr H_1: \alpha_{i} \neq 0 \quad (\hbox{para algum }i = 1,…,k) \end{cases} $$
9.1.2 Decomposition of the Sum of Squares
The ANOVA technique is associated with partitioning the total data variability into components. The total sum of squares is defined as a measure of the total variability of the data,
$$SQT=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(y_{ij} - \overline{y}_{..})^{2}.$$
Intuitively this is reasonable, because if we divide SQT by its degrees of freedom (N -1), we obtain the sampling variance of the data.
Adding and subtracting $ \overline{y}_{i.} $ we get
$$SQT=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\left[(y_{ij}-\overline{y}_{i.})+(\overline{y}_{i.}-\overline{y}_{..})\right]^{2}$$
$$\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(y_{ij}-\overline{y}_{i.})^{2}+2\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(y_{ij}-\overline{y}_{i.})(\overline{y}_{i.}-\overline{y}_{..})+\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\overline{y}_{i.}- \overline{y}_{..})^{2}$$
However, the cross product in the above equation is zero, since
$$\sum_{i=1}^{k}\sum_{j=1}^{n_{i}} (y_{ij}-\overline{y}_{i.})(\overline{y}_{i.}- \overline{y}_{..})~=~\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\left(y_{ij}\overline{y}_{i.}- y_{ij}\overline{y}_{..}-\overline{y}_{i.}^2+\overline{y}_{i.}\overline{y}_{..}\right)$$
$$=~\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}y_{ij}\overline{y}_{i.}-\sum_{i=1}^{k}\sum_{j=1}^{n_{i}} y_{ij} \overline{y}_{..}-\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\overline{y}_{i.}^2 + \sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\overline{y}_{i.} \overline{y}_{..}$$
$$=~\sum_{i=1}^{k}n_i \overline{y}_{i.}^2 - \overline{y}_{..}\sum_{i=1}^{k}n_i \overline{y}_{i.} -\sum_{i=1}^{k}n_i \overline{y}_{i.}^2 + \overline{y}_{..}\sum_{i=1}^{k}n_i \overline{y}_{i.} =~0,$$
soon
$$SQT=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(y_{ij}-\overline{y}_{i.})^{2}+\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\overline{y}_{i.}-\overline{y}_{..})^{2},$$
that is,
$$SQT=SQE+SQA.$$
Observations
I. Factor A Sum of Squares (SQA) is the deviation of the estimated means in each treatment (level) around the general mean of the data. Represents the variability due to different levels of factor A.
II. Sum of Squares Error (SQE) is the deviation of observations around the estimated mean of their level (treatment). Represents the variability within each level of factor A.
Degrees of Freedom and Variance Estimates
The concept of degree of freedom is always associated with a sum of squares. Consider $ x_1, x_2, \ldots, x_n $ elements, then
$$\overline{x}=\frac{\sum\limits_{i=1}^{n} x_{i}}{n}~~~{e}~~~\sum_{i=1}^{n}(x_{i}-\overline{x})=0.$$
As the sum of the deviations $ z_{i}=x_{i}-\overline{x} $ is null, we conclude that to determine all the deviations it is enough to know $ (n-1) $ deviations, as the last deviation will be determined by the relationship
$$\sum_{i=1}^{n}(x_{i}-\overline{x})=\sum_{i=1}^{n}z_{i}=0.$$
Thus, we say that the quadratic sum $ \sum\limits_{i=1}^{n}(x_{i}-\overline{x})^2 $ has $ (n-1) $ degrees of freedom.
Since we have N observations, this gives us (N-1) degrees of freedom for the total sum of squares (SQT). Furthermore, we have k levels (treatments) of factor A, so we will have (k-1) degrees of freedom for the sum of squares relative to the levels (SQA)
$$SQA=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\overline{y}_{i.}-\overline{y}_{..})^{2}.$$
Finally, within each level we have ni replicates and therefore we will have (ni - 1) degrees of freedom for each estimate of variability due to experimental error $ \sum\limits_{j=1}^{n_i}(y_{ij}-\overline{y}_{i.})^{2}. $
Thus, for the sum of squares due to experimental error
$$SQE=\sum_{i=1}^{k} \sum_{j=1}^{n_{i}}\left(y_{ij}-\overline{y}_{i.}\right)^{2},$$
we have that the degrees of freedom correspond to $ \displaystyle\sum_{i=1}^{k} (n_{i}-1)=\sum_{i=1}^{k} n_{i}-k=N-k $ degrees of freedom. We know that the sampling variance of the level $ i $ is
$$ s_{i}^{2}=\frac{\displaystyle\sum_{j=1}^{n_{i}}(y_{ij}-\overline{y}_{i.})^{2} }{n_{i}-1}.$$
So we can write
$$SQE=\displaystyle\sum_{i=1}^{k}(n_i-1)s^{2}_{i}~~~{e}~~~\hat{\sigma}^2=\frac{SQE}{N-k}$$
which corresponds to an estimator of the experimental error variance ($ \sigma^{2} $). Similarly, if there is no difference between the $ k $ factor levels $ A $, we can use the variation within levels in relation to the general average as an estimate of the variance $ \sigma^{2} $. Specifically,
$$SQA=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\overline{y}_{i.}-\overline{y}_{..})^{2}=\sum_{i=1}^{k}n_{i}(\overline{y}_{i.}-\overline{y}_{..})^{2}$$
is an estimate of $ \sigma^{2} $ if the average of the levels are equal. Note that for all i, the quantity
$$\frac{\displaystyle\sum_{i=1}^{k}(\overline{y}_{i.}-\overline{y}_{..})^{2}}{\displaystyle k-1}$$
is an estimate of the variance of the mean of the level $ i $ ($ \sigma^{2} / n_i $). So, we obtain that
$$\frac{\displaystyle \sum_{i=1}^{k}n_{i}(\overline{y}_{i.} -\overline{y}_{..})^{2}}{\displaystyle k-1}$$
corresponds to an estimate of $ \sigma^{2} $, if there is no difference between the averages of the factor levels. Thus, breaking the total sum of squares into two sums of squares gives us two estimates for the variance. The first is based on variability within levels and the second is based on variability between levels. If there is no difference between the means, these two estimates must be very close, otherwise, we suspect that the difference between the estimates is caused by the difference between the treatment means.
Another way to calculate the degrees of freedom is to determine the expected value of the components $SQA$ and $SQE$. The term that multiplies $ \sigma^2 $ corresponds to the degrees of freedom.
Let’s calculate the expected value of these mean squares.
$$E[SQE]=E\left[\sum_{i=1}^{k} \sum_{j=1}^{n_{i}}(y_{ij}-\overline{y}_{i.})^{2}\right]$$
$$=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(y_{ij}^2-2y_{ij}\overline{y}_{i.}+\overline{y}_{i.}^2)\right]$$
$$=E\left[ \sum_{i=1}^{k}\sum_{j=1}^{n_{i}}y_{ij}^2-2\sum_{i=1}^{k} n_{i}\overline{y}_{i.}^2+\sum_{i=1}^{k} n_{i}\overline{y}_{i.}^2\right]$$
$$=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}y_{ij}^{2}-\sum_{i=1}^{k}\frac{1}{n_i} y_{i.}^{2} \right]$$
Replacing the model information in $ y_{ij} $ and $ y_{i.} $, we get
$$E[SQE]=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\mu+\alpha_{i}+\varepsilon_{ij})^{2}-\sum_{i=1}^{k}\frac{1}{n_i}\left(\sum_{j=1}^{n_{i}}(\mu+\alpha_{i}+\varepsilon_{ij})\right)^{2}\right]$$
$$=E\left[\sum_{i=1}^{k} \sum_{j=1}^{n_{i}}(\mu^2+\alpha_i^2+\varepsilon_{ij}^2+2\mu\alpha_i+2\mu\varepsilon_{ij}+2\alpha_i\varepsilon_{ij})\right.$$
$$-\left.\sum_{i=1}^{k} \frac{1}{n_i} \left( n_i^2\mu^2+n_i^2\alpha_i^2+\sum_{j=1}^{n_{i}}\varepsilon_{ij}^2+2n_i^2\mu\alpha_i+2n_i\mu\sum_{j=1}^{n_{i}}\varepsilon_{ij}+2n_i\alpha_i\sum_{j=1}^{n_{i}}\varepsilon_{ij} \right) \right]$$
$$=E\left[ N\mu^2+\sum_{i=1}^{k} n_i\alpha_i^2+\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}^2+2\mu\sum_{i=1}^{k} n_i\alpha_i+2\mu\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}+2\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\alpha_i\varepsilon_{ij} \right.$$
$$-\left.\left( N\mu^2+\sum_{i=1}^{k} n_i\alpha_i^2+\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\frac{\varepsilon_{ij}^2}{n_i}+2\mu\sum_{i=1}^{k} n_i\alpha_i+ 2\mu\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}+2\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\alpha_i\varepsilon_{ij} \right)\right]$$
$$=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}^2-\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\frac{\varepsilon_{ij}^2}{n_i}\right]$$
$$=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\left(1-\frac{1}{n_i}\right)\varepsilon_{ij}^2\right]$$
$$=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\left(1-\frac{1}{n_i}\right)E(\varepsilon^2_{ij})$$
$$=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\left(1-\frac{1}{n_i}\right)(Var(\varepsilon_{ij})+[E(\varepsilon_{ij})]^2), \quad \text{mas } E(\varepsilon_{ij})=0, \text{ então}$$
$$=(N-k)\sigma^2$$
Analogously, we have:
$$E[SQA]=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\overline{y}_{i.}-\overline{y}_{..})^2 \right]$$
$$=E\left[\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}(\overline{y}_{i.}^2-2\overline{y}_{i.}\overline{y}_{..}+\overline{y}_{..}^2)\right] \text{ mas }\overline{y}_{i.}=\frac{y_{i.}}{n_i}\text{ e }\overline{y}_{..}=\frac{\sum\limits_{i=1}^k y_{i.}}{N}, \text{ então}$$
$$=E\left[\sum_{i=1}^{k}\frac{y_{i.}^2}{n_i}-2,N\overline{y}_{..}^2 + N \overline{y}_{..}^2\right]$$
$$=E\left[\sum_{i=1}^{k}\frac{y_{i.}^2}{n_i}-\frac{y_{..}^2}{N}\right]$$
Replacing the model information in $ y_{ij} $ and $ y_{i.} $, we get
$$E[SQA]=E\left[\sum_{i=1}^{k}\frac{1}{n_i}\left(\sum_{j=1}^{n_{i}}(\mu+\alpha_i+\varepsilon_{ij})\right)^2-\frac{1}{N}\left(\sum_{i=1}^{k}\sum_{j=1}^{n_{i}} (\mu+\alpha_i+\varepsilon_{ij})\right)^2\right]$$
$$=E\left[\sum_{i=1}^{k}\frac{1}{n_i}\left(n_i\mu+n_i\alpha_i+\sum_{j=1}^{n_{i}}\varepsilon_{ij}\right)^2-\frac{1}{N}\left(\sum_{i=1}^{k}\left[n_i\mu+n_i\alpha_i+\sum_{j=1}^{n_{i}}\varepsilon_{ij}\right]\right)^2\right]$$
$$=E\left[\sum_{i=1}^{k}\frac{1}{n_i}\left(n_i\mu+n_i\alpha_i+\sum_{j=1}^{n_{i}}\varepsilon_{ij}\right)^2-\frac{1}{N}\left(N\mu+ \sum_{i=1}^{k} n_i\alpha_i+ \sum_{i=1}^{k} \sum_{j=1}^{n_{i}}\varepsilon_{ij}\right)^2\right]$$
$$=E\left[\sum_{i=1}^{k}\frac{1}{n_i}\left(n_i^2\mu^2+n_i^2\alpha_i^2+(\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2+2n_i^2\mu\alpha_i+2n_i\mu\sum_{j=1}^{n_{i}}\varepsilon_{ij}+2n_i\alpha_i\sum_{j=1}^{n_{i}}\varepsilon_{ij}\right)\right.$$
$$-\left.\frac{1}{N}\left(N^2\mu^2+ 2N\mu\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}+(\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2\right)\right]$$
$$=E\left[\sum_{i=1}^{k} n_i\mu^2 +\sum_{i=1}^{k} n_i\alpha_i^2+\sum_{i=1}^{k}\frac{1}{n_i}(\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2+2\mu\sum_{i=1}^{k} n_i\alpha_i + 2\mu\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}\right.$$
$$+\left. 2\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\alpha_i\varepsilon_{ij}- N\mu^2-2\mu\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij}-\frac{1}{N}(\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2 \right]$$
$$=E\left[\sum_{i=1}^{k} n_i\alpha_i^2+\sum_{i=1}^{k}\frac{1}{n_i}(\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2+2\sum_{i=1}^{k} \sum_{j=1}^{n_{i}}\alpha_i\varepsilon_{ij}-\frac {1}{N}(\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2\right]$$
$$=\sum_{i=1}^{k} E(n_i\alpha_i^2)+E\left(\sum_{i=1}^{k}\frac{1}{n_i}(\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2\right)+2\sum_{i=1}^{k} \sum_{j=1}^{n_{i}}\alpha_i E(\varepsilon_{ij})-\frac{1}{N}E(\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\varepsilon_{ij})^2$$
$$=\sum_{i=1}^{k} n_i\alpha_i^2+\sum_{i=1}^{k} \frac{1}{n_i}\sum_{j=1}^{n_{i}}\left[Var(\varepsilon_{ij})+E^2(\varepsilon_{ij})\right]-\frac{1}{N} \sum_{i=1}^{k}\sum_{j=1}^{n_{i}} \left[Var(\varepsilon_{ij})+E^2(\varepsilon_{ij})\right]$$
$$=\sum_{i=1}^{k} n_i\alpha_i^2 + k \sigma^2 - \sigma^2$$
$$=(k-1)\sigma^2+\sum_{i=1}^{k} n_i\alpha_i^2$$
because $ E(\varepsilon_{ij})=0 $ and $ \sum\limits_{i=1}^k n_i\alpha_i=0. $ With this we can define the mean squares as
$$QME=\frac{SQE}{N-k}~~~{e}~~~QMA=\frac{SQA}{k-1}$$
Therefore, as we argued previously, QME is a good estimator for variance because
$$E[QME]=E\left[\frac{SQE}{N-k}\right]=\frac{1}{N-k}E[SQE]=\sigma^2;~~~{e}$$
$$E[QMA]=E\left[\frac{SQA}{k-1}\right]=\frac{1}{k-1}E[SQA]=\sigma^2+\displaystyle\frac{1}{k-1}\sum_{i=1}^{k} n_i\alpha_i^2$$
Thus, if there is no difference between the levels (treatments) of the factor $ A $ (i.e. $ \alpha_i = 0 $), $QMA$ is also a good estimator for variance. However, if there is a difference between the means of the levels, the expected value of the mean square of the factor $ A $ (due to levels) is greater than $ \sigma^{2} $. Thus, we have the following degrees of freedom:
| $ SQ $ | Degrees of freedom | $ QM $ |
|---|---|---|
| $ SQA $ | $ k-1 $ | $ \frac{SQA}{k-1} $ |
| $ SQE $ | $ N-k $ | $ \frac{SQE}{N-k} $ |
| $ SQT $ | $ N-1 $ |
Table 9.1.5: Degrees of freedom
Therefore, it is clear that to test the hypotheses about differences between the means of the levels, we can compare the mean square of the treatment ($QMA$) with the mean square of the error ($QME$). Next, we will present a method to make this comparison.
9.1.3 Statistical Analysis
Next, we will develop a test to evaluate the hypothesis of differences or not between the population means of the levels, that is,
| Objective | Hypothesis |
|---|---|
| Effect of Factor A | $\begin{cases} H_0: \alpha_1 = \cdots = \alpha_k = 0 \cr H_1: \alpha_i \neq 0 ~ (\hbox{para algum }i = 1,…,k) \end{cases}$ |
Table 9.1.6: Hypothesis test of difference between means
How the mistakes $ \varepsilon_{ij} $ has a normal distribution with a mean $ 0 $ and variance $ \sigma^{2} $ and are independent, the observations $ y_{ij} $ has a normal distribution with a mean $ (\mu + \alpha_{i}) $ and variance $ \sigma^{2} $ and are also independent. Since $ y_{ij} $ has a Normal distribution and are independent, we obtain that
$$\frac{SQT}{\sigma^2}=\sum_{i=1}^{k}\sum_{j=1}^{n_{i}}\left[\frac{y_{ij}-\overline{y}_{..}}{\sigma}\right]^2 \sim \chi^2_{N-1}$$
has Chi-square distribution with $ (N-1) $ degrees of freedom. Likewise,
$$\frac{SQE}{\sigma^2}=\sum_{i=1}^{k}\frac{(n_i-1)s_i^2}{\sigma^2}\sim\chi^2_{N-k}$$
therefore,
$$\frac{(n_i-1)s^2_i}{\sigma^2}\sim\chi^2_{n_i-1}$$
and
$$\sum_{i=1}^{k}\frac{(n_i-1)s^2_i}{\sigma^2} \sim \chi^2_{\sum\limits_{i=1}^k(n_i-1)}$$
However, the three square sums are not necessarily independent, as
$$SQT=SQE+SQA$$
To establish independence between $SQE$ and the $SQA$, we will use the following version of Cochran’s theorem.
Cochran’s theorem
If we have
$$Q = Q_1 + Q_2 + … + Q_q$$
in which $ ~Q_i~,~i = 1, 2,…,q~(q \leq p) $ are sums of squares, each with $p_i$ degrees of freedom, such that:
$$p=\sum^{q}_{i=1}p_i$$
we get that $ Q_i\sim \chi^{2}_{(p_i)} $ and are independent of any $ i = 1, 2,…, q $.
ANOVA Test - One Factor
How $ \frac{{SQA}}{\sigma^{2}} $ and $ \frac{{SQE}}{\sigma^{2}} $ have Chi-Square distribution, independent, we obtain that
$$F_0 =\frac{\displaystyle\frac{SQA}{(k-1)}}{\displaystyle\frac{SQE}{(N-k)}}=\frac{QMA}{QME}\sim F_{(k-1; N-k)}$$
Se $ F_0> F_{(1-\alpha,k-1, N-k)} $, we reject $ H_0 $ and we concluded that there is a significant difference between the means of the factor levels (treatments), in which $ F_{(1-\alpha, k-1, N-k)} $ corresponds to the quantile of the distribution $F$ of Snedecor with a confidence level of $ 1-\alpha, $
Figure 9.1.5: Quantile of the F-Snedecor distribution
We can also calculate the P-value as, $ P[~F_{(k-1;N-k)}> F_0~\mid~H_0] $
ANOVA can be represented in the following table:
| FV | Sum of Squares | Degrees of Freedom | Medium Squares | $F_0$ |
|---|---|---|---|---|
| Factor | $SQA$ | $k-1$ | $QMA = \dfrac{SQA}{k-1}$ | $F_0 = \dfrac{QMA}{QME}$ |
| Error | $SQE$ | $N-k$ | $QME = \dfrac{SQE}{N-k}$ | |
| Total | $SQT$ | $N-1$ |
Table 9.1.7: ANOVA - One Factor
Consider the data from Example 1.
To test the following hypotheses:
$$\begin{cases} \mu_{l} = \mu_2 = \mu_3 = \mu_4 = \mu_5 \cr \mu_l \neq \mu_{m},~\hbox{para algum } l \neq m. \end{cases}$$
the sums of squares are given by:
$$SQT~=\sum^n_{i=1}\sum^{n_i}_{j=1}y_{ij}^{2}-\frac{y^{2}_{..}}{N}=636,96$$
$$SQA=\sum^n_{i=1}\cfrac{1}{n_i}y_i^{2} -\frac{y^{2}_{..}}{N}= 475,76$$
With this, we have to
$$SQE=SQT-SQA= 161,20$$
Table 9.1.8 below represents the ANOVA for the cotton fiber resistance factor.
| FV | Sum of Squares | Degrees of Freedom | Medium Squares | $F_0$ |
|---|---|---|---|---|
| Factor | $475,76$ | $5-1=4$ | $\dfrac{475,76}{4}= 118,94$ | $F_0 = \dfrac{QMA}{QME}=14,757$ |
| Error | $161,20$ | $25-5=20$ | $\dfrac{161,20}{20}=8,06$ | |
| Total | $636,96$ | $25-1=24$ |
Table 9.1.8: ANOVA for the resistance factor.
The approximate value of the P-value is: $ P[~F_{(4,20)}> F_0~\mid~H_0~]=0,000 $
For $ \alpha = 0,05 $, we obtain that $ F[0,05, 4, 20] = 2,87 $. Therefore, with 95% confidence, we reject $ {H}_0 $, that is, at least one $ \alpha_i $ is non-zero, for $ i=1,\ldots,n $.
See below the results obtained by the Action software.
| G.L. | Sum of Squares | Medium Square | Stat. F | P-value | |
|---|---|---|---|---|---|
| Factor | 4 | 475.76 | 118.94 | 14.7568 | 0 |
| Waste | 20 | 161.2 | 8.06 |
Table 9.1.9: ANOVA table
Power and sample size for 1-way ANOVA
The power of the statistical test is defined as the probability of rejecting the null hypothesis, given that it is false. In practice, it is important to have tests with a significance level close to the nominal significance level and that the power is high, even in situations with small samples. Under the assumption of samples coming from a Normal distribution, hypotheses of the form $ H_{0} $ : $ \mu = 0 \hbox{ vs. } H_{1} $ : $ \mu \neq 0 $ can be evaluated using the t-Student statistic. Alternatively, assuming symmetry, we can use the non-parametric Wilcoxon test. For both tests, when these assumptions are satisfied, we expect the Type I error to be close to the nominal significance level and the power to be high. On the other hand, when any of these assumptions are broken, it is important to evaluate the behavior of the rejection rate. $ H_{0} $ when it is true. This rejection rate is defined as the empirical size of the test and can be calculated via Monte Carlo simulation, generating samples under the null hypothesis. On the other hand, when generating values under the alternative hypothesis, we have that the proportion of times $ H_{0} $ is rejected defines the power of a statistical test.
There is a relationship between the two types of errors: when $ \alpha $ increases $ \beta $ decreases and vice versa, when $ \alpha $ decreases $ \beta $ increases. The way to reduce $ \alpha $ and $ \beta $ simultaneously is to increase the sample size. The following table shows the probabilities of the two types of error.
| $ H_0 $ true | $ H_0 $ false | |
|---|---|---|
| Probability of Not Rejecting $ H_0 $ | $ 1-\alpha $ | $ \beta $ |
| Probability of Rejecting $ H_0 $ | $ \alpha $ | $ 1-\beta $ |
Table 9.1.10: Error Types ($\alpha$ and $\beta$)
When defining sample size values $ n $ and the level of significance $ \alpha $, before carrying out the hypothesis test, it is possible to obtain probability values $ \beta $ of committing a type II error due to possible true values of the parameter declared in the null hypothesis.
The objective is to know how well the hypothesis test controls type II error, or how likely it is to reject the null hypothesis if it is actually false.
This information is obtained from the complementary probability of $ \beta $, that is, $ 1- \beta $, called the power of the test against a possible true value of the parameter declared in the null hypothesis.
For a given hypothesis test, it is possible to define true values of the parameter declared in the null hypothesis and, for each of them, calculate the probability $ 1- \beta. $ With this, we generate the power function and its corresponding test power curve graph.
By studying the Power of Testing $F$ for 1 factor, we refer that the probability of the decision rule will imply the choice for $ H_{1}. $ Those with different treatment averages. More specifically, Power is given by the following expression:
Power$ = P(F^* > F(1 - \alpha, k - 1, N - k)|\phi) $
in which $ \phi $ is the non-centrality parameter, and is obtained through the following equation:
$$\phi =\frac{\displaystyle 1}{\displaystyle \sigma}~\sqrt{\sum^n_{i=1}\dfrac{n_{i}(\mu_{i}-\mu_{.})^2}{\displaystyle k}}\ \ \text{e}$$
$$\mu_{.} = \displaystyle\sum^n_{i=1}\dfrac{ n_{i}\mu_{i}}{N}$$
When all factors in the sample have size $n$, the parameter $ \phi $ is obtained by the equation:
$ \phi = \dfrac{\displaystyle 1}{ \sigma} ~ \sqrt{\frac{\displaystyle n}{\displaystyle k}{\displaystyle\sum^n_{i=1} (\mu_{i} - \mu_{.})^2}} $ in which $ n_{i} \equiv n $ and
$ \mu_{.} =\displaystyle \sum^n_{i=1}\frac{\mu_{i}}{k}, $ because $ N = n.k $
Test Power probabilities are calculated through the distribution $F$ not central. Furthermore,
$ \bullet $ We have to $ \nu_{1} $ is the number of degrees of freedom in the numerator for $ F^* $. For the ANOVA model, $ \nu_{1} = k - 1 $, or number of levels minus 1.
$ \bullet $ The level of significance is given by $ \alpha $, we generally use $ \alpha = 0,05 $.
$ \bullet $ We have to $ \nu_{2} $ is the number of degrees of freedom in the denominator for $ F^* $. In the ANOVA model we have:
$$\nu_{2} = N - k ~~~\overset{N = n.k}{\displaystyle =}~~~ n.k - k = k(n - 1)$$
Sample planning for a 1-factor experiment with fixed levels is done using the non-centrality parameter for sample equality. However, instead of requiring a direct specification of the level $ \mu_{i} $, for which it is important to control type II error, it only requires a minimum difference in the factor level of the means, because it is important in terms of detecting differences between the $ \mu_{i} $, with high probability. This minimum difference is denoted by $ \Delta $.
$ \Delta =\max(\mu_i)-\min(\mu_i) $
Some specifications must be made, such as:
$ \bullet $ The level $ \alpha $ is the risk of type I error to be controlled.
$ \bullet $ The magnitude of the minimum difference $ \Delta $ of $ \mu_{i} $, is important, as it will be the tolerance of the test with high probability. The magnitude of $ \sigma $, that the standard deviation of the probability of the distribution of $Y$, and it is specified in terms of the relation:
$$ \frac{\displaystyle \Delta}{\displaystyle \sigma}$$
$ \bullet $ The level $ \beta $ is the risk of type II error to be controlled. The Power of the Test is given by:
$$1 - \beta$$
Direct explanation of $ \dfrac{\Delta}{\sigma} $: the minimum difference is explained directly in standard deviation units $ \sigma $.
Note: Although we do not specify $ \dfrac{\Delta}{\sigma} $ directly. These plans require the value of the standard deviation $ \sigma $ in advance. This is not much of an advantage seen as a significant specification data for the $ \Delta $ in units of $ \sigma. $ It will often require knowing the approximate size of the standard deviation.
Therefore, the non-centrality parameter will be given as:
$$\phi = \sqrt{\frac{\displaystyle n}{\displaystyle 2.k}}\left(\frac{\displaystyle \Delta }{\displaystyle \sigma}\right)\quad \tag{1}$$
Example 1.3.1
Consider the data from Example 1.
First we will calculate the value of $ \Delta $:
$ \Delta =\max(\mu_i)-\min(\mu_{i})= 21,6 - 9,8 = 11,8 $
We then have that the non-centrality parameter is given by:
$$\phi = \sqrt{\frac{\displaystyle n}{\displaystyle 2.k}}\left(\frac{\displaystyle \Delta }{\displaystyle \sigma}\right) = \sqrt{\frac{\displaystyle 5}{\displaystyle 2\times5}}\left(\frac{\displaystyle 11,8 }{\displaystyle 5,151698749}\right) = 1,6196$$
Finally, we obtain the following results:
| $ \Delta $ | Number of levels (k) | Observations by level (n) | Standard deviation ($ \sigma $) |
|---|---|---|---|
| 11,8 | 5 | 5 | 5,151 |
Table 9.1.11: Statistics to calculate Test Power
The calculated value of Test Power will be:
$\hbox{Poder} = P(F^* > F(1 - \alpha, k - 1, N - k)|\phi) = 0,7346 $
See below the results obtained by the Action Stat software for the same example.
| V1 | |
|---|---|
| Power | 0.7346 |
| Levels | 5 |
| Replica | 5 |
| Difference | 11.8 |
| Standard deviation | 5.151 |
| Significance level | 0.05 |
Table 9.1.12: Power and Sample Size - ANOVA
Sample size calculation
To calculate the sample size, we simply need to isolate the sample size $ n $ of equation (1). With this, we obtain:
$$n=\dfrac{2k\phi^2\sigma^2}{\Delta^2}$$
Example 1.3.2
In this example, we calculate the sample size for an experiment in which we want to detect a minimum difference in $ \Delta =11,8, $ for $ k=5 $ levels, variability (standard deviation) of $ s=5,151 $ and power of the test $ 1-\beta=0,734. $
In fact, for a power of $ 1-\beta=0,734 $ we have that the non-centrality parameter of the distribution $F$ is given by $ \phi $ of $1,6196$. So, we have to
$$n=\dfrac{2k\phi^2\sigma^2}{\Delta^2}=\dfrac{2\times 5\times(1,6196)^2(5,151)^2}{(11,8)^2}=4,9984\approx 5$$
Therefore, the sample size for this experiment is $ n=5. $
See below the results obtained by the Action Stat software for the same example.
| V1 | |
|---|---|
| Power | 0.7346 |
| Levels | 5 |
| Replica | 5 |
| Difference | 11.8 |
| Standard deviation | 5.151 |
| Significance level | 0.05 |
Table 9.1.13: Power and Sample Size - ANOVA
9.1.4 Estimation of Model Parameters
Next, we will present estimators for the model parameters,
$$y_{ij}=\mu + \alpha_{i}+\varepsilon_{ij}$$
and confidence intervals. As an estimator of the general average, we take
$$\widehat{\mu}=\overline{y}_{..}$$
and for that purpose we take
$$\widehat{\alpha}_{i}=\overline{y}_{i.}-\overline{y}_{..}$$
The average of $ i $-th level is given by $ \mu_{i}=\mu+\alpha_{i} $. Then, a point estimator for $ \mu_i $ is defined by
$$\widehat{\mu}_{i}=\widehat{\mu}+\widehat{\alpha}_{i}=\overline{y}_{i.}$$
Thus, if we assume that the errors $ \varepsilon_{ij} $ are normally distributed and independent, we obtain that the mean $ \overline{y}_{i.} $ (from level $i$) has a Normal distribution with mean $ \mu+\alpha_i $ and variance $ \sigma^2/n_i $. Using the mean square of the error ($QME$) as an estimator of $ \sigma^{2} $, we can construct a confidence interval based on the t-Student Distribution. In this way, we obtain that:
$$\frac{\displaystyle\frac{(\overline{y}_{i.}-\mu_i)}{\sqrt{\sigma^2/n_i}}}{\displaystyle \sqrt{\frac{QME}{\sigma^2}}}=\frac{\displaystyle(\overline{y}_{i.} - \mu_i)}{\displaystyle \sqrt{ {QME} ~ \displaystyle n_i}}$$
has t-Student distribution with ($ N - k $) degrees of freedom. Therefore, the confidence interval of $ (1-\alpha)100\char37 $ for the average of $ i $-th level is defined by
$$\overline{y}_{i.}-t(1-\alpha/2, N - k) \ast \sqrt{\frac{\displaystyle {QME}}{\displaystyle n_i}} \leq \mu_i \leq \overline{y}_{i.}+t(1-\alpha/2, N - k)*\sqrt{\frac{\displaystyle QME}{\displaystyle n_i} }.$$
The t-Student Distribution Table in the Appendix presents the statistical values $ t $-Student.
We have to
$$\frac{\overline{y}_{i.}-\mu_i}{\sqrt{\sigma^2/n_i}}\sim{ N(0,1)}$$
for everyone $ i=1,\ldots,k $ and are independent. So,
$$\frac{\displaystyle\overline{y}_{i.}-\overline{y}_{l.}-(\mu_i-\mu_l)}{\displaystyle\sigma\sqrt{\frac{1}{n_i}+\frac{1}{n_l}}}\sim{ N(0,1)}.$$
Likewise, we obtain that
$$\frac{\displaystyle\frac{\overline{y}_{i.}-\overline{y}_{l.}-(\mu_i-\mu_l)}{\displaystyle\sigma\sqrt{\frac{1}{n_i}+\frac{1}{n_l}}}}{\displaystyle\sqrt{\frac{QME(N-k)}{\sigma^2(N-k)}}}=\frac{\displaystyle(\overline{y}_{i.}-\overline{y}_{l.})-(\mu_i-\mu_l)}{\sqrt{QME\left(\frac{1}{n_i}+\frac{1}{n_l}\right)}}\sim t_{(N-k)}.$$
Thus, a confidence interval of $ (1-\alpha)100 \char37 $ for the difference between the mean of two levels is given by
$$(\overline{y}_{i.}-\overline{y}_{l.})-\Delta \leq \mu_i-\mu_l~~\leq ~(\overline{y}_{i.} -\overline{y}_{l.})+\Delta$$
in which,
$$\Delta = t(1-\alpha/2, N - k)*\sqrt{QME \left(\frac{1}{n_i}+\frac{1}{n_l}\right)}$$
Example 1.4.1
With the data from Example 1, on the resistance of the synthetic fiber, we will calculate the following estimates for the general average and for the effects of levels.
$$\widehat{\mu}=\overline{y}_{..}=376/25=15,04$$
$$\widehat{\alpha}_{1}=\overline{y}_{1.}-\overline{y}_{..}=9,8-15,04=-5,24$$
$$\widehat{\alpha}_{2}=\overline{y}_{2.}-\overline{y}_{..}= 15,40-15,04=0,36$$
$$\widehat{\alpha}_{3}=\overline{y}_{3.}-\overline{y}_{..}=17,60-15,04=2,56$$
$$\widehat{\alpha}_{4}=\overline{y}_{4.}-\overline{y}_{..}= 21,60-15,04=6,56$$
$$\widehat{\alpha}_{5}=\overline{y}_{5.}-\overline{y}_{..}=10,80 - 15,04 = -4,24$$
A confidence interval of $ 95\char37 $ for the average level $ 4 $ ($ 30\char37 $ of cotton in the fiber) is given by
$$21,60-2,086*\sqrt{\frac{8,06}{5}}\leq\mu_{4}\leq 21,60+2,086*\sqrt{\frac{8,06}{5}}$$
With this, we obtain
$$18,95\leq \mu_{4} \leq 24,25$$
A 95% confidence interval for the difference between the mean of levels 4 and 5 (30% and 35% cotton fiber) is given by
$$\Delta =2,086*\sqrt{8,06 \left(\frac{1}{5} +\frac{1}{5}\right)}~=~3,74552$$
$$(21,60-10,80)-3,74552 \leq \mu_4-\mu_5 \leq (21,60-10,80)+3,74552$$
$$7,05448 \leq \mu_4-\mu_5 \leq 14,54552$$
Using the Action software we have the following results:
| G.L. | Sum of Squares | Medium Square | Stat. F | P-value | |
|---|---|---|---|---|---|
| Factor | 4 | 475.76 | 118.94 | 14.7568 | 0 |
| Waste | 20 | 161.2 | 8.06 |
Table 9.1.14: ANOVA table
| Level | Lower Limit | Effect for average | Upper Limit |
|---|---|---|---|
| 15 | 7.1516 | 9.8 | 12.4484 |
| 20 | 12.7516 | 15.4 | 18.0484 |
| 25 | 14.9516 | 17.6 | 20.2484 |
| 30 | 18.9516 | 21.6 | 24.2484 |
| 35 | 8.1516 | 10.8 | 13.4484 |
Table 9.1.15: Factor Effect confidence interval
9.1.5 Waste Analysis
The decomposition of variability in analysis of variance is purely algebraic. However, to carry out statistical tests and obtain confidence intervals, we used the following hypotheses:
-
The mistakes $ \varepsilon_{ij} $ are normal and independent, with an average $ 0 $ and variance $ \sigma^2, $ constant; and
-
Observations are described using a model
$$y_{ij}=\mu+\alpha_{i}+\varepsilon_{ij}.$$
In practice, we need to check whether these assumptions are valid. Violations in these assumptions are verified through the residuals.
The residue for the jth observation of level i is defined by
$$e_{ij}=y_{ij}-\widehat{y}_{ij}$$
in which $ \widehat{y}_{ij} $ is an estimate of the observation $ y_{ij}, $
$$\widehat{y}_{ij}=\overline{y}_{..}+ (\overline{y}_{i.}-\overline{y}_{..})=\widehat{\mu}+\widehat{\alpha}_{i}=\overline{y}_{i.}$$
Example 1.5.1
Calculation of residuals for the data in Example 1.1.
| Cotton | Waste | $\hat{y}_{ij} = \bar{y}_{i.}$ | |||
|---|---|---|---|---|---|
| 15 | -2,8 | -2,8 | 1,2 | -0,8 | 9,8 |
| 20 | -3,4 | 1,6 | 2,6 | 2,6 | 15,4 |
| 25 | -3,6 | 0,4 | 1,4 | 1,4 | 17,6 |
| 30 | -2,6 | 3,4 | -2,6 | 1,4 | 21,6 |
| 35 | -3,8 | -0,8 | 4,2 | 0,2 | 10,8 |
Table 9.1.16: Waste for Fiber Strength.
Figure 9.1.6: Graph of residues versus order of data collection (Example 1)
Influence of $ R^2 $ at ANOVA
One way to check whether the adjusted model is adequate is to look at the result of the coefficient of determination ($R^2$). This coefficient measures how much the response variable is explained by the model. The higher the value of $ R^2 $ better! We say that, with a value of $R^2$ above 70%, the model is explaining the variation in the response variable well. The expression used to calculate the $R^2$ is given by:
$$R^2~=~1 - \frac{SQE}{SQT}$$
In a fixed-effect analysis of variance, we are interested in determining whether there is a difference between factor levels. Here, we are not interested in using the model for prediction. Thus, the suitability of the linear model is not crucial for applying ANOVA. To prove this statement, we carried out a simulation study, as follows:
-
We used a factor with 4 levels, with 10 replications at each level;
-
For each level we generate a Normal distribution with means $ 12;~12,3;~11,5 \hbox{ e } 17 $, respectively and standard deviation 1;
-
Soon after, we performed an ANOVA and recorded the p-values and the $R^2$;
-
We repeated the above procedure 10,000 times, obtaining the following results:
$$\hbox{Média do }R^2 = 0,4339$$
$$\hbox{Porcentagem dos P-valor maiores do que 0,05} = 0,00$$
Conclusion
Therefore, the unsuitability of the model (R² < 0,70) não influencia de forma significativa o resultado do teste F da ANOVA.
Análise dos resíduos
Na sequência, vamos fazer a análise de normalidade, independência e igualdade da variância dos resíduos. Grande parte dos problemas que encontramos na prática, são solucionados, considerando algumas suposições iniciais, tais como, assumir uma função de distribuição para os dados amostrados. Nesse sentido, surge a necessidade de certificarmos se essas suposições podem, realmente, ser assumidas. Em alguns casos, assumir a normalidade dos dados é o primeiro passo que tomamos para simplificar sua análise. Para dar suporte a esta suposição, consideramos, o teste Anderson-Darling, o teste Kolmogorov - Smirnov e o teste Shapiro - Wilk. Além disso, fazemos o gráfico “papel de probabilidade”.
Para mais detalhes verificar o conteúdo de Testes de Normalidade (Inferência Estatística).
Exemplo 1.5.2
Avaliar a normalidade dos resíduos (Exemplo 1.1).
Resíduos:
| -2,8 | -2,8 | 5,2 | 1,2 | -0,8 |
| -3,4 | 1,6 | -3,4 | 2,6 | 2,6 |
| -3,6 | 0,4 | 0,4 | 1,4 | 1,4 |
| -2,6 | 3,4 | 0,4 | -2,6 | 1,4 |
| -3,8 | -0,8 | 0,2 | 4,2 | 0,2 |
Table 9.1.17: Waste
After the ANOVA tables, we analyze the normality of the residuals using the following graphs:
Probability Paper and Anderson-Darling Test
We assessed the normality of the residuals using the “probability paper” graph and the Anderson-Darling test. In our case, we took the normality of the residuals as the null hypothesis, and used the Anderson-Darling statistic to test this hypothesis. For the example, as the P-value is high (approximately 0.16) we do not reject the hypothesis of normality of the residuals.
| Statistics | P-values | |
|---|---|---|
| Anderson - Darling | 0.5186 | 0.1699 |
Table 9.1.18: Anderson-Darling Normality Test
Figure 9.1.7: Anderson-Darling Test Probability Paper.
Residuals versus adjusted values
With this graph we have evidence about the behavior of the variance of the residuals in relation to the adjusted values. A more detailed analysis of the equality of variance can be obtained through the equality of variance tests, see the equality of variance tests module.
Figure 9.1.8: Graph of Residuals versus Adjusted Values.
Waste versus data collection order
Next, we create a graph of Residues versus the Order of Data Collection. With this graph we obtain evidence of whether or not the residues are independent. If any systematic behavior is observed in the graph, we have evidence that some “extra” variable influenced the results of the experiment, a fact that violates one of the basic premises of ANOVA and compromises our conclusions.
Figure 9.1.9: Residue graph versus data collection order
9.1.6 Heteroscedastic Model
Consider the average model
$$ y_{i,j} = \mu_i + \varepsilon_{ij} $$
in which $ \mu_i $ is the average level $ i $ of the factor and $ \varepsilon_{ij} $ are independent random variables with normal distribution with mean 0 and variance $ \sigma^2_i $, for all $ j=1, \cdots , n_i $ and $ i=1, \cdots , k $. In this case, the variances do not necessarily have to be equal. In the same way as in the equal variances (homoscedastic) model, the estimators for the model parameters are given by
$$\hat{\mu}_i = \bar{Y}_{i .} \quad \text{e} \quad \hat{\sigma}_i^2 = s_i^2 =\frac{\displaystyle\sum_{j=1}^{n_i} (Y_{ij} - \bar{Y}_{i .})^2}{n_i - 1}.$$
Furthermore, we know that $ \hat{\mu}_i $ has a normal distribution with a mean $ \mu_i $ and variance $ \sigma_i^2/n_i $ and are independent, for all $ i=1, \cdots , k $. We also know that
$$\frac{(n_i -1)\hat{\sigma}_i^2}{\sigma_i^2}$$
has a chi-square distribution with $ n_i-1 $ degrees of freedom and are independent,
for everyone $ i=1, \cdots , k $.
9.1.6.1 Test for equality of Variances
For the heteroscedastic model, we will initially test the hypotheses
$$ \begin{cases} H_0: \sigma_1^2 = \sigma_2^2 = \cdots = \sigma_k^2 \cr H_1: \hbox{pelo menos um}~\sigma_i^2~\hbox{é diferente,} \quad i=1,\ldots,k.\end{cases}$$
The most used methods are the Cochran, Bartlett and Levene tests.
Cochran Test (Homogeneity of Variance)
The Cochran test compares the highest variance with the others. To apply the Cochran test, we will assume that the experiment is balanced $ n_1=n_2= \cdots = n_k =n $ and follow the following steps:
- Step 1 - Calculate the Statistics
$$C~=~\cfrac{s^2_{max}}{\displaystyle\sum^{k}_{i=1}s^2_i}~=~\cfrac{\hbox{maior variância}}{\hbox{soma de todas as variâncias}},$$
in which
-
$k$: represents the number of factor levels;
-
$s^2_i$: represents the sampling variance. $s^2_i = \dfrac{1}{n-1} \displaystyle\sum_{j=1}^{n} (y_{ij}-\overline{y}_i)^2$;
-
$n$: represents the number of measurements at each factor level.
-
Step 2 - Compare with tabulated value.
Example 1.6.1.1
A metrology laboratory hired a new metrologist who underwent several trainings to join the team. Before releasing the metrologist to carry out the calibration procedure, we carried out a test to compare the variability of the novice metrologist’s measurements with the other metrologists in the laboratory. In a completely randomized experiment, a 50mm gauge block was measured 5 times by each metrologist. The measurements are in the table below.
Metrologists:
| John | Newbie | Moacir | Roberto | |
|---|---|---|---|---|
| Measure 1 | 50,0071 | 50,007 | 50,0072 | 50,0073 |
| Measure 2 | 50,0072 | 50,0076 | 50,0074 | 50,0074 |
| Measure 3 | 50,0072 | 50,0075 | 50,0073 | 50,0073 |
| Measure 4 | 50,0071 | 50,0071 | 50,0072 | 50,0072 |
| Measure 5 | 50,0072 | 50,0078 | 50,0072 | 50,0072 |
| Average | 50,00716 | 50,0074 | 50,00726 | 50,00728 |
| Standard Deviation | 0,000055 | 0,00034 | 0,000089 | 0,000084 |
| Variance | 0,000000003 | 0,000000115 | 0,000000008 | 0,000000007 |
Table 9.1.19: Metrology laboratory measurements
In this case, we aim to compare the variability found between different metrologists. We observe that $ S^2_{max}~=~0,000000115 $. Logo
$$C_{\hbox{calculado}}~=~\frac{0,000000115}{0,000000003~+~0,000000115~+~0,000000008~+~0,000000007}~=~0,864.$$
$ C_{\hbox{tabelado}} $ (Table C, for $ 5\char37 $ of significance) =0.629. Therefore, how $ C_{\hbox{calculado}}> C_{\hbox{tabelado}}$, the variance of the Novato metrologist is not homogeneous in relation to that of the other metrologists.
| Number of groups | $\qquad$ Group size (replicas) |
|---|
| $\qquad \qquad \qquad \qquad$ | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|
| 2 | - | 0,975 | 0,939 | 0,906 | 0,877 |
| 3 | 0,967 | 0,871 | 0,798 | 0,746 | 0,707 |
| 4 | 0,906 | 0,768 | 0,684 | 0,629 | 0,69 |
| 5 | 0,841 | 0,684 | 0,598 | 0,544 | 0,506 |
| 6 | 0,781 | 0,616 | 0,532 | 0,48 | 0,445 |
| 7 | 0,727 | 0,561 | 0,48 | 0,431 | 0,397 |
| 8 | 0,68 | 0,516 | 0,438 | 0,391 | 0,3 |
Table 9.1.20: Table $C$: Tabled value for 5% significance level.
Bartlett test
The test statistic proposed by Bartlett is given by
$$B_{0}=\frac{q}{c}$$
in which
$$q = (N-k) \ast \ln s^2_p - \displaystyle\sum_{i=1}^k [ (n_i - 1) \ast \ln s^2_i ] $$
$$c=1+\frac{1}{3(k-1) } \left(\sum^k_{i=1} \frac{1}{n_i -1}-\frac{1}{N-k} \right)$$
$$s^2_p=\frac{1}{N-k}\displaystyle\sum_{i=1}^k (n_{i}-1)s^{2}_{i}~~~~~\hbox{e}~~~~~s^{2}_{i}=\displaystyle\sum_{j=1}^{n_i} \frac{(y_{ij}-\overline{y}_{i.})^{2}}{n_{i}-1}$$
Under $ H_0 $ (equality of variances) we know that $ B_0 $ has an asymptotic chi-square distribution with $ k-1 $ degrees of freedom. In this way, we reject $ H_0 $ if $ B_0> Q_{[1 - \alpha; k-1]}, $ in which $ Q_{[1 - \alpha ; k-1]} $ represents the quantile $ (1-\alpha )*100\char37 $ of the chi-square distribution with $(k-1)$ degrees of freedom. Furthermore, the P-value is calculated by
$ \hbox{P-valor}=P[~\chi^{2}_{(k-1)}~ $>$ ~B_0~\mid~H_0~] $
The Bartlett test is sensitive in relation to the hypothesis of data normality. If we reject the hypothesis of normality, it is better to use the test proposed by Levene. However, if the normality hypothesis is not violated, the test proposed by Bartlett has better behavior than the test proposed by Levene.
Example 1.6.1.1
Apply the Bartlett test to the data in Example 1.1.
| Factor | Fiber Resistance |
|---|---|
| 15 | 7 |
| 15 | 7 |
| 15 | 15 |
| 15 | 11 |
| 15 | 9 |
| 20 | 12 |
| 20 | 17 |
| 20 | 12 |
| 20 | 18 |
| 20 | 18 |
| 25 | 14 |
| 25 | 18 |
| 25 | 18 |
| 25 | 19 |
| 25 | 19 |
| 30 | 19 |
| 30 | 25 |
| 30 | 22 |
| 30 | 19 |
| 30 | 23 |
| 35 | 7 |
| 35 | 10 |
| 35 | 11 |
| 35 | 15 |
| 35 | 11 |
Table 9.1.21: data from Example 1.1
The sampling variances are
$$s_{1}^{2}=\frac{(7-9,8)^2+(7-9,8)^2+ (15-9,8)^2+ (11-9,8)^2+ (9-9,8)^2}{5-1}= \frac{44,8}{4}=11,2$$
$$s_{2}^{2}=\frac{(12-15,4)^2+(17-15,4)^2+\ldots+(18-15,4)^2}{5-1}= 9,8$$
$$s_{3}^{2}=\frac{(14-17,6)^2+\ldots+(19-17,6)^2}{4}=4,3$$
$$s_{4}^{2}=\frac{(19-21,6)^2+\ldots+(23-21,6)^2}{4}= 6,8$$
$$s_{5}^{2}=\frac{(7-10,8)^2+\ldots+(11-10,8)^2}{4}=8,2.$$
So, we have to
$$s^{2}_{p}=\frac{4*(11,2)+4*(9,8)+4*(4,3)+4*(6,8)+4*(8,2)}{25-5}=8,06$$
Then,
$$q=\left[20*\ln(8,06)\right]- 4*\left[\ln(11,2)~+~\ln(9,8)~+~\ln(4,3)~+~\ln(6,8)~+~\ln(8,2)\right]$$
$$=41,7383~-~40,7119$$
$$=1,0264$$
We also have to
$$c=1+\frac{1}{3*4}\left[\frac{5}{4}-\frac{1}{20}\right]$$
$$=1,10$$
So, the test statistic
$$B_0=1,0264/1,10=0,93$$
How $ Q_{[0,95; 4]}=9,49 $, we do not reject the hypothesis that all variances are equal.
The p-value for the Bartlett test is
$$\hbox{P-valor}=P[\chi^2_{(k-1)} > B_0 \mid H_0 ] = P[ \chi^2_{(k-1)} > 0,93 \mid H_0 ] = 0,92$$
Conclusion
As the p-value is above 5%, we do not reject the hypothesis $ H_0 $.
Results of this example obtained with the Action software:
| Information | Value |
|---|---|
| Bartlett (test statistic) | 0.9331 |
| Degrees of Freedom | 4 |
| P-value | 0.9198 |
Table 9.1.22: Bartlett Variance Test
| Factor | Lower Limit | Standard Deviation | Upper Limit |
|---|---|---|---|
| 15 | 1.7363 | 3.3466 | 14.7118 |
| 20 | 1.6242 | 3.1305 | 13.7616 |
| 25 | 1.0758 | 2.0736 | 9.1157 |
| 30 | 1.3529 | 2.6077 | 11.4633 |
| 35 | 1.4857 | 2.8636 | 12.5882 |
Table 9.1.23: Confidence Intervals for Standard Deviation
Figure 9.1.9: Confidence Intervals for Standard Deviation
Levene’s test
This procedure consists of transforming the original data and applying the ANOVA test to the transformed data. Levene (1960) proposed the following transformation:
$$z_{ij}~=~\mid x_{ij} - \overline{x}_{i.}\mid~,~~i~=~1, \cdots,k,~~{e}~~j~=~1, \cdots, n_i$$
where
-
$ z_{ij} $: represents the data after transformation;
-
$ x_{ij} $: represents the original data; and
-
$ \overline{x}_{i.} $: represents the average of the level $ i $, for the original data.
An alternative (robust) transformation considered for the Levene procedure, proposed by Brown (1974), is to replace the level mean with the median.
To obtain the median, we must first order the data from lowest to highest value. If the number of data is odd, the median will be the central data. If the number of data is even, the median will be the arithmetic mean of the two central data.
Therefore, the following expression is replaced by
$$z_{ij}~=~\mid x_{ij}-\tilde{x}_{i.}\mid~,~~i~=~1,\cdots, k,~~{e}~~j=1,\cdots,n_i\quad \tag{1.6.1.1}$$
in which
-
$ z_{ij} $: represents the data after transformation;
-
$ x_{ij} $: represents the original data; and
-
$ \tilde{x}_{i.} $: represents the median of the level $ i $, for the original data.
With this, we have the following statistics:
$$F^*=\dfrac{\displaystyle\sum^k_{i=1}\frac{n_{i}(\overline{z}_{i.}-\overline{z}_{..})^2}{(k-1)}}{\frac{\displaystyle\sum^k_{i=1}\sum^{n_i}_{j=1}(z_{ij}-\overline{z}_{i.})^2}{\displaystyle\sum^k_{i=1}(n_i-1)}}$$
in which, $ \overline{z}_{i.}=\displaystyle\sum_{i=1}^k\frac{z_{ij}}{n_i} $ and $ \overline{z}_{..}=\frac{\displaystyle\sum_{i=1}^k \sum_{j=1}^{n_i} z_{ij}}{\displaystyle\sum_{i=1}^k n_i} $
After transforming the original data using the expression (1.6.1.1), we applied the ANOVA test. If the F statistic is significant, we reject the hypothesis of equality of variances.
Levene’s test for the data from Example 1.
Using expression (1.6.1.1), we obtain the following table, with the transformed Fiber Resistance data.
| Cotton % | |||||
|---|---|---|---|---|---|
| 15 | 2 | 2 | 6 | 2 | 0 |
| 20 | 5 | 0 | 5 | 1 | 1 |
| 25 | 4 | 0 | 0 | 1 | 1 |
| 30 | 3 | 3 | 0 | 3 | 1 |
| 35 | 4 | 1 | 0 | 4 | 0 |
Table 9.1.24: Transformed data for fiber strength.
| Factor | Fiber Strength |
|---|---|
| 15 | 2 |
| 15 | 2 |
| 15 | 6 |
| 15 | 2 |
| 15 | 0 |
| 20 | 5 |
| 20 | 0 |
| 20 | 5 |
| 20 | 1 |
| 20 | 1 |
| 25 | 4 |
| 25 | 0 |
| 25 | 0 |
| 25 | 1 |
| 25 | 1 |
| 30 | 3 |
| 30 | 3 |
| 30 | 0 |
| 30 | 3 |
| 30 | 1 |
| 35 | 4 |
| 35 | 1 |
| 35 | 0 |
| 35 | 4 |
| 35 | 0 |
Table 9.1.25: Data organization
The sum of squares is given by:
$$SQT=\sum^n_{i=1} \sum^{n_i}_{j=1}y_{ij}^{2}-\frac{y^{2}_{..}}{N}=2^2 + 2^2+ 6^2 + 2^2+ 0^2+ 5^2+ \ldots+4^2+0^2-\frac{49^2}{25}=$$
$$=179-96,04 = 82,96$$
$$SQA=\sum^n_{i=1}\frac{1}{n_i}y_i^{2}-\frac{y^{2}_{..}}{N}= \frac{1}{5}[12^2+12^2+6^2+10^2+9^2]- \frac{49^2}{25} = 101-96,04=4,96$$
$$SQE=SQT-SQA=82,96-4,96=78$$
Conclusion
As the p-value is greater than 5%, we have no evidence to reject the hypothesis of equality of variances.
Results of this example obtained with the Action software:
| G.L. | Sum of Squares | Medium Square | Stat. F | P-value | |
|---|---|---|---|---|---|
| Factor | 4 | 4.96 | 1.24 | 0.3179 | 0.8626 |
| Waste | 20 | 78 | 3.9 |
Table 9.1.26: Analysis of Variance for transformed data.
| Information | Value |
|---|---|
| Levene (test stat) | 0.2598 |
| Degrees of Freedom | 4 |
| P-value | 0.9002 |
Table 9.1.27: Variance Test
| Factor | Lower Limit | Standard Deviation | Upper Limit |
|---|---|---|---|
| 15 | 1.1367 | 2.1909 | 9.6311 |
| 20 | 1.2495 | 2.4083 | 10.5869 |
| 25 | 0.8525 | 1.6432 | 7.2233 |
| 30 | 0.7337 | 1.4142 | 6.2169 |
| 35 | 1.0633 | 2.0494 | 9.0091 |
Table 9.1.28: Confidence Intervals for Standard Deviation
Figure 9.1.10: Confidence Intervals for Standard Deviation
Example 1.6.1.2
Apply Levene’s test to the data in Example 1.1.
| Factor | Fiber Resistance |
|---|---|
| 15 | 7 |
| 15 | 7 |
| 15 | 15 |
| 15 | 11 |
| 15 | 9 |
| 20 | 12 |
| 20 | 17 |
| 20 | 12 |
| 20 | 18 |
| 20 | 18 |
| 25 | 14 |
| 25 | 18 |
| 25 | 18 |
| 25 | 19 |
| 25 | 19 |
| 30 | 19 |
| 30 | 25 |
| 30 | 22 |
| 30 | 19 |
| 30 | 23 |
| 35 | 7 |
| 35 | 10 |
| 35 | 11 |
| 35 | 15 |
| 35 | 11 |
Table 9.1.29: data from Example 1.1
Results of this example obtained with the Action software:
| Information | Value |
|---|---|
| Levene (test stat) | 0.3179 |
| Degrees of Freedom | 4 |
| P-value | 0.8626 |
Table 9.1.30: Variance Test
| Factor | Lower Limit | Standard Deviation | Upper Limit |
|---|---|---|---|
| 15 | 1.7363 | 3.3466 | 14.7118 |
| 20 | 1.6242 | 3.1305 | 13.7616 |
| 25 | 1.0758 | 2.0736 | 9.1157 |
| 30 | 1.3529 | 2.6077 | 11.4633 |
| 35 | 1.4857 | 2.8636 | 12.5882 |
Table 9.1.31: Confidence Intervals for Standard Deviation
Figure 9.1.11: Confidence Intervals for Standard Deviation
As the p-value is greater than 5%, we have no evidence to reject the hypothesis of equality of variances.
9.1.6.2 Welch test
Suppose we perform the equality of variance test and reject the hypothesis $ H_0 $. In this case, we are interested in performing the equality of means test
$$ \begin{cases} H_0: \mu_1 = \mu_2 = \cdots = \mu_k \cr H_1: \hbox{pelo menos uma média é diferente} \end{cases}$$
in the heteroscedastic model. However, the test $ F $ The hypothesis of ANOVA is equality between variances, which is not valid in this case. However, if the data are balanced $ (n_1=n_2=\cdots=n_k) $, the test $ F $ of ANOVA is robust in relation to the inequality of variances and can be applied.
Next, we present a test proposed by Welch (1951) to test the hypothesis $ H_0 $ in the presence of unequal variances. Let’s consider:
-
$ n_i $ the number of elements in each sample;
-
$ \overline{y}_{i.} $ the mean of each sample; and
-
$ s_i^2 $ the sampling variance.
More,
$$w_i = \frac{n_i}{s_i^2}$$
$$\overline{y}^*=\frac{\displaystyle\sum^k_{i=1}w_i \overline{y}_{i.}}{\displaystyle\sum_{i=1}^k w_i}$$
$$\Omega =\sum_{i=1}^k \frac{\left(1 - \displaystyle\frac{w_i}{\sum_{i=1}^k w_i}\right)^2}{n_i - 1}. $$
According to Welch (1951), the test statistics are:
$$F_c=\frac{\sum\limits_{i=1}^k w_i \displaystyle\frac{(\overline{y}_{i.}-\bar{y}^*)^2}{k - 1}}{1 + \displaystyle\frac{2(k-2)\Omega}{k^2-1}}\sim F(\nu_1, \nu_2).$$
The degrees of freedom of the F distribution are:
$$\nu_1 = k -1 \text{ e } \nu_2 = \frac{k^2 - 1}{3 \Omega}.$$
Therefore, we reject the null hypothesis ($ H_0 $) if $ F_c > F_{(1-\alpha,,\nu_1,,\nu_2)}. $ Furthermore, the p-value is $ P[F_{(\nu_1, , \nu_2)} > F_c]. $
Example 1.6.2.1
An experiment was conducted to verify the influence of two drugs on cancer treatment. 29 rats were used, which were divided into 4 groups, as follows:
-
The rats in Group 1 (control) took a placebo;
-
Group 2 rats took drug A;
-
Group 3 rats took drug B; and
-
Group 4 rats took drugs A and B.
The cell count that improved after treatment with the drugs is represented in the table below:
| Group 1 | Group 2 | Group 3 | Group 4 |
|---|---|---|---|
| 1 | 12 | 12 | 13 |
| 8 | 10 | 4 | 14 |
| 9 | 13 | 11 | 14 |
| 9 | 13 | 7 | 17 |
| 4 | 12 | 8 | 11 |
| 0 | 10 | 10 | 14 |
| 1 | 12 | 13 | |
| 5 | 14 |
Table 9.1.32: Results after treatment in groups
For this data, test the hypotheses:
$$ \begin{cases} H_0: \mu_1 = \mu_2 = \mu_2 = \mu_3 = \mu_4 \cr H_1: \hbox{pelo menos uma média é diferente} \end{cases}$$
In the following table we have some measurements regarding the data:
| Group 1 | Group 2 | Group 3 | Group 4 | |
|---|---|---|---|---|
| $ {n_i} $ | 7 | 6 | 8 | 8 |
| $ {\overline{y}_.} $ | 4,57 | 11,67 | 8,63 | 13,75 |
| $ {S_i^2} $ | 16,29 | 1,87 | 9,70 | 2,79 |
| $ {w_i} $ | 0,43 | 3,21 | 0,83 | 2,87 |
Table 9.1.33: Statistics for each group calculated
As in this example k = 4, we have
$F_c = \dfrac{\cfrac{41,71}{3}}{1+\cfrac{2 \ast 2 \ast 0,376}{15}} = 12,63.$
The tabulated value of the F distribution is $ F_{(0,05;3;13,3)}=3,38. $
How $ F_c > F_{(1-\alpha,\nu_1, \nu_2)} $ we reject $ H_0 $ for $ \alpha=0,05. $
The p-value is $ P[F_{(\nu_1,\nu_2)}> F_c]=0,00034 < < \alpha. $
Using the Action software we have the following results:
| F-statistic | GL Num | GL Denom | P-Value |
|---|---|---|---|
| F | 12.6355 | 3 | 13.283 |
Table 9.1.34: Welch Test (Heteroscedastic Model)
| Factor | Average | Standard Deviation | Lower Limit | Upper Limit |
|---|---|---|---|---|
| 1 | 4.5714 | 4.0356 | 0.8392 | 8.3037 |
| 2 | 11.6667 | 1.3663 | 10.2329 | 13.1005 |
| 3 | 8.625 | 3.1139 | 6.0217 | 11.2283 |
| 4 | 13.75 | 1.669 | 12.3546 | 15.1454 |
Table 9.1.35: Confidence Interval of Means