Statistical Methods for Business Analytics

Chapter 10
Analysis of Variance

Diploma in Business Analytics
Statistical Methods for Business Analytics   •   Diploma

Analysis of Variance

Introduction and context

Business analysts frequently need to compare the average performance of more than two groups. Examples include comparing sales under several advertising campaigns, customer waiting times across branches, employee productivity under different training programmes, or defect rates across production shifts. Conducting many separate two-sample tests is inefficient and increases the probability of a false positive. Analysis of variance (ANOVA) provides a systematic framework for testing whether several population means can reasonably be regarded as equal.

Despite its name, ANOVA compares means by analysing variation. It separates the total variation in observed data into variation between groups and variation within groups. If between-group variation is large relative to within-group variation, the data provide evidence that at least one group mean differs.

ANOVA is an inferential method, not merely a descriptive table. A statistically significant result does not by itself identify which groups differ, establish causation, or demonstrate commercial importance. Sound analysis combines the omnibus ANOVA test with assumption assessment, suitable post-hoc comparisons, effect-size measures, confidence intervals and managerial judgement.

Learning objectives

By the end of this chapter, you should be able to:

  1. Explain the logic and terminology of one-way and basic two-way ANOVA.
  2. Partition total variation into between-group and within-group components.
  3. Construct and interpret an ANOVA table and F-test.
  4. Assess normality, independence and homogeneity assumptions.
  5. Select and interpret post-hoc comparisons and effect sizes.
  6. Explain the main-effects and interaction effects in two-way ANOVA.
  7. Translate statistical results into responsible business recommendations.

1. The logic of ANOVA

Suppose observations are divided into k groups. Let yᵢⱼ denote observation j in group i, with group mean ȳᵢ and overall mean ȳ. The null and alternative hypotheses for one-way ANOVA are:

H₀: μ₁ = μ₂ = … = μₖ
H₁: at least one population mean differs

Here μᵢ is the population mean for group i. The alternative does not say that every mean differs; it says that equality of all means is not plausible.

The total sum of squares is partitioned as follows:

SSTotal = SSBetween + SSWithin

where

SSTotal = ∑ᵢ∑ⱼ (yᵢⱼ − ȳ)²
SSBetween = ∑ᵢ nᵢ(ȳᵢ − ȳ)²
SSWithin = ∑ᵢ∑ⱼ (yᵢⱼ − ȳᵢ)²

The symbols nᵢ, yᵢⱼ, ȳᵢ and ȳ represent the sample size in group i, an individual observation, the mean of group i and the grand mean, respectively. All sums of squares are in squared units of the response variable. The identities apply when each observation belongs to exactly one group and the same response is analysed.

Degrees of freedom are:

dfBetween = k − 1
dfWithin = N − k
dfTotal = N − 1

where N is the total number of observations. Mean squares are sums of squares divided by their degrees of freedom:

MSBetween = SSBetween/(k − 1)
MSWithin = SSWithin/(N − k)

The ANOVA test statistic is:

F = MSBetween/MSWithin

Under the null hypothesis, and assuming the model conditions hold, F follows an F distribution with k − 1 and N − k degrees of freedom. A large F indicates that group means vary more than would be expected from random variation within groups. The p-value is the probability, assuming H₀ is true, of obtaining an F statistic at least as large as the observed value.

The ANOVA table

SourceSum of squaresdfMean squareF
Between groupsSS_Betweenk − 1MS_BetweenMS_Between/MS_Within
Within groups (error)SS_WithinN − kMS_Within—
TotalSS_TotalN − 1——

2. Worked example: comparing delivery times

An operations analyst records delivery times, in minutes, for three courier services:

Service AService BService C
182530
202733
222632
192831

Each group has nᵢ = 4. The group means are 19.75, 26.50 and 31.50 minutes. The grand mean is 25.9167 minutes.

The between-group sum of squares is:

