Business Statistics

Chapter 9
Group Comparisons, ANOVA and Categorical Analysis

Bachelors Program in Business Analytics
Business Statistics   •   Bachelor

Group Comparisons, ANOVA and Categorical Analysis

Introduction

Business decisions frequently require comparisons rather than estimates of a single quantity. A retailer may compare average basket values across store formats, a bank may compare default proportions across customer segments, and a human-resources department may examine whether training outcomes differ between employees measured before and after a program. Statistical inference provides a disciplined way to distinguish meaningful group differences from variation that could reasonably have occurred by chance.

This chapter develops methods for comparing means, proportions, paired observations, several groups, and categorical variables. It also explains post-hoc analysis, nonparametric alternatives, assumptions, effect sizes, and the translation of statistical findings into responsible business recommendations.

Learning Objectives

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

  • formulate null and alternative hypotheses for comparisons of means and proportions;
  • conduct and interpret independent-samples, paired-samples, and one-sample tests;
  • use analysis of variance (ANOVA) to compare three or more means;
  • select and interpret post-hoc procedures;
  • apply chi-square tests to categorical data;
  • identify when nonparametric methods are appropriate;
  • assess assumptions, effect sizes, and practical significance; and
  • communicate results as evidence-based business recommendations.

1. A Framework for Group Comparisons

A group-comparison analysis begins with a business question, not a statistical test. The analyst should identify:

  1. the outcome variable and its measurement scale;
  2. the groups or conditions being compared;
  3. whether observations are independent or paired;
  4. the population parameter of interest;
  5. the decision threshold, commonly α = 0.05; and
  6. the practical consequence of an observed difference.

The null hypothesis usually expresses no difference. For two population means, H0: μ1 - μ2 = 0. A two-sided alternative is H1: μ1 - μ2 ≠ 0. A one-sided alternative should be used only when the directional claim was specified before examining the data.

A p-value is the probability, assuming the null hypothesis is true, of obtaining a result at least as extreme as the observed result. It is not the probability that the null hypothesis is true, nor does it measure the size or business importance of an effect. A confidence interval supplies both direction and plausible magnitude.

Sampling and independence

Independent observations provide separate pieces of information. For example, sales from randomly selected stores may be independent if stores do not influence one another. Repeated measurements on the same customer are not independent; they are paired. Ignoring dependence can underestimate standard errors and produce misleadingly small p-values.

2. Tests Involving Means

2.1 One-sample mean test

A one-sample t test compares a sample mean with a benchmark μ₀. The statistic is

t = (x̄ − μ₀) / (s/√n)

where x̄ is the sample mean, s is the sample standard deviation, and n is the sample size. Under the null hypothesis and approximate normality of the population, the statistic follows a t distribution with n − 1 degrees of freedom.

The method is appropriate when observations are independent, the outcome is quantitative, and the population is approximately normal or the sample is sufficiently large for the central limit theorem to provide reasonable protection. Strong skewness and outliers should be investigated rather than automatically ignored.

Example. A delivery service claims that mean delivery time is 30 minutes. A random sample of 25 deliveries has x̄ = 32.4 and s = 6.0 minutes. The test statistic is

t = (32.4 − 30)/(6/√25) = 2.00.

The analyst compares 2.00 with a t distribution having 24 degrees of freedom. A two-sided p-value is approximately 0.057. At α = 0.05, the evidence is insufficient to reject the claim, although the confidence interval and operational cost of a 2.4-minute delay may still matter.

2.2 Two independent means

Suppose two unrelated groups have means x̄₁ and x̄₂, standard deviations s₁ and s₂, and sample sizes n₁ and n₂. Welch’s t test is generally preferred because it does not require equal population variances:

t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)

The approximate degrees of freedom are calculated using the Welch–Satterthwaite expression:

ν ≈ (s₁²/n₁ + s₂²/n₂)² / [(s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1)]

The assumptions are independent samples, quantitative outcomes, and reasonably well-behaved distributions. Welch’s procedure is safer than the pooled-variance t test when group variances or sample sizes differ substantially.

A confidence interval for the mean difference is

(x̄₁ − x̄₂) ± t*√(s₁²/n₁ + s₂²/n₂)

where t* is the critical value for the selected confidence level and approximate degrees of freedom. If the interval excludes zero, the corresponding two-sided test rejects at the matching significance level.

2.3 Paired observations

