ANOVA 8 of 9
On this page

ANOVA

9.7 Applications of ANOVA

Chapter 7 of 8 19 min read

In this section, we will show some applications of ANOVA. All cases presented are real and were prepared by the client with the participation of the ESTATCAMP team.

Application 1 - Product production

A company produces a certain type of product and uses material and material profile as factors. To do this, we carried out an experiment with 42 parts, with 2 types of materials (MAS15, MAS17) and 3 types of material profiles (Standard, Ramp Pad1, Ramp Pad2). The data is in Table 9.7.1.

Material Profile Measure
BUT 15 Ramp and Pad #1 2,19
BUT 15 Ramp and Pad #2 3,16
BUT 15 Baseline 2,19
BUT 17 Ramp and Pad #1 5,59
BUT 17 Ramp and Pad #2 3,65
BUT 17 Baseline 2,68
BUT 15 Ramp and Pad #1 4,86
BUT 15 Ramp and Pad #2 3,4
BUT 15 Baseline 2,19
BUT 17 Ramp and Pad #1 8,27
BUT 17 Ramp and Pad #2 4,38
BUT 17 Baseline 3,16
BUT 15 Ramp and Pad #1 5,84
BUT 15 Ramp and Pad #2 1,95
BUT 15 Baseline 1,7
BUT 17 Ramp and Pad #1 5,11
BUT 17 Ramp and Pad #2 3,89
BUT 17 Baseline 6,57
BUT 15 Ramp and Pad #1 2,92
BUT 15 Ramp and Pad #2 4,38
BUT 15 Baseline 1,46
BUT 17 Ramp and Pad #1 9,24
BUT 17 Ramp and Pad #2 4,86
BUT 17 Baseline 5,84
BUT 15 Ramp and Pad #1 2,43
BUT 15 Ramp and Pad #2 5,84
BUT 15 Baseline 1,46
BUT 17 Ramp and Pad #1 7,05
BUT 17 Ramp and Pad #2 5,35
BUT 17 Baseline 3,16
BUT 15 Ramp and Pad #1 2,68
BUT 15 Ramp and Pad #2 2,19
BUT 15 Baseline 1,46
BUT 17 Ramp and Pad #1 8,27
BUT 17 Ramp and Pad #2 5,84
BUT 17 Baseline 2,68
BUT 15 Ramp and Pad #1 5,11
BUT 15 Ramp and Pad #2 6,08
BUT 15 Baseline 1,95
BUT 17 Ramp and Pad #1 7,78
BUT 17 Ramp and Pad #2 3,65
BUT 17 Baseline 2,19

Table 9.7.1: Input data.

First, let’s build the interactions graph. For the interaction graph we need some auxiliary calculations, which are the averages $ y_{ij.} $ for $i = 1, 2$ and $j = 1, 2, 3$.

So, when we have MAS15 and Baseline, we have:

$$\overline{y_{11.}}=\frac{1}{r}\sum_{k=1}^{r}y_{11k}=\frac{2,19+2,19+1,7+1,46+1,46+1,46+1,95}{7}={12,41}{7}=1,77$$

MAS15 and Ramp Pad1, we have:

$$\overline{y_{12.}}=\frac{1}{r}\sum_{k=1}^{r}y_{11k}=\frac{2,19+4,86+5,84+2,92+2,43+2,68+5,11}{7}={26,03}{7}=3,71.$$

Likewise, we have:

$ \overline{y_{13.}}=3,85, $$ \overline{y_{21.}}=3,75, $$ \overline{y_{22.}}=7,33 $ and $ \overline{y_{23.}}= 4,51. $

With this data we can build the graph, obtaining Figure 9.7.1.

Figura9.7.1

Figure 9.7.1: Interaction graph.

We observe in the graph that there is a change in behavior at the Ramp and Pad#2 level. Thus, we may have evidence of interaction at the Ramp and Pad#2 level.

Now, we will make a main effects graph to help us detect the effect of each factor individually, that is, check at which level of the factor the effect is most evident.