SSBetween = 4[(19.75−25.9167)² + (26.50−25.9167)² + (31.50−25.9167)²] ≈ 554.17

The within-group sums of squares are 10.75, 5.00 and 5.00, giving:

SSWithin = 20.75

Thus SS_Total ≈ 574.92, which confirms the partitioning identity apart from rounding. With k = 3 and N = 12:

MSBetween = 554.17/2 ≈ 277.08
MSWithin = 20.75/9 ≈ 2.31
F ≈ 277.08/2.31 ≈ 120.27

The very large F statistic would produce a very small p-value. At a conventional significance level of α = 0.05, the analyst would reject the hypothesis that all three population mean delivery times are equal. This result establishes that at least one service differs; it does not, by itself, establish that all three pairwise differences are statistically significant. Post-hoc analysis is needed.

The business interpretation should include magnitude and direction: Service A has the lowest observed average time, followed by B and C. Before changing suppliers, management should also consider cost, geographic coverage, reliability, service-level agreements and whether the data represent comparable routes and periods.

3. Assumptions and study design

ANOVA is most credible when the following conditions are considered.

Independence

Observations should be independent within and between groups. Independence is primarily a design issue. Repeated observations from the same customer, store or employee may be correlated. Random sampling, random assignment where possible, and appropriate blocking or repeated-measures methods help protect this condition. A large sample does not repair serious dependence.

Normality of errors

The model assumes that residuals within groups are approximately normally distributed. ANOVA is often reasonably robust to moderate non-normality, especially with balanced groups and no severe outliers. Analysts should inspect residual histograms, Q–Q plots and group-level summaries rather than rely only on an automatic test. Formal normality tests can be overly sensitive in large samples and underpowered in small samples.

Homogeneity of variance

The population variances should be approximately equal. This is particularly important when group sizes are unequal. Residual plots and comparisons of standard deviations are useful. Levene’s test is a practical diagnostic; a significant result suggests unequal variances, although the decision should not be based mechanically on one p-value.

Measurement and design quality

The response must be measured consistently, groups must be clearly defined, and influential outliers must be investigated. An outlier may be a data-entry error, a legitimate unusual case or evidence that the groups contain different subpopulations. Deleting it without a documented reason is poor practice.

Remedies when assumptions are doubtful

Welch’s one-way ANOVA is preferable when variances differ, particularly with unequal sample sizes. A transformation, such as a logarithm for strongly right-skewed positive data, may be justified when it reflects the measurement process. Non-parametric alternatives such as the Kruskal–Wallis test can be useful, but they answer a somewhat different question and should not be described automatically as tests of equal means. Robust methods or regression models with suitable error structures may be better for complex data.

4. Post-hoc comparisons and effect size

A significant omnibus F-test indicates that not all means are equal, but it does not identify the differing pairs. Performing many unadjusted t-tests inflates the familywise error rate. Post-hoc procedures control, or at least address, this multiplicity.

ProcedureAppropriate useMain characteristic
Tukey HSDAll pairwise mean comparisonsControls familywise error under standard ANOVA conditions
Bonferroni or HolmA selected set of comparisonsFlexible adjustment for multiple tests
DunnettSeveral treatments compared with one controlMore efficient than all-pairs comparisons
Games–HowellPairwise comparisons with unequal variancesUseful after Welch-type analysis

A confidence interval for a mean difference is often more informative than a p-value because it gives direction and plausible magnitude. Report the estimated difference, confidence interval and adjusted p-value.

Effect size helps distinguish statistical from practical importance. A common omnibus measure is eta squared:

η² = SSBetween/SSTotal

Eta squared is the proportion of observed total variation attributable to group membership in the analysed sample. It is descriptive and can be optimistic as an estimate of a population effect. Partial eta squared is commonly used in factorial ANOVA, but it should not be confused with ordinary eta squared. Cohen’s f may also be used:

f = √[η²/(1 − η²)]