Paired analysis is used when each value in one condition is naturally linked to a value in another condition. Examples include customer spending before and after a promotion, or employee productivity before and after training. Define each difference as dᵢ = afterᵢ − beforeᵢ. Then test the mean difference μd:

t = (d̄ − μd,0)/(sd/√n)

Usually μd,0 = 0, d̄ is the mean of the differences, and sd is their standard deviation. The test has n − 1 degrees of freedom.

The normality assumption applies to the differences, not necessarily to each original measurement separately. Pairing often improves precision because stable individual characteristics are controlled. However, pairing unrelated observations artificially can create invalid results.

3. Tests Involving Proportions

3.1 One population proportion

For a sample proportion p̂ = x/n, where x is the number of successes and n is the sample size, a large-sample test of H₀: p = p₀ uses

z = (p̂ − p₀)/√[p₀(1−p₀)/n]

The null value p₀ must be used in the standard error because the test evaluates the null hypothesis. The normal approximation is generally reasonable when np₀ and n(1 − p₀) are sufficiently large; for small counts, an exact binomial test is preferable.

3.2 Two population proportions

For independent samples, the estimated difference is p̂₁ − p̂₂. Under H₀: p₁ = p₂, use the pooled proportion

p̂ = (x₁ + x₂)/(n₁ + n₂)

and the test statistic

z = (p̂₁ − p̂₂)/√[p̂(1−p̂)(1/n₁ + 1/n₂)]

For confidence intervals, an unpooled standard error is used:

(p̂₁ − p̂₂) ± z*√[p̂₁(1−p̂₁)/n₁ + p̂₂(1−p̂₂)/n₂]

This distinction is important: pooling is appropriate for the null-based test of equality, whereas the interval estimates each population proportion separately.

Business interpretation. If complaint rates are 8% and 5%, the difference is three percentage points. A statistically significant result may justify investigation, but management should also estimate the number of affected customers, remediation cost, and whether the sampling process represents the full customer population.

4. Analysis of Variance

4.1 Why ANOVA is needed

When comparing more than two means, conducting many t tests increases the probability of at least one false positive. One-way ANOVA tests the global hypothesis

H0: μ1 = μ2 = … = μk

against the alternative that at least one population mean differs. It does not, by itself, identify which groups differ.

ANOVA partitions total variation into variation between group means and variation within groups:

SST = SSB + SSW

where SST is total sum of squares, SSB is between-groups sum of squares, and SSW is within-groups sum of squares.

For group j with nⱼ observations and mean x̄ⱼ, and grand mean x̄:

SSB = ∑ⱼ nⱼ(x̄ⱼ − x̄)²
SSW = ∑ⱼ ∑ᵢ (xᵢⱼ − x̄ⱼ)²

The degrees of freedom are k − 1 for between groups and N − k for within groups, where k is the number of groups and N is the total sample size. Mean squares are

MSB = SSB/(k−1), MSW = SSW/(N−k)

The F statistic is

F = MSB/MSW

Under the null hypothesis, F follows an F distribution with k − 1 and N − k degrees of freedom, assuming independent observations, normally distributed errors within groups, and equal population variances.

4.2 Worked ANOVA example

A retailer tests three website designs. Conversion percentages from independent customer samples are summarized below.

DesignnMeanWithin-group sum of squares
A10418
B10520
C10822

The grand mean is x̄ = (4 + 5 + 8)/3 = 5.67 because group sizes are equal. More directly, the between-groups sum of squares is

SSB = 10[(4−5.67)² + (5−5.67)² + (8−5.67)²] = 86.67.

The within-groups sum is SSW = 18 + 20 + 22 = 60. Thus, MSB = 86.67/2 = 43.335 and MSW = 60/27 = 2.222. Therefore, F = 43.335/2.222 ≈ 19.50. The p-value is far below 0.05, so the global hypothesis is rejected. At least one design has a different mean conversion rate.

The result does not prove that Design C differs from both A and B. That question requires planned contrasts or post-hoc comparisons.

4.3 Effect size and assumptions

A useful ANOVA effect-size measure is eta squared:

η² = SSB/SST

It represents the proportion of observed total variation associated with group membership, although its interpretation depends on the design and context. Omega squared is often less biased for population inference:

ω² = [SSB − (k−1)MSW]/[SST + MSW]

Diagnostic tools include residual plots, group-specific boxplots, normal probability plots, and variance comparisons. ANOVA is reasonably robust to moderate nonnormality when group sizes are similar. Severe unequal variances combined with unequal sample sizes are more problematic. Welch’s ANOVA is a suitable alternative when homogeneity of variance is doubtful.

