Understanding ANOVA:
Analysis of Variance
A powerful statistical method for comparing means across multiple groups,
determining if observed differences are statistically significant or merely due to
random chance.
Dr Ramya S ,E & C Dept, MIT, Manipal
What is ANOVA?
Definition Purpose Approach
ANOVA (Analysis of Variance) is a Used when comparing three or more Compares variability within groups to
statistical test used to analyze groups to determine if at least one variability between groups using the F-
differences among group means in a group mean differs significantly from test statistic.
sample. others.
ANOVA helps researchers determine whether to reject the null hypothesis that all group means are equal.
Dr Ramya S ,E & C Dept, MIT, Manipal
ANOVA (Analysis of Variance):
✓Used to compare the means of three or more groups.
✓The ANOVA test applies when there are more than two
independent groups.
✓The goal of the ANOVA test is to check for variability
within the groups as well as the variability among the
groups.
•One-Way ANOVA: Compares the means of groups based
on one independent variable.
•Two-Way ANOVA: Compares the means of groups based
on two independent variables.
Dr Ramya S ,E & C Dept, MIT, Manipal
Types of ANOVA Tests
One-Way ANOVA Two-Way ANOVA
• Has only one independent variable • Has two independent variables
• Compares means across 3+ groups • Tests main effects of each variable
• Example: Testing if three types of tea (green, earl grey, • Tests interaction between variables
jasmine) result in different mean weight loss • Example: Testing if income and gender interact to affect
anxiety levels at job interviews
Dr Ramya S ,E & C Dept, MIT, Manipal
ANOVA Test Example
• Suppose it needs to be determined if consumption of a certain type of tea will result
in a mean weight loss. Let there be three groups using three types of tea - green tea,
earl grey tea, and jasmine tea. Thus, to compare if there was any mean weight loss
exhibited by a certain group, the ANOVA test (one way) will be used.
• Suppose a survey was conducted to check if there is an interaction between income
and gender with anxiety level at job interviews. To conduct such a test a two-way
ANOVA will be used.
Dr Ramya S ,E & C Dept, MIT, Manipal
ANOVA Formula Components
Sum of Squares Between Groups Sum of Squares of Errors (SSE) Total Sum of Squares (SST)
(SSB)
Represents the total variation in the data
Measures the variability between the means Quantifies the variability within each group, from the overall mean. It's the sum of the
of different groups. It represents the often referred to as residual variance. It variance between groups and the variance
variance explained by the group differences. reflects the variation not explained by the within groups.
group differences.
SST = SSB + SSE
SSB = ∑nj(X̄j−X̄)² where X̄j is the mean of SSE = ∑∑(X−X̄j)² where X refers to each
the jth group, X̄ is the overall mean, and nj data point in the jth group
is the sample size of the jth group
Dr Ramya S ,E & C Dept, MIT, Manipal
ANOVA Table Structure
Source of Variation Sum of Squares Degrees of Mean Squares F Value
Freedom
Between Groups SSB df1 = k - 1 MSB = SSB / (k - 1)f = MSB / MSE
Error SSE df2 = N - k MSE = SSE / (N - k)
Total SST = SSB + SSE df3 = N - 1
Where k = number of groups and N = total number of observations across all groups
Dr Ramya S ,E & C Dept, MIT, Manipal
One-Way ANOVA Process
1 Set Up Hypotheses 2 Calculate Group Statistics
H₀: μ₁ = μ₂ = μ₃ = ... = μₖ (all means equal) Find mean for each group
H₁: At least one mean differs Calculate total mean
Compute SSB, SSE, and degrees of freedom
3 Determine Test Statistic 4 Make Decision
Calculate MSB = SSB/(k-1) Find critical value F(α, df1, df2)
Calculate MSE = SSE/(N-k) If F > critical value, reject H₀
Compute F = MSB/MSE Conclude means differ significantly
Dr Ramya S ,E & C Dept, MIT, Manipal
Limitations of One-Way ANOVA
Omnibus Test Limitation Need for Post Hoc Tests
One-Way ANOVA is an omnibus test, meaning it can To identify the specific group differences after a significant
only tell you if differences exist among groups, not where ANOVA result, you must conduct post hoc tests. These
those differences specifically lie. It doesn't pinpoint which follow-up tests (such as Tukey's HSD or Bonferroni
particular groups are significantly different from each correction) help to determine which precise pairs or
other. combinations of groups differ from each other.
Dr Ramya S ,E & C Dept, MIT, Manipal
Two-Way ANOVA: Examining Multiple Factors
Two Independent Variables Main Effects Interaction Effects
Two-Way ANOVA analyzes the This test assesses the individual impact of Crucially, Two-Way ANOVA determines
simultaneous influence of two distinct each independent variable on the dependent if the effect of one independent variable on
independent variables (factors) on a variable, examining if there's a significant the dependent variable changes across the
dependent variable, providing a difference across the levels of each factor levels of the other independent variable,
comprehensive understanding beyond when considered alone. revealing complex and nuanced
single-factor analysis. relationships.
For example, when examining income and gender affecting anxiety levels, Two-Way ANOVA can test three main hypotheses:
• H₀₁: All income groups have equal mean anxiety.
• H₀₂: All gender groups have equal mean anxiety.
• H₀₃: No interaction effect exists between income and gender regarding anxiety levels.
Dr Ramya S ,E & C Dept, MIT, Manipal
Two-Way ANOVA Assumptions
Independence Normality
Samples drawn from the population must be The population should be approximately normally
independent of each other distributed
Equal Sample Sizes Homogeneity of Variance
The groups should have the same sample size The population variances should be equal across all
groups
Violating these assumptions may lead to incorrect conclusions from the ANOVA test.
Dr Ramya S ,E & C Dept, MIT, Manipal
ANOVA in Practice: Key Takeaways
When to Use Decision Making Follow-Up Analysis
Use ANOVA when comparing means If F > critical value, reject the null After a significant ANOVA result,
across three or more groups to hypothesis that all means are equal. At conduct post hoc tests to identify
determine if observed differences are least one group differs significantly. which specific groups differ from each
statistically significant. other.
ANOVA provides a powerful framework for statistical analysis across multiple groups, helping researchers make data-driven decisions
while controlling for random variation.
Dr Ramya S ,E & C Dept, MIT, Manipal
One-way ANOVA
Scenario: A researcher wants to assess the impact of three different teaching methods
(Method A: Lecture, Method B: Interactive Workshop, Method C: Online Learning) on
student exam scores.
Independent Variable: Teaching Method (categorical with three levels).
Dependent Variable: Exam Scores (continuous).
Null Hypothesis (H₀): There is no significant difference in mean exam scores among the
three teaching methods.
Alternative Hypothesis (H₁): At least one group's mean exam score is significantly
different from the others.
Application: A one-way ANOVA test would be conducted to determine if the variation in
student exam scores can be attributed to the differences in teaching methods or if it is
likely due to random chance
Dr Ramya S ,E & C Dept, MIT, Manipal
Two-way ANOVA
Scenario: A company wants to examine the combined effects of different marketing
strategies (Strategy 1: Social Media, Strategy 2: Television Ads, Strategy 3: Online Banners)
and product types (Product A, Product B) on sales revenue.
Independent Variables:
•Marketing Strategy (categorical with three levels)
•Product Type (categorical with two levels)
Dependent Variable: Sales Revenue (continuous)
Hypotheses to be tested (using two-way ANOVA):
1.Does marketing strategy influence sales revenue?
2.Does product type affect sales revenue?
3.Does the effectiveness of the marketing strategy depend on the type of product being
sold? (Interaction Effect)
Dr Ramya S ,E & C Dept, MIT, Manipal
Application: A two-way ANOVA is used here to analyze the main effects of
each independent variable and the interaction effect between them. This
could reveal, for example, that social media marketing (Strategy 1) is more
effective for Product A, while television ads (Strategy 2) are better for
Product B.
Furthermore, ANOVA doesn’t provide information on the direction of
the relationship between the independent and dependent variables –
it only indicates if there is a statistically significant difference between
group means.
Dr Ramya S ,E & C Dept, MIT, Manipal
Other simple scenarios
•Comparing Crop Yields: A farmer wants to compare the yields of three different maize kinds.
•Medical Research: A doctor wants to check the efficacy of two medicines for a certain condition.
•Evaluating Employee Training: A business wants to examine how the level of employee training
impacts customer satisfaction ratings.
•Assessing Advertisement Impact: A marketing team wants to analyze the effectiveness of
various advertisement designs.
•Sports Science: Coaches want to compare different training regimens for athletes to see their
impact on speed or endurance.
Note: ANOVA is typically used when the dependent variable is continuous, and the independent
variable(s) are categorical (nominal or ordinal).
AI responses may include mistakes. Learn more
Dr Ramya S ,E & C Dept, MIT, Manipal