These measures have no universal managerial meaning. A small effect may matter in a high-volume process, while a large effect may not justify action if implementation costs are high.

5. Basic two-way ANOVA

One-way ANOVA studies one categorical factor. Two-way ANOVA studies two factors simultaneously. For example, an analyst might examine sales response by advertising channel and region. This design can estimate:

  • the main effect of advertising channel;
  • the main effect of region; and
  • the interaction effect between channel and region.

A basic fixed-effects model is:

yᵢⱼₖ = μ + αᵢ + βⱼ + (αβ)ᵢⱼ + εᵢⱼₖ

Here yᵢⱼₖ is observation k in level i of factor A and level j of factor B; μ is the grand mean; αᵢ is the effect of factor A; βⱼ is the effect of factor B; (αβ)ᵢⱼ is the interaction effect; and εᵢⱼₖ is random error. The usual constraints make the effects identifiable, for example that effects sum to zero across levels. Errors are normally distributed with mean zero, constant variance and independence, subject to the design.

A main effect is an average effect across levels of the other factor. An interaction means that the effect of one factor changes across levels of the other. Interaction is often the most important managerial finding. If online advertising is effective in one region but ineffective in another, a single overall channel recommendation may be misleading.

For a balanced design with a levels of factor A, b levels of factor B and n observations per cell:

SSTotal = SSA + SSB + SSAB + SSError

The degrees of freedom are a − 1, b − 1, (a − 1)(b − 1) and ab(n − 1), respectively. Each effect is tested by dividing its mean square by MS_Error. In an unbalanced design, sums of squares and interpretation depend on the model and coding; software output must be interpreted carefully, and estimated marginal means are usually preferable to raw means.

When an interaction is statistically important, interpret simple effects—comparisons of factor A within each level of B, or vice versa—rather than relying on main effects alone. A line plot of cell means is often valuable: roughly parallel lines suggest little interaction, whereas non-parallel or crossing lines suggest interaction. The plot is diagnostic and explanatory, not a substitute for the model test.

6. Illustrative business case: training and work arrangement

Background. A fictional customer-service company tests three training programmes—standard, coaching and simulation—under two work arrangements—office and hybrid. The outcome is the number of correctly resolved cases per employee per day. Employees are randomly assigned within comparable teams, and each cell contains several employees.

Problem. Management wants to know whether training programmes differ, whether work arrangement matters, and whether the best training depends on work arrangement.

Analysis. The analyst fits a two-way ANOVA with training and work arrangement as fixed factors. Residual plots show no severe outliers, approximate normality and similar variance across cells. The training main effect is statistically significant, the work-arrangement main effect is small, and the interaction is statistically significant. Cell means show that simulation training produces the highest performance in the hybrid arrangement, whereas coaching performs similarly to simulation in the office arrangement.

Approach and solution. Because the interaction is significant, the analyst conducts adjusted simple-effect comparisons within each work arrangement. The report gives cell means, confidence intervals, adjusted p-values and an effect-size measure. Management chooses simulation training for hybrid teams but does not impose the same programme on all employees. A follow-up period is planned to assess retention, customer satisfaction and cost per resolved case.

Outcome and learning points. The case illustrates that a significant overall training effect is incomplete evidence when an interaction exists. Decisions should be based on the relevant combination of factors, not only on averaged main effects. Random assignment supports causal interpretation, but generalisation remains limited to employees and conditions represented by the study.

7. Software workflow and reporting

A professional workflow is:

  1. Define the response, factors, target population and practical decision.
  2. Examine counts, means, standard deviations, missing values and plots.
  3. Fit the appropriate one-way or two-way model.
  4. Inspect residuals and influential observations.
  5. Review the omnibus F-tests and effect sizes.
  6. Conduct pre-planned or adjusted post-hoc comparisons.
  7. Report estimates, confidence intervals, p-values, assumptions and limitations.
  8. Translate results into an action linked to cost, risk and operational feasibility.