5. Post-Hoc Analysis and Multiple Comparisons

After a significant omnibus ANOVA, post-hoc analysis determines which pairs differ while controlling the familywise error rate. Tukey’s honestly significant difference procedure is commonly used for all pairwise comparisons when assumptions are reasonably satisfied. Games–Howell is useful for unequal variances and unequal group sizes. Bonferroni adjustment is simple and conservative, particularly for a small number of planned comparisons.

A planned contrast is more focused than all-pairs testing. For example, a business may compare a new design with the average of two existing designs. Planned contrasts should be specified before seeing results. Analysts should report the estimated difference, confidence interval, adjusted p-value, and practical interpretation—not merely a list of significant pairs.

6. Categorical Analysis and Chi-Square Tests

6.1 Goodness-of-fit test

A chi-square goodness-of-fit test assesses whether observed category counts match a specified distribution. If Oᵢ is the observed count and Eᵢ is the expected count under the null hypothesis, then

χ² = ∑ᵢ (Oᵢ − Eᵢ)²/Eᵢ

The degrees of freedom are usually g − 1, where g is the number of categories, subject to any estimated parameters. Expected counts must be determined before examining deviations.

6.2 Test of independence

For a contingency table, the null hypothesis states that two categorical variables are independent. Expected count in cell (i, j) is

Eᵢⱼ = (row totalᵢ × column totalⱼ)/grand total

The same chi-square statistic is used. Degrees of freedom are (r − 1)(c − 1), where r and c are the numbers of rows and columns.

Example. A company records renewal decisions by customer segment.

RenewDo not renewTotal
Standard8020100
Premium9010100
Total17030200

The expected count for Standard–Renew is 100×170/200 = 85; for Standard–Do not renew it is 15. The four expected counts are 85, 15, 85, and 15. The statistic is

χ² = (80−85)²/85 + (20−15)²/15 + (90−85)²/85 + (10−15)²/15 = 3.92.

With one degree of freedom, the p-value is approximately 0.048. The evidence suggests an association at the 5% level, but the effect should be described as an association, not proof that premium status causes renewal. The absolute renewal-rate difference is 10 percentage points, which is often more communicative than the chi-square statistic alone.

6.3 Effect size and small expected counts

For a 2 × 2 table, phi is

φ = √(χ²/N)

For larger tables, Cramér’s V is

V = √[χ²/(N × min(r−1,c−1))]

When expected counts are small, the chi-square approximation can be unreliable. Analysts may combine substantively similar categories, collect more data, or use Fisher’s exact test for small 2 × 2 tables. Combining categories solely to obtain significance is unacceptable.

7. Nonparametric Alternatives

Nonparametric tests are useful when quantitative data are strongly skewed, ordinal, contaminated by outliers, or too small for reliable normality assumptions. They often test distributions or ranks rather than means.

Parametric situationCommon alternativeTypical use
One-sample t testWilcoxon signed-rank or sign testOne median or paired differences
Two independent meansMann–Whitney U (rank-sum)Two independent groups
Paired t testWilcoxon signed-rankMatched observations
One-way ANOVAKruskal–WallisThree or more independent groups
Repeated-measures ANOVAFriedman testThree or more related conditions

The Mann–Whitney test assumes independent observations and, when interpreted as a location comparison, similarly shaped distributions. The Kruskal–Wallis test indicates that at least one group’s distribution differs; it does not automatically establish a difference in means. Post-hoc rank comparisons with multiplicity adjustment are needed after a significant result.

Nonparametric does not mean assumption-free. Independence, meaningful ordering, and appropriate sampling remain essential.

8. An Applied Case: Evaluating a Customer-Service Training Program

Illustrative case. A telecommunications firm introduces three training formats: classroom, self-paced online, and blended learning. Management wants to know whether formats differ in average post-training customer-resolution scores and whether format is associated with passing a certification assessment.

Background and problem

The firm assigns ninety employees to formats, thirty per group. Each employee receives a resolution score from 0 to 100. Certification is recorded as pass or fail. The assignment is intended to be random, but analysts must verify whether employees actually completed the assigned training.

Analysis approach

First, analysts summarize means, medians, standard deviations, sample sizes, and boxplots. They use one-way ANOVA for resolution scores if residual diagnostics support the model. Because the business question concerns all formats, the initial test is omnibus. If significant, Tukey comparisons identify the differing formats. If variances are unequal, Welch’s ANOVA and Games–Howell comparisons are used.

