Analysis of Variance (ANOVA)
- It is a statistical method used to analyze the differences between the means of two or more
groups or treatments.
: For example, you can use ANOVA to compare the effects of different treatments, levels, or
conditions on a continuous outcome variable. ANOVA can also handle more complex designs, such as
factorial, nested, repeated measures, or mixed ANOVA, where you have more than one factor or
source of variation.
- It is used to compare treatments, analyze factors impact on a variable, or compare means
across multiple groups.
- It is often used to determine whether there are any statistically significant differences
between the means of different groups
When to Use ANOVA?
- You should use Analysis of Variance, when you want to statistically analyze the differences
between the means of two or more groups.
: Analysts use the ANOVA test to determine the influence that independent variables have on the
dependent variable in a regression study. ANOVA is mildly similar to T-test, except ANOVA is used for
comparing three or more groups with smaller samples. There are two types of ANOVA: One-Way
Analysis Variance and Two-Way Analysis Variance.
: In One Way ANOVA, there is 1 independent variable and 1 dependent variable. In Two Way ANOVA,
there are 2 independent variables and 1 dependent variable.
Differentiating the Two Types of ANOVA Tests
: For example, ‘Age’ as an independent variable may have multiple groups:
12-18 years
19-26 years
27-35 years
Above 36 years
: For example, in addition to ‘Age’, ‘Gender’ may have the following multiple groups:
Male
Female
Prefer not to say
When to Use One-Way ANOVA?
- One-way ANOVA is used when you have one independent variable with at least three levels
(groups) and one dependent variable. The dependent variable is typically quantitative,
meaning it's numerical data. You would use this test to see if the levels of the independent
variable have an effect on the dependent variable.
: For example: You want to know whether or not the type of tea a person drinks correlates with their
weight. So, you pick a sample out of a population of tea drinkers and group them into their
respective teas that they prefer, say: Chamomile, Green tea, Earl Grey and no tea at all.
: You are comparing four groups: the Chamomile drinkers, the green tea drinkers, the Earl Grey
drinkers and the non-drinkers, therefore you will be using Analysis of Variance. And because there is
only 1 independent variable, you will be using One Way ANOVA.
When to Use Two-Way ANOVA?
- Two-way is used when you have two independent variables and one dependent variable.
This allows you to analyze the individual and interactive effects of both independent
variables on the dependent variable.
: Let's say, you want to know whether or not the type of tea a person drinks and their intensity of
their exercise correlate with their weight. So, you pick a sample out of a population of tea drinkers
and group them into their respective teas that they prefer, say: Chamomile, Green tea, and Earl Grey
and tea at all. And then form subgroups based on their intensity of exercise: High intensity of
exercise, intermediate intensity of exercise and no exercise at all.
: Now, there are 2 independent variables and 1 dependent variable, therefore you'll be using Two
Way ANOVA.
ANOVA Formula
F = ANOVA coefficient
MST = Mean sum of squares due to treatment
MSE = Mean sum of squares due to error
One-Way ANOVA Test Table
Two-Way ANOVA Test Table
Two Types of ANOVA Tests:
One-Way Analysis of Variance
- A one-way ANOVA (“analysis of variance”) compares the means of three or more
independent groups to determine if there is a statistically significant difference
between the corresponding population means.
Example:
Suppose we want to know whether or not three different exam prep programs lead to
different mean scores on a certain exam. To test this, we recruit 30 students to participate in
a study and split them into three groups.
The students in each group are randomly assigned to use one of the three exam prep
programs for the next three weeks to prepare for an exam. At the end of the three weeks, all
of the students take the same exam.
Steps on how to solve the problem:
1. Define the Null and Alternative Hypotheses
2. State Alpha
3. Calculate the Degrees of Freedom
4. State Decision Rule
5. Calculate Test Statistic
6. State Results
7. State Conclusion
Example:
Researchers want to test a new anti-anxiety medication. They split participants into three
conditions (0mg, 50mg, and 100mg), then ask them to rate their anxiety level on a scale of 1-
10. Are there any differences between the three conditions using alpha = 0.05?
Steps on how to solve the problem:
1. Define the Null and Alternative Hypotheses
2. State Alpha
3. Calculate the Degrees of Freedom
4. State Decision Rule
5. Calculate Test Statistic
6. State Results
7. State Conclusion
Example:
A pharmaceutical company conducts an experiment to test the effect of a new cholesterol
medication. The company selects 15 subjects randomly from a larger population. Each
subject is randomly assigned to one of three treatment groups. Within each treatment
group, subjects receive a different dose of the new medication. In Group 1, subjects receive 0
mg/day; in Group 2, 50 mg/day; and in Group 3, 100 mg/day.
Steps on how to solve the problem:
1. Calculate the group means and the overall mean.
2. Calculate the regression sum of squares (SSR).
3. Calculate the error sum of squares (SSE).
4. Calculate the total sum of squares (SST).
5. Fill in the ANOVA table.
6. Interpret the results.
Two-Way Analysis of Variance
- A two-way ANOVA is used to determine whether or not there is a statistically
significant difference between the means of three or more independent groups that
have been split on two factors.
Example:
Suppose a botanist wants to know if plant growth is influenced by sunlight exposure and
watering frequency. She plants 40 seeds and lets them grow for one month under different
conditions for sunlight exposure and watering frequency.
After one month, she records the height of each plant. There were five plants grown under
each combination of conditions. For example, there were five plants grown with daily
watering and no sunlight and their heights after two months were 4.8 inches, 4.4 inches, 3.2
inches, 3.9 inches, and 4.4 inches:
Steps on how to solve the problem:
1. Calculate Sum of Squares for First Factor (Watering Frequency)
2. Calculate Sum of Squares for Second Factor (Sunlight Exposure)
3. Calculate Sum of Squares Within (Error)
4. Calculate Total Sum of Squares
5. Calculate Sum of Squares Interaction
6. Fill in ANOVA Table
7. Interpret the results
Example:
Suppose we want to explore how a detergent and a particular water temperature affect the
dirt removal of laundry. We also want to check if the combined effect of detergent and water
temperature can affect the dirt removal. Here, we have two types of detergents, namely x
and y. We also use three types of water temperatures, the levels of which are cold, warm,
and hot. Here the detergent and the water temperature are independent variables, while the
amount of dirt removed (D) is the dependent variable.
Steps on how to solve the problem:
1. Calculate Sum of Squares for First Factor (Type of Detergent)
2. Calculate Sum of Squares for Second Factor (Water Temperature)
3. Calculate Sum of Squares Within (Error)
4. Calculate Total Sum of Squares
5. Calculate Sum of Squares Interaction
6. Fill in ANOVA Table
7. Interpret the results
One-Way ANOVA Assumptions and Limitations
Normality – that each sample is taken from a normally distributed population
Sample independence – that each sample has been drawn independently of the other
samples
Variance equality – that the variance of data in the different groups should be the same
Your dependent variable – here, “weight”, should be continuous – that is, measured on a
scale which can be subdivided using increments (i.e. grams, milligrams)
Two-Way ANOVA Assumptions and Limitations
Your dependent variable – here, “weight”, should be continuous – that is, measured on a
scale which can be subdivided using increments (i.e. grams, milligrams)
Your two independent variables – here, “month” and “sex”, should be in categorical,
independent groups.
Sample independence – that each sample has been drawn independently of the other
samples
Variance Equality – That the variance of data in the different groups should be the same
Normality – That each sample is taken from a normally distributed population
REFERENCES:
https://www.wallstreetmojo.com/anova/
https://www.investopedia.com/terms/a/anova.asp
https://www.projectguru.in/difference-between-one-way-and-two-way-anova/
https://www.technologynetworks.com/informatics/articles/
https://www.statology.org/one-way-anova-by-hand/
http://www.statisticslectures.com/topics/onewayanova/
https://www.statology.org/two-way-anova-by-hand/
https://www.brainkart.com/article/Two-Way-ANOVA_39242/
https://www.wallstreetmojo.com/two-way-anova/
https://www.chegg.com/homework-help/questions-and-answers/