A concise report might state: “Mean delivery time differed among the three services, F(2, 9) = 120.27, p < .001. Tukey-adjusted comparisons indicated that each pair differed; Service A was fastest. The observed eta squared was approximately 0.964. Results assume independent observations and comparable variance; route mix and cost should be considered before supplier selection.” The effect size here is calculated as 554.17/574.92 ≈ 0.964, but its very large value should be interpreted in light of the small illustrative dataset.

Statistical software reduces arithmetic errors but does not decide whether observations are independent, whether a factor is substantively meaningful or whether a result is operationally important. Analysts should retain data dictionaries, analysis scripts, model specifications and versioned outputs for reproducibility.

8. Limitations, ethics and contemporary practice

ANOVA is sensitive to poor design, omitted variables, measurement error and data dredging. Repeatedly trying alternative outcomes, exclusions or factor definitions until significance appears creates a misleading false-positive risk. Analysts should distinguish confirmatory tests from exploratory findings, document decisions and disclose all relevant comparisons.

Privacy is relevant when employee, customer or store-level data are analysed. Use the minimum necessary data, restrict access and report aggregated results where possible. Group comparisons should not be used to stigmatise individuals or justify automatic decisions without review. Fairness analysis may require examining whether a measured difference reflects genuine performance, unequal opportunity, biased measurement or confounding.

Modern analytics often extends ANOVA through the general linear model, regression with categorical predictors, mixed-effects models for clustered data, generalized linear models for counts or proportions, and Bayesian models. Machine-learning systems can help detect patterns, but they do not remove the need for experimental design, assumption assessment or causal reasoning. AI-generated statistical interpretations should be checked against the underlying data and model output.

Best-practice checklist

  • Plan comparisons before inspecting results where possible.
  • Use randomisation or blocking to support independence and causal interpretation.
  • Plot raw data and group summaries, not only an ANOVA table.
  • Check residuals, variance patterns and influential observations.
  • Use Welch or robust methods when standard assumptions are doubtful.
  • Adjust for multiple comparisons.
  • Report effect sizes and confidence intervals alongside p-values.
  • Interpret interactions before main effects in factorial designs.
  • Separate statistical significance from business significance.
  • Document decisions, limitations and data governance safeguards.

Chapter Summary

ANOVA compares several group means by partitioning total variation into between-group and within-group components. The F statistic is the ratio of the corresponding mean squares and tests whether all population means can reasonably be equal. A valid analysis requires attention to independence, residual normality, homogeneity of variance, measurement quality and study design. A significant omnibus result should be followed by appropriate multiplicity-adjusted comparisons, confidence intervals and effect-size reporting. Two-way ANOVA estimates the main effects of two factors and their interaction; when interaction is present, simple effects and cell means should guide interpretation. The most useful business conclusion combines statistical evidence with magnitude, cost, risk, fairness, operational context and reproducibility.

Key Terms

ANOVA: A method for testing mean differences among multiple groups by analysing variation.

One-way ANOVA: ANOVA with one categorical explanatory factor.

Two-way ANOVA: ANOVA with two categorical explanatory factors.

Factor: A categorical explanatory variable in an ANOVA model.

Level: A category or treatment condition of a factor.

Response variable: The quantitative outcome being analysed.

Grand mean: The mean of all observations across groups.

Between-group variation: Variation attributable to differences among group means.

Within-group variation: Variation among observations within groups.

Sum of squares: A measure formed by summing squared deviations.

Mean square: A sum of squares divided by its degrees of freedom.

F statistic: The ratio of an effect mean square to the error mean square.

Residual: The difference between an observed and model-predicted value.

Homogeneity of variance: The assumption that population variances are approximately equal.

Post-hoc comparison: A follow-up comparison performed after an omnibus test.

Familywise error rate: The probability of one or more false positives across a set of tests.