We will now construct the main effects graph and use the averages for each level, as follows

$$\overline{y_{i..}} =\frac{1}{b~r}\sum_{j=1}^{b}\sum_{k=1}^{r}y_{ijk}~~~{e}~~~\overline{y_{.j.}}=\frac{1}{a~r}\sum_{i=1}^{a}\sum_{k=1}^{r}y_{ijk}.$$

After carrying out the calculations, we obtain the following results:

Material*Profile Level Lower Limit Effect for average Upper Limit
BUT 15 Baseline 0.7329 1.7729 2.8128
BUT 17 Baseline 2.7143 3.7543 4.7942
BUT 15 Ramp and Pad #1 2.6786 3.7186 4.7585
BUT 17 Ramp and Pad #1 6.2901 7.33 8.3699
BUT 15 Ramp and Pad #2 2.8172 3.8571 4.8971
BUT 17 Ramp and Pad #2 3.4772 4.5171 5.5571

Table 9.7.2: Confidence Interval for Effects.

Figura9.7.2

Figure 9.7.2: Main Effects Chart.

We note in Figure 9.7.2 that the Material and Profile factor levels do not show the same behavior, indicating that their change influences the measurement.

Model for the data

As part of the data analysis, the adjustment of a model. This model can be defined as:

$$y_{ijk} = \mu + \alpha_i + \beta_j + \tau_{ij} + \varepsilon_{ijk}~~~~~~~~\begin{cases} i = 1, 2 ~~~ \hbox{Fator Material} \cr j = 1, 2, 3 ~~~ \hbox{Fator Perfil} \cr k = 1, \ldots, 7 ~~~ \hbox{Réplica}\end{cases}$$

restricted to

$$\alpha_{.}=\sum_{i=1}^{a}\alpha_i=0~~,~~\beta_{.}=\sum_{j=1}^{b}\beta_j=0~~,~~\tau_{.j}=\sum_{i=1}^{a}\tau_{ij}=0~~,~~\tau_{i.}=\sum_{j=1}^{b}\tau_{ij}=0.$$

  • $ y_{ijk} $ represents the $ k $-th reading in $ i $-th level of the Material factor and $ j $-th level of the Profile factor;
  • $ \mu $ is the overall average of the effects;
  • $ \alpha_i $ is the effect of the Material Factor;
  • $ \beta_j $ is the effect of the Profile Factor;
  • $ \tau_{ij} $ is the effect of the interaction between factors;
  • $ \varepsilon_{ijk} $ is the random error.

Thus, we obtain the following results:

G.L. Sum of Squares Medium Square Stat. F P-value
Profile 2 53.3682 26.6841 12.4329 0.0001
Material 1 45.6146 45.6146 21.2531 0
Waste 38 81.5578 2.1463

Table 9.7.3: ANOVA table.

Figura9.7.3

Figure 9.7.3: Probability Paper.

Application 2 - Influence on the measurement of a hole

An engine company is interested in the influence of Hardness (HB) and Tool factors on the measurement of a hole. Three types of Tool are used: New, Half-life and Old, and two Hardness measures: 91 HB and 95 HB. The data collected in the experiment are in Table 9.7.4. The Measure variable is in the micron unit (1 micron is equivalent to 1 thousandth of a millimeter).