For certification, a 3 × 2 chi-square test examines training format and pass status. Expected counts are checked. The analysis reports pass-rate differences and Cramér’s V, not only a p-value.

Suppose ANOVA produces p = 0.012 and Tukey analysis shows blended learning exceeds classroom by 6 points (95% confidence interval 2 to 10), while the blended-versus-online interval includes zero. The chi-square test gives p = 0.031, with blended certification at 87%, classroom at 70%, and online at 73%. These findings support piloting blended learning more broadly, but they do not establish that format alone caused the outcome unless random assignment and implementation fidelity are credible.

Recommendation and governance

Management should expand blended learning through a controlled pilot, monitor cost per certified employee, and evaluate performance after training. Analysts should report missing data, noncompletion, and any reassignment. Individual employee results should be protected; aggregate reporting is preferable. A statistically significant difference should not be used to penalize employees without considering prior experience, accessibility, workload, and measurement bias.

Learning points

The case demonstrates that selecting a test depends on outcome type and design. ANOVA addresses mean differences across several groups, chi-square addresses categorical association, and post-hoc analysis turns a global finding into an actionable comparison. Business recommendations require effect size, uncertainty, costs, and causal limitations.

9. Technology, Reporting, and Best Practice

Statistical software can calculate test statistics, confidence intervals, adjusted p-values, effect sizes, residual diagnostics, and visualizations. Automation does not replace design judgment. Analysts should preserve a reproducible script or workflow, document exclusions, preregister important hypotheses when feasible, and distinguish confirmatory from exploratory analyses.

A professional report should include:

  • the business question and sampling design;
  • hypotheses and significance level;
  • descriptive statistics by group;
  • the test, assumptions, statistic, degrees of freedom, and p-value;
  • confidence intervals and an effect size;
  • post-hoc method where relevant;
  • limitations, missing data, and possible bias; and
  • a recommendation linked to costs, risks, and operational objectives.

Avoid the phrases “the null hypothesis is accepted” and “significant means important.” Prefer: “The data provide sufficient evidence to reject the null hypothesis at α = 0.05,” followed by the estimated size and business meaning of the effect.

Challenges and Limitations

Group comparisons can be distorted by convenience samples, nonresponse, measurement error, confounding variables, unequal exposure, and selective reporting. Large samples can make trivial differences statistically significant, while small samples can fail to detect important effects. Multiple testing increases false-positive risk, and post-hoc exploration can become indistinguishable from confirmation unless transparently labelled.

Causal conclusions require more than a low p-value. Randomized assignment, temporal ordering, control of confounders, and credible measurement are central. Where several predictors influence an outcome, regression, ANCOVA, or generalized linear models may be more suitable than isolated group tests.

Chapter Summary

Group-comparison methods connect statistical evidence with business decisions. One-sample, independent-samples, and paired t tests compare means under different designs. Proportion tests compare rates and shares, using null-based standard errors for hypothesis tests and separate estimates for confidence intervals. One-way ANOVA partitions variation into between- and within-group components and uses an F statistic to test a global equality hypothesis. Significant ANOVA results require controlled post-hoc comparisons to identify specific differences.

Chi-square methods analyze counts: goodness-of-fit tests compare observed and expected distributions, while independence tests assess relationships between categorical variables. Effect sizes such as η², φ, and Cramér’s V complement p-values. Nonparametric methods provide alternatives for ordinal, skewed, or outlier-prone data but still require appropriate design assumptions. Sound business recommendations combine statistical results with uncertainty, practical magnitude, cost, ethics, and causal limitations.

Key Terms

Hypothesis test: A procedure for evaluating evidence about a population claim.

p-value: Probability, under the null hypothesis, of a result at least as extreme as observed.

Confidence interval: An interval procedure expressing sampling uncertainty about a parameter.

Independent samples: Samples whose observations do not form natural pairs or influence one another.

Paired data: Observations linked by subject, unit, time, or another matching structure.

Welch’s t test: Two-mean test that does not require equal population variances.

Proportion: A population share possessing a specified characteristic.

ANOVA: Analysis of variance for comparing several population means.

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

Within-groups variation: Variation among observations inside groups.

F statistic: Ratio of between-groups mean square to within-groups mean square.

Post-hoc test: A comparison performed after an omnibus test, with multiplicity control.