Effect size: A measure of the magnitude of a difference or relationship.

Main effect: The average effect of one factor across levels of another factor.

Interaction: A situation in which the effect of one factor depends on another factor.

Estimated marginal mean: A model-based mean adjusted for other factors in the model.

Review Questions

Short Answer Questions

  1. What question does the one-way ANOVA null hypothesis test?
  2. Distinguish between SS_Between and SS_Within.
  3. Why is independence primarily a study-design issue?
  4. What information does a post-hoc test provide after a significant F-test?
  5. Define an interaction effect in two-way ANOVA.

Long Answer Questions

  1. Explain the logic of the F statistic and describe how an ANOVA table is constructed.
  2. Discuss the assumptions of one-way ANOVA and practical methods for assessing them.
  3. Compare Tukey, Bonferroni, Dunnett and Games–Howell procedures.
  4. Explain why statistical significance and managerial importance are different concepts.
  5. Describe how a significant interaction changes the interpretation of a two-way ANOVA.

Analytical / Application Questions

  1. A retailer compares average basket value across four store formats. Explain the analysis plan, diagnostics, post-hoc procedure and information that should be reported.
  2. A two-way study finds a significant interaction between advertising channel and region but no significant overall channel main effect. What should the analyst investigate and how should management be advised?
  3. Delivery-time data have unequal variances and unequal group sizes. Explain why ordinary ANOVA may be unsuitable and recommend an analysis and reporting strategy.

Multiple Choice Questions with Answers

Question 1

What does a significant one-way ANOVA F-test establish?

A. Every group mean differs from every other group mean

B. At least one population mean differs

C. The largest group has the largest mean

D. All group variances are equal

Correct Answer: B. At least one population mean differs

Question 2

Which identity is the standard ANOVA partition of variation?

A. SS_Total = SS_Between + SS_Within

B. SS_Total = SS_Between − SS_Within

C. SS_Within = SS_Total + SS_Between

D. SS_Between = SS_Total × SS_Within

Correct Answer: A. SS_Total = SS_Between + SS_Within

Question 3

In one-way ANOVA with k groups and N observations, what is df_Within?

A. k − 1

B. N − 1

C. N − k

D. Nk − 1

Correct Answer: C. N − k

Question 4

The ANOVA F statistic is calculated as:

A. MS_Within/MS_Between

B. SS_Between/SS_Within

C. MS_Between/MS_Within

D. SS_Total/df_Total

Correct Answer: C. MS_Between/MS_Within

Question 5

Which procedure is especially suitable for comparing several treatments with one control group?

A. Dunnett procedure

B. Games–Howell procedure

C. Levene test

D. Kruskal–Wallis test

Correct Answer: A. Dunnett procedure

Question 6

Which condition is most directly assessed by examining whether residual spread is similar across groups?

A. Independence

B. Homogeneity of variance

C. Randomisation

D. Measurement validity

Correct Answer: B. Homogeneity of variance

Question 7

In two-way ANOVA, an interaction means that:

A. Both factors have identical means

B. The effect of one factor depends on the level of the other

C. The error variance is zero

D. The sample sizes are unequal

Correct Answer: B. The effect of one factor depends on the level of the other

Question 8

If a significant interaction is present, the analyst should generally:

A. Ignore the interaction and report only grand means

B. Interpret main effects without qualification

C. Examine simple effects and cell means

D. Delete the interaction term automatically

Correct Answer: C. Examine simple effects and cell means

Question 9

Eta squared is calculated as:

A. SS_Within/SS_Total

B. SS_Between/SS_Total

C. MS_Between/MS_Within

D. df_Between/df_Total

Correct Answer: B. SS_Between/SS_Total

Question 10

In the delivery-time example, the approximate F statistic was:

A. 2.31

B. 20.75

C. 120.27

D. 554.17

Correct Answer: C. 120.27

Statistical Methods for Business Analytics
Chapter 10 of 15