Measure Hardness Tool
18046,9 91 New
18046,9 91 New
18047 91 New
18047 91 New
18047,3 91 New
18047,3 91 New
18047 91 New
18047,1 91 New
18047 91 New
18046,9 91 New
18047,7 91 New
18047,7 91 New
18047,8 91 New
18047,6 91 New
18047,8 91 New
18047,6 91 New
18047,7 91 New
18047,7 91 New
18047,5 91 New
18047,4 91 New
18048 91 Half-life
18047,8 91 Half-life
18047,8 91 Half-life
18047,5 91 Half-life
18047,9 91 Half-life
18047,5 91 Half-life
18047,6 91 Half-life
18047,6 91 Half-life
18047,7 91 Half-life
18047,4 91 Half-life
18048,4 91 Half-life
18048,2 91 Half-life
18048,1 91 Half-life
18048,4 91 Half-life
18047,9 91 Half-life
18047,9 91 Half-life
18047,9 91 Half-life
18048 91 Half-life
18047,8 91 Half-life
18047,9 91 Half-life
18048 91 Half-life
18047,8 91 Half-life
18048,1 91 Half-life
18048,2 91 Half-life
18047,9 91 Half-life
18047,7 91 Half-life
18048,1 91 Half-life
18047,8 91 Half-life
18047,8 91 Half-life
18048 91 Half-life
18047,9 91 old
18047,4 91 old
18047,9 91 old
18047,7 91 old
18047,7 91 old
18047,6 91 old
18047,8 91 old
18047,8 91 old
18047,6 91 old
18047 91 old
18048,4 91 old
18048,6 91 old
18048,3 91 old
18048,3 91 old
18048,2 91 old
18048,3 91 old
18048,3 91 old
18048,4 91 old
18048,2 91 old
18048,4 91 old
18047,7 95 Half-life
18047,7 95 Half-life
18047,9 95 Half-life
18047,2 95 Half-life
18047,5 95 Half-life
18047,8 95 Half-life
18047,7 95 Half-life
18047,7 95 Half-life
18047,6 95 Half-life
18047,2 95 Half-life
18047,6 95 old
18047,9 95 old
18047,8 95 old
18047,8 95 old
18047,8 95 old
18047,7 95 old
18047,8 95 old
18047,7 95 old
18047,9 95 old
18047,8 95 old
18048 95 old
18048,3 95 old
18048,2 95 old
18048,3 95 old
18048,4 95 old
18048,5 95 old
18048,3 95 old
18048,3 95 old
18048,3 95 old
18048,3 95 old

Table 9.7.4: Experiment data.

We will perform a Variance Analysis considering the Hardness and Tool factors.

To make notation easier, we will call Hardness (A) and Tool (B), so we have the ANOVA table:

The following table presents the Analysis of Variance (ANOVA) for the factors Factory, Machine and Interaction.

First, let’s build the interactions graph. For the interaction graph we need some auxiliary calculations, which are the averages $ y_{ij.} $ for $i = 1, 2$ and $j = 1, 2, 3$.

Thus, when we have Hardness of 91 HB, we have:

$$\overline{y_{11.}}=\frac{1}{r}\sum_{k=1}^{r}y_{11k}=\frac{18046,9+\dots+18048}{70}=\frac{1263343,4}{70}=18047,76$$

Dreza of 95 HB, we have:

$$\overline{y_{12.}}=\frac{1}{r}\sum_{k=1}^{r}y_{11k}=\frac{18047,7+\dots+18048,3}{30}=\frac{541436,7}{30}=18047,89.$$

Likewise, we have:

$ \overline{y_{21.}}=18047,82, $$ \overline{y_{22.}}=18047,34 $ and $ \overline{y_{23.}}= 18048,01. $

With this data we can build the graph, obtaining Figure 4.2.1.

Figura9.7.4

Figure 9.7.4: Interaction graph.

We observe in the graph that there is a change in behavior at the hardness level of 95 HB. Thus, we can have evidence of interaction in the level of hardness.

Now, we will make a main effects graph to help us detect the effect of each factor individually, that is, check at which level of the factor the effect is most evident.

We will now construct the main effects graph and use the averages for each level, as follows

$$\overline{y_{i..}} =\frac{1}{b~r}\sum_{j=1}^{b}\sum_{k=1}^{r}y_{ijk}~~~ \hbox{e} ~~~\overline{y_{.j.}}=\frac{1}{a~r}\sum_{i=1}^{a}\sum_{k=1}^{r}y_{ijk}.$$

After carrying out the calculations, we obtain the following results:

Level Lower Limit Effect for average Upper Limit
91 18047.753 18047.8306 18047.9081
95 18047.6091 18047.732 18047.8549

Table 9.7.5: Hardness Effect Confidence Interval

Level Lower Limit Effect for average Upper Limit
Half-life 18047.7126 18047.8126 18047.9125
New 18047.1674 18047.3154 18047.4635
old 18047.9281 18048.0322 18048.1363

Table 9.7.6: Tool Effect confidence interval

Figura9.7.5

Figure 9.7.5: Main Effects Chart.

We note in Figure 9.7.5 that the Hardness and Tool factor levels do not show the same behavior, indicating that their change influences the measurement.

Model for the data

As part of the data analysis, the adjustment of a model. This model can be defined as:

$$y_{ijk} = \mu + \alpha_i + \beta_j + \tau_{ij} + \varepsilon_{ijk}~~~~~~~~\begin{cases} i = 1, 2 ~~~ \hbox{Fator Dureza} \cr j = 1, 2, 3 ~~~ \hbox{Fator Ferramenta} \cr k = 1, 2 ~~~ \hbox{Réplica} \end{cases}$$

restricted to

$$\alpha_{.}=\sum_{i=1}^{a}\alpha_i=0~~,~~\beta_{.}=\sum_{j=1}^{b}\beta_j=0~~,~~\tau_{.j}=\sum_{i=1}^{a}\tau_{ij}=0~~,~~\tau_{i.}=\sum_{j=1}^{b}\tau_{ij}=0.$$

  • $ y_{ijk} $ represents the $ k $-th reading in $ i $-th level of the Hardness factor and $ j $-th level of the Tool factor;
  • $ \mu $ is the overall average of the effects;
  • $ \alpha_i $ is the effect of the Hardness Factor;
  • $ \beta_j $ is the effect of the Tool Factor;
  • $ \tau_{ij} $ is the effect of the interaction between factors;
  • $ \varepsilon_{ijk} $ is the random error.

Thus, we obtain the following results:

G.L. Sum of Squares Medium Square Stat. F P-value
Hardness 1 0.3395 0.3395 3.5054 0.0642
Tool 2 5.7895 2.8947 29.8913 0
Hardness:Tool 1 0.481 0.481 4.9665 0.0282
Waste 95 9.2 0.0968

Table 9.7.7: ANOVA table

GL Sum of Squares Medium Square Stat. F P-value
Hardness 1 0.3395 0.3395 3.5054 0.0642
Tool 2 5.7895 2.8947 29.8913 0
Hardness:Tool 1 0.481 0.481 4.9665 0.0282
Waste 95 9.2 0.0968
Lack of Adjustment 0 0
Pure Error 95 9.2 0.0968

Table 9.7.8: Lack of Fit Test.

Figura9.7.6

Figure 9.7.6: Probability Paper.

Application 3 - Credit Card Rewards Program

In a satisfaction survey, 10 customers gave their opinion on 4 credit card rewards programs, issuing a rating for each program. The programs evaluated were:

  • Rewards program: customers compete for weekly and monthly cash prizes;
  • Shopping incentive program: accumulated points that transform into free purchases in large commercial chains;
  • Travel incentive program: purchases become points and entitle you to airline tickets;
  • 0km car incentive program: purchases are transformed into discounts on the purchase of a 0km car.
Programs Notes
1 8
1 9
1 8
1 10
1 7
1 8
1 9
1 9
1 8
1 9
2 7
2 6
2 8
2 8
2 7
2 6
2 7
2 8
2 9
2 6
3 5
3 8
3 6
3 9
3 6
3 7
3 8
3 6
3 5
3 8
4 7
4 6
4 5
4 8
4 5
4 7
4 7
4 6
4 5
4 6

Table 9.7.9: Results of satisfaction surveys

First, we will make the main effects graph and use the averages for each level, as follows

$$\overline{y_{i.}} =\frac{\displaystyle\sum_{j=1}^{n_i}y_{ij}}{n_i}.$$

This way we will calculate the average at each level of the Programs factor:

$$\overline{y_{1.}} =\frac{8+\dots+9}{10}=8,5~~ \hbox{e} ~~~\overline{y_{2.}} =\frac{7+\dots+6}{10}=7,2.$$

