To get the best deal on Tutoring, call 1-855-666-7440 (Toll Free)
Top

Two-Way Analysis of Variance

Analysis of variance is used to analyze the difference between the group means and in other associated procedures of a statistical model. The setting of analysis of variance is observed variance in which a particular variable is divided into many small components which is again attributed to different sources of variation.  

Related Calculators
Calculate Variance Dimensional Analysis
Variance and Standard Deviation Calculator Chi Square Analysis Calculator
 

Definition

Back to Top
Analysis of variance gives us a view in statistical way to show whether the means of several groups are equal or not. It also generalizes the t – test for more than one group. 
If we do two multiple sample t – test then it can increases the chances of having a type l error in the result. Therefore analysis of variance is always very useful to compare three or more than three means groups which is significant for statistical.
Two ways analysis of variance is just an extension of one way analysis of variance in which we test the effect of different categorical independent variable on one dependent variable. We use two ways analysis of variance when there is more than one independent variable and the observation is for every single independent variable. Two ways analysis of variance is also used to observe multiple independent variables. By using two ways analysis of variance we cannot only determine the contributed effect of each independent variable but we can also learn that if there is a important interaction between the independent variable.
There are some assumptions which one has to follow when using two ways analysis of variance. The assumptions are as follows:

1) We should normally distribute the errors of populations from which we obtained the sample.
2) If the sampling is done correctly then the observation must be independent for within and for between the groups.
3) We should make sure that the variances come to be equal among the population. The data can be nominal or it can be interval.
4) When an experiment gives us a quantitative outcome and two of its categorical explanatory variables defined in such a manner that each unit can be exposed to any combined level of an explanatory variable and the other level to the other explanatory level then the most commonly used analysis is two ways variance of analysis. 
Two ways analysis of variance consist of two possible mean models they are the additive model and the interaction model. In the first model which is additive model it is assumed that the effect on the outcome of particular level change for one explanatory level. It does not depend on the other level of explanatory variable. In the interaction model of two ways analysis of variance the change of one explanatory variable does effect on the other level of explanatory variable. In this model the one variable depend on the other.

Example

Back to Top
Example:
Let us assume that you want to calculate whether a particular brand of shower gel used and the temperature affects the amount of foam that is created. Suppose we buy two different brand of shower gels: “Super” and “Best”, and choose three different temperature levels of water: “cold”, “warm”, and “hot”. Now gather 6 people and assign each one the combination of  “Super” and “Best” gel and “cold”,”warm”, and “hot” water. We are interested in testing Null Hypotheses.
H0D : The amount of foam created does not depend on the type of gel
H0T : The amount of foam created does not depend on temperature
One says the experiment has two factors (The Factor Gel, The Factor Temperature) at, a = 2 (Super and Best) and b = 3(cold, warm and hot) levels. Thus there are a * b = 3 × 2 = 6 different combinations of gel and temperature. With each combination you wash r = 4 times. ‘r’ is called the number of replicates which sums up to n = a * b * r = 24 washes in total.
The amounts Y$_{ijk}$ of foam created when washing small portion, k (k = 1, 2, 3, 4) with gel, i (i = 1, 2) at temperature j (j = 1, 2, 3) are recorded in Table 1.

  Cold
Warm
Hot
Super
 4, 5, 6, 5  7, 8, 9, 12 10, 12, 11, 9
 Best 6, 6, 4, 4 13, 15, 12, 12
 12, 13, 10, 13

Solution:
   Cold Warm
Hot
mD
Super
 4, 5, 6, 5  7, 8, 9, 12  10, 12, 11, 9  8
 Best 6, 6, 4, 4
 13, 15, 12, 12   12, 13, 10, 13  10
mT  5 11
11
9


•    Calculating S Swithin and dfwithin

S Swithin = $\sum $(i = 1)2 $\sum $(j = 1)3 $\sum $(k = 1)4 (Yijk – Yij)2

= (4 – 5)2 + (5 – 5)2 + (6 – 5)2 + (5 – 5)2 + (7 – 9)2 + (9 – 9)2 + (8 – 9)2 + (12 – 2)2     + ….. + (12 – 12)2 + (13 – 12)2 +(10 – 12)2 + (13 – 12)2

= 38

dfwithin = (r – 1) a b = 3 X 2 X 3 = 18

M Swithin = S Swithin / dfwithinn = 2.1111

•    Calculating S Sgel and dfgel

S Sgel = r . b $\sum $(i = 1)2 (Yi – Y..)2

= 4 X 3 X [(8 – 9)2 + (10 – 9)2]

= 24

dfgel = a – 1 = 1

M Sgel = S Sgel/ dfgel= 24

•    Calculating S Stemperature and dftemperature

S Stemperature = r . a $\sum $(j = 1)33 (Y_j bar – Y_.. bar)2

= 4 X 2 [(5 – 9)^2 + (11 – 9)^2 + (11 – 9)^2]

= 162

dftemperature = b – 1 = 2

M Stemperature = S Stemperature / dftemperature= 162 / 2 = 81

•    Calculating S S_interaction and df_interaction

S S_interaction = r $\sum_{i=1}^{2}\sum_{j=1}^{3}(\bar{Y}_{ij}-\bar{Y}_{i}-\bar{Y}_{j}+\bar{Y}_{..})^{2}$

= 4 [(5 – 8 – 5 + 9)2 + (9 – 8 – 11 + 9)2 + (110 – 8 – 11 + 9)2 + … +
(12 – 11 – 10 + 9)2]

= 12
dfinteraction = (a – 1) X (b – 1) = 2

$M S_interaction$ = $\frac{S S_{interaction}}{ df_{interaction}}$ = $\frac{12 }{ 2}$ = 6

•    The F – test

M Sgel / M Swithin$\sim $ F(dfgel , dfwithin)

M Sinteraction / M Swithin$\sim $ F(dfinteraction, dfwithin)

M Stemperature / M Swithin $\sim $ F(dftemperature, dfwithin )

Related Topics
Math Help Online Online Math Tutor
*AP and SAT are registered trademarks of the College Board.