Familywise error rate: Probability of at least one false rejection among multiple tests.

Chi-square test: A count-based test using deviations between observed and expected frequencies.

Expected count: Count predicted by a null model for a category or table cell.

Cramér’s V: Effect-size measure for association in a contingency table.

Nonparametric test: A method relying less on distributional assumptions, often using ranks.

Effect size: A measure of practical magnitude rather than merely statistical evidence.

Statistical significance: Evidence against a null hypothesis at a chosen threshold.

Practical significance: Importance of an effect in its operational or economic context.

Review Questions

Short Answer Questions

  1. Why is a paired t test generally more appropriate than an independent-samples t test for before-and-after measurements on the same customers?
  1. What does a significant one-way ANOVA establish, and what does it not establish?
  1. Why are expected counts important in a chi-square test?
  1. Distinguish statistical significance from practical significance.
  1. When might a nonparametric test be preferred to a parametric test?

Long Answer Questions

  1. Explain the assumptions, hypotheses, test statistic, and interpretation of Welch’s independent-samples t test.
  1. Describe how ANOVA partitions total variation and explain the roles of SSB, SSW, MSB, MSW, and F.
  1. Compare goodness-of-fit and independence chi-square tests, including their hypotheses and degrees of freedom.
  1. Explain why multiple pairwise t tests can be problematic and compare Tukey, Bonferroni, and Games–Howell procedures.
  1. Discuss how an analyst should translate a statistically significant group comparison into a responsible business recommendation.

Analytical / Application Questions

  1. A firm compares average monthly spending among four customer segments and obtains a significant ANOVA result. Design an appropriate follow-up analysis and specify what should be reported to management.
  1. A 2 × 2 table shows different cancellation rates for two subscription plans, but one expected cell count is 3. Which analysis would you consider, and what additional effect information would you report?
  1. A training study measures employee performance before and after training, with highly skewed differences and several extreme observations. Recommend an analysis strategy and explain how you would communicate its limitations.

Multiple Choice Questions with Answers

Question 1

Which test is most appropriate for comparing the means of two independent groups when their variances may differ?

A. Welch’s t test

B. Paired t test

C. One-sample z test for a proportion

D. Chi-square goodness-of-fit test

Correct Answer: A. Welch’s t test

Question 2

In a paired-samples t test, the analysis is performed primarily on the:

A. Two separate sample means without matching

B. Differences within matched pairs

C. Pooled group proportions

D. Expected cell counts

Correct Answer: B. Differences within matched pairs

Question 3

A significant one-way ANOVA result indicates that:

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. The data are normally distributed

Correct Answer: B. At least one population mean differs

Question 4

If SSB = 120 and SST = 400, eta squared is:

A. 0.03

B. 0.30

C. 3.33

D. 280

Correct Answer: B. 0.30

Question 5

Which procedure is designed to control pairwise error when comparing all group means after ANOVA?

A. Tukey’s HSD

B. A one-sample sign test

C. Fisher’s exact test

D. A goodness-of-fit test

Correct Answer: A. Tukey’s HSD

Question 6

In a chi-square test of independence, the expected count for a cell equals:

A. The cell’s observed count divided by the sample size

B. Row total × column total ÷ grand total

C. The grand total divided by the number of cells

D. The difference between row and column totals

Correct Answer: B. Row total × column total ÷ grand total

Question 7

Which statistic is commonly used as an effect size for association in a contingency table larger than 2 × 2?

A. Cramér’s V

B. MSW

C. Welch’s degrees of freedom

D. The sample median

Correct Answer: A. Cramér’s V

Question 8

For a one-proportion hypothesis test, the standard error under H₀ uses:

A. The null proportion p₀

B. Only the sample size n

C. The sample mean x̄

D. The alternative proportion only

Correct Answer: A. The null proportion p₀

Question 9

Which is a suitable nonparametric alternative to one-way ANOVA for independent groups?

A. Kruskal–Wallis test

B. Paired t test

C. McNemar test only

D. One-sample proportion test

Correct Answer: A. Kruskal–Wallis test

Question 10

A p-value is best described as the:

A. Probability that the null hypothesis is true

B. Probability of observing evidence at least as extreme, assuming the null is true

C. Magnitude of the business effect

D. Probability that the sample was randomly selected

Correct Answer: B. Probability of observing evidence at least as extreme, assuming the null is true

Business Statistics
Chapter 9 of 15