$$\overline{y_{3.}} =\frac{5+\dots+8}{10}=6,8~~ \hbox{e} ~~~\overline{y_{4.}} =\frac{7+\dots+6}{10}=6,2.$$

After carrying out the calculations, we obtain the following results:

Programs Average Standard Deviation Lower Limit Upper Limit
1 8.5 1.0967 7.7966 9.2034
2 7.2 1.0967 6.4966 7.9034
3 6.8 1.0967 6.0966 7.5034
4 6.2 1.0967 5.4966 6.9034

Table 9.7.10: Confidence Interval of Means

Figura9.7.7

Figure 9.7.7: Confidence Interval Chart of means.

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} $$

where, 1=1,…,ni and i = 1,2,…,k.

$y_{ij}$ = j-th observation of level i of factor A;

$μ$ = overall average of the data;

$ \alpha_i $ = effect of factor level i;

$ε_{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 the Program factor,

$ \overline{y_{i.}}=\cfrac{\displaystyle\sum_{j=1}^{n_{i}} y_{ij}}{\displaystyle n_{i}} $: average of observations at level i of the Program factor,

$ y_{..}=\displaystyle\sum_{i=1}^{n} \sum_{j=1}^{n_{i}}y_{ij} $: sum of all observations, and

$ \overline{y_{..}}=\frac{\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 number of observations.

Thus, we obtain the following results:

G.L. Sum of Squares Medium Square State. F P-value
Programs 3 28.475 9.4917 7.8915 0.0004
Waste 36 43.3 1.2028

Figure 9.7.11: One-way ANOVA table.

Adopting a significance level of 0.05 (5%), we rejected the null hypothesis, that is, we detected a significant difference between the scores depending on the credit card rewards program.

Figura9.7.8

Figure 9.7.8: Residue Chart.

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.17) we do not reject the hypothesis of normality of the residuals.

Now, we will perform a multiple comparison of the levels of the reward program factor using the HSU test.

Level Average Lower Limit Upper Limit
1 1.3 0 2.347
2 -1.3 -2.347 0
3 -1.7 -2.747 0
4 -2.3 -3.347 0

Table 9.7.12: HSU TEST: Bigger is better

Figura9.7.9

Figure 9.7.9: Confidence Intervals

As the confidence interval for program 1 has large parts of positive values, we can say that it is the best among the others.

Application 4 - Effect on tilapia fattening

A company wants to test the effect of two different diets on the fattening performance of tilapia. The fish were randomly divided into 40 cages and placed on a diet for 90 days.

  • Feed: Feed A and feed B;
  • Size: Small fish and large fish;
  • Density: Cages with 102 (1) and 150 (2) fish.

The cages were set up with two different quantities of fish, consider: density 1 – 102 fish; density 2 – 150 fish.

The response variable is the average weight per fish gained during the 90 days in which they were subjected to the diet.

Breed Size Density Average_weight
A Small 1 444,4
B Small 1 326,5
B Big 1 371,2
A Big 1 439,3
B Small 2 364,6
A Small 2 432,0
A Big 2 517,8
B Big 2 451,5
A Small 1 447,6
B Small 1 350,8
B Big 1 407,6
A Big 1 455,6
B Small 2 388,0
A Small 2 472,6
A Big 2 566,0
B Big 2 435,7
A Small 1 412,2
B Small 1 366,5
B Big 1 379,0
A Big 1 488,6
B Small 2 395,1
A Small 2 544,2
A Big 2 500,6
B Big 2 497,0
A Small 1 453,2
B Small 1 327,3
B Big 1 395,4
A Big 1 470,6
B Small 2 413,1
A Small 2 475,5
A Big 2 553,1
B Big 2 427,4
A Small 1 453,7
B Small 1 381,8
B Big 1 398,5
A Big 1 449,3
B Small 2 437,9
A Small 2 484,5
A Big 2 493,2
B Big 2 472,3

Table 9.7.13: Average weight of tilapia according to diet

Firstly, in order to better understand the behavior of the data under study, we will combine all the factors, thereby identifying that there are 8 possible combinations and 5 replications.

Figura9.7.10

Figure 9.7.10: Factor Combinations

To better understand the data, we will perform a graphical analysis, this way we will be able to check graphically if there is a difference between the rations.

Figura9.7.11

Figure 9.7.11: Ration Factor Boxplot

Next, we will graph interactions in order to verify their existence.

Figura9.7.12

Figure 9.7.12: Interaction Chart

Now, we will make a main effects graph to help us detect the effect of each factor individually, that is, check at which level of the factor the effect is most evident.

Figura9.7.13

Figure 9.7.13: Main Effects Chart

Model for the data

In this analysis we consider Ration, Size and Density as input variables and Average weight as the output variable. This way we obtain the model below:

$$y_{ijlk}=\mu+\alpha_i+\beta_j+\gamma_l+\alpha\beta_{ij}+\alpha\gamma_{il}+\beta\gamma_{jl}+\alpha\beta\gamma_{ijl}+\varepsilon_{ijlk}~~~~~~~~\begin{cases} i = 1, 2,…, a ~~~ \hbox{Fator Ração} \cr j = 1, 2, …, b ~~~ \hbox{Fator Tamanho} \cr l = 1, 2, …, c ~~~ \hbox{Fator Densidade} \cr k = 1, 2, …, r~~~ \hbox{Réplica} \end{cases}$$

Where:

$ \mu $ is the general average;

$ \alpha_i $ is the effect of the Ration Factor;

$ \beta_j $ is the effect of the Size Factor;

$ \gamma_l $ is the effect of the Density Factor;

$ \alpha\beta_{ij} $ is the effect of the interaction between the factors Feed and Size;

$ \alpha\gamma_{il} $ is the effect of the interaction between the factors Ration and Density;

$ \beta\gamma_{jl} $ is the effect of the interaction between the factors Size and Density;

$ \alpha\beta\gamma_{ijl} $ is the effect of the interaction between the factors Ration, Size and Density;

$ \varepsilon_{ijlk} $ is the random error.

We are interested in verifying whether the two different types of feed have a similar impact on the performance of tilapia during fattening. Therefore, based on the proposed model, we define the hypotheses as:

$$ \begin{cases} H_0: \hbox{As rações são iguais} \cr H_1: \hbox{As rações são diferentes}\end{cases}$$

Thus we obtain the following results:

G.L. Sum of Squares Medium Square Stat. F P-value
Feed 1 61371.556 61371.556 86.2741 0
Size 1 15928.081 15928.081 22.3912 0
Density 1 30415.225 30415.225 42.7567 0
Race:Size 1 720.801 720.801 1.0133 0.3217
Ratio:Density 1 70.225 70.225 0.0987 0.7554
Size:Density 1 1166.4 1166.4 1.6397 0.2096
Race:Size:Density 1 46.656 46.656 0.0656 0.7995
Waste 32 22763.38 711.3556

Table 9.7.14: ANOVA table

We can notice that the interactions are not significant, as had already been observed through graphical analysis, so we must repeat the process, now disregarding the interactions.

G.L. Sum of Squares Medium Square Stat. F P-value
Feed 1 61371.556 61371.556 89.2048 0
Size 1 15928.081 15928.081 23.1518 0
Density 1 30415.225 30415.225 44.2091 0
Waste 36 24767.462 687.9851

Table 9.7.15: ANOVA table without interactions

We will check whether the assumptions required for ANOVA are met.

Figura9.7.14

Figure 9.7.14: Waste Analysis

We will then calculate the 95% confidence interval for the mean of the ith factor level.

Level Lower Limit Effect for average Upper Limit
A 465.8051 477.7 489.5949
B 387.4651 399.36 411.2549

Table 9.7.16: Confidence interval for the Ration Effect

Level Lower Limit Effect for average Upper Limit
Big 446.5901 458.485 470.3799
Small 406.6801 418.575 430.4699

Table 9.7.17: Size Effect Confidence Interval

Level Lower Limit Effect for average Upper Limit
1 399.0601 410.955 422.8499
2 454.2101 466.105 477.9999

Table 9.7.18: Density Effect Confidence Interval

Now we will calculate the 95% confidence interval for the difference in the means in the Ration factor.

$$\overline{y_{i…}}-\overline{y_{l…}}-t_{(1-{\frac{\alpha}{2} };abc(r-1))}*\sqrt{\frac{2*QME}{abr} }~~\leq~~\mu_{i…}-\mu_{l…}~~\leq~~\overline{y_{i…}}-\overline{y_{l…}}+t_{(1-{\frac{\alpha}{2} };abc(r-1))}*\sqrt{\frac{2*QME}{abr}}$$

$$477,69-399,36-t_{(0,975;32)}*\sqrt{\frac{2*687,95}{20} }~~\leq~~\mu_{1}-\mu_{2}~ \leq ~477,69-399,36-t_{(0,975;32)}*\sqrt{\frac{2*687,95}{20}}$$

$$61,44~~\leq~~\mu_{1}-\mu_{2}~ \leq ~95,22$$

Where:

$ \mu_{1}= $ Overall data average + effect of level 1 of the Ration factor

$ \mu_{2}= $ Overall data average + effect of level 2 of the Ration factor

Through the results presented, it is possible to note that the feed provides a difference in the performance of tilapia during fattening, with the difference in weight varying between 61.44 and 95.22.

Finally, based on the analyzes presented, we can state that:

  • The feed that provides the best performance when fattening tilapia is Ration A.

Application 5 - Comparison of dog foods

A company wants to test the difference between two types of dog food. 24 animals followed the diet and were evaluated for 6 days. In the first 3 days one type of food was offered and in the last 3 days another type.

animal Breed Sequence Period Consumed
1 1 AB 1 99,65
2 1 AB 1 43,97
3 1 AB 1 68,65
4 1 AB 1 77,50
5 1 AB 1 100,00
6 1 AB 1 100,00
7 1 AB 1 97,47
8 1 AB 1 29,58
9 1 AB 1 100,00
10 1 AB 1 100,00
11 1 AB 1 100,00
12 1 AB 1 31,62
13 2 BA 1 100,00
14 2 BA 1 45,73
15 2 BA 1 61,56
16 2 BA 1 99,40
17 2 BA 1 36,77
18 2 BA 1 100,00
19 2 BA 1 100,00
20 2 BA 1 100,00
21 2 BA 1 89,78
22 2 BA 1 74,10
23 2 BA 1 37,09
24 2 BA 1 36,08
1 2 AB 2 100,00
2 2 AB 2 0,00
3 2 AB 2 44,97
4 2 AB 2 43,15
5 2 AB 2 100,00
6 2 AB 2 100,00
7 2 AB 2 100,00
8 2 AB 2 16,49
9 2 AB 2 100,00
10 2 AB 2 100,00
11 2 AB 2 100,00
12 2 AB 2 19,10
13 1 BA 2 0,00
14 1 BA 2 80,80
15 1 BA 2 66,98
16 1 BA 2 100,00
17 1 BA 2 16,94
18 1 BA 2 100,00
19 1 BA 2 100,00
20 1 BA 2 100,00
21 1 BA 2 100,00
22 1 BA 2 75,09
23 1 BA 2 28,18
24 1 BA 2 13,07

Table 9.7.19: Result of animal diets

The statistical model for this planning is

$$y_{ijk} = \mu + S_{ik} + \pi_j + \tau_d{}_{[i,j]} +\lambda_d{}_{[i,j-1]}~+~ \varepsilon_{ijk} ~~~~~\begin{cases} i = 1, \cdots, s~~ \hbox{(Sequência)} \cr j = 1, \cdots, p~~ \hbox{(Período)} \cr k = 1, \cdots,n_i~~ \hbox{(Indivíduo)} \end{cases}$$

Where:

$ y_{ijk} $ represents the response of the kth individual in the ith sequence in the jth period;

$ \mu $ is a general average;

$ S_{ik} $ is the random effect of the kth individual in the sequence $ i $;

$ \pi_j $ is the period effect $ j $, with $ \sum_{j=1}^{p}\pi_j=0 $;

$ \tau_{d[i,j]} $ is the direct effect of the treatment administered during the period $ j $ of the sequence $ i $ (Effect of Feed), with $ \sum\tau_d{}_{[i,j]}=0 $;

$ \lambda_{d[i,j-1]} $ is the direct effect of the treatment administered during the period $ j-1 $ of the sequence $ i $ (Carry-over Effect), with $ \sum \tau_{d[i,j-1]}=0 $;

$ \varepsilon_{ijk} $ is the random error for the kth individual in the jth period in the ith sequence.

We are interested in checking whether two foods developed for dogs differ in terms of consumption. Therefore, based on the proposed model, we define the hypotheses as:

$$ \begin{cases} H_0: F_A = F_B \cr H_1: F_A \neq F_B \end{cases} ~~~~ \hbox{Para testar o efeito da ração}$$

Considering the model and the hypotheses presented, we calculated:

$$SQ_{\hbox{carry-over}}=\frac{2*12*12}{(12+12)}\left(73,84-69,23\right)^2=255,02$$

$$SQ_{\hbox{inter}}=291538,4-245888,8=45649,6$$

$$SQ_{\hbox{ração}}=\frac{12*12}{2(12+12)}\left(79,04-68,64-73,38+65,09\right)^2=13,31$$

$$SQ_{\hbox{período}}=\frac{12*12}{2(12+12)}\left(79,04-68,64+73,38-65,09\right)^2=1047,01$$

$$SQ_{\hbox{intra}}=299726-291538,4-13,31-1047,01=7127,332$$

$$QM_{\hbox{carry-over}}=\frac{255,02}{1}=255,02$$

$$QM_{\hbox{inter}}=\frac{45649,6}{12+12-2}=2074,98$$

$$QM_{\hbox{ração}}=\frac{13,31}{1}=13,31$$

$$QM_{\hbox{período}}=\frac{1047,01}{1}=1047,01$$

$$QM_{\hbox{intra}}=\frac{7127,332}{12+12-2}=323,96$$

$$F_0=\frac{255,02}{2074,98}=0,1229$$

$$F_0=\frac{13,31}{323,96}=0,0410$$

$$F_0=\frac{1047,01}{323,96}=3,2318$$

Replacing the results found in the ANOVA table, we have:

Factor Degrees of Freedom Sum of Squares Medium Squares F
between
carry-over 1 255,02 255,02 0,12
inter 22 45649,6 2074,98
inside
feed 1 13,31 13,31 0,04
period 1 1047,01 1047,01 3,23
intra 22 7127,33 323,96
Total 47

Table 9.7.20: ANOVA Table

We calculate the confidence interval for $ \mu_l $.

For $ l = A, B $ we have to:

  • For $ \mu_A $.

We know that $ \bar{y}_A=72,06 $, $ n_1=12 $, $ n_2=12 $, $ QM_{\hbox{intra}}=323,96 $ and for $ \alpha=5 \char37 $ we have to $ t_{(\frac{\alpha}{2},22)}=2,074 $. So the range is

$$\left(64,44;79,68\right)$$

  • For $ \mu_T $.

We know that $ \bar{y}_T =71,01 $, $n_1=12 $, $n_2=12 $, $ QM_{\hbox{intra}}=323,96 $ and for $ \alpha=5 \char37 $ we have to $ t_{(\frac{\alpha}{2},22)}=2,074 $. So the range is

$$\left(63,39;78,63\right)$$

Now we calculate the confidence interval for $ (F_A-F_B) $.

We know that $ \bar{y}_A=72,06 $, $ \bar{y}_B=71,01 $, $ n_1=12 $, $ n_2=12 $, $ QM_{\hbox{intra}}=323,96 $ and for $ \alpha=5 \char37 $ we have to $ t_{(\frac{\alpha}{2},22)}=2,074 $. So the range is

$$\left(-6,57;8,67\right)$$

↑