UK-based online statistics and data analysis support for USA, UK, and international clients. No exams, no impersonation, no fabricated data.
Post Hoc Tests

Bonferroni Correction: Formula, Interpretation, SPSS, Python, R and Excel Guide

Post Hoc Analysis, Multiple Comparisons, Adjusted p-values and Familywise Error Control Bonferroni Correction: Formula, Interpretation, SPSS, Python, R and Excel Guide Bonferroni Correction is a simple...

Statistics guide Ethical learning support SPSS/R/Python/Excel friendly
Bonferroni Correction: Formula, Interpretation, SPSS, Python, R and Excel Guide

Post Hoc Analysis, Multiple Comparisons, Adjusted p-values and Familywise Error Control

Bonferroni Correction: Formula, Interpretation, SPSS, Python, R and Excel Guide

Bonferroni Correction is a simple and conservative method for controlling familywise error when several pairwise comparisons are tested after ANOVA. In this worked Salar Cafe example, G3 final grade is compared across four studytime groups. The one-way ANOVA is significant, and the Bonferroni post hoc test shows that four of the six pairwise comparisons remain significant after correction.

Advertisement
Google AdSense top placement reserved here

Quick Answer: Bonferroni Correction Result

The Bonferroni Correction was applied after a significant one-way ANOVA comparing G3 final grade across four studytime groups. Because there are four groups, there are 6 pairwise comparisons. With a familywise alpha of .05, the Bonferroni per-comparison alpha is .008333.

The one-way ANOVA result was significant, F(3, 645) = 15.876, p = 5.705728e-10. The Bonferroni-adjusted pairwise results show that studytime 1 differs from studytime 2, studytime 1 differs from studytime 3, studytime 1 differs from studytime 4, and studytime 2 differs from studytime 3. The comparisons studytime 2 vs 4 and studytime 3 vs 4 are not significant after Bonferroni correction.

MethodBonferroni
OutcomeG3
Factorstudytime
Valid cases649

Groups4
Pairwise tests6
Familywise α.05
Bonferroni α.008333

ANOVA F15.876
ANOVA p5.706e-10
Significant pairs4
Not significant2

Final interpretation: Bonferroni correction confirms that lower studytime is associated with lower mean G3. Studytime group 1 is significantly lower than groups 2, 3 and 4, and group 2 is significantly lower than group 3. Groups 2 and 4 do not differ significantly after correction, and groups 3 and 4 also do not differ significantly after correction.

Important reporting point: Bonferroni correction protects against false positives when many pairwise tests are run, but it can be conservative. A non-significant Bonferroni result does not always prove that two groups are identical; it means the difference was not strong enough after the multiple-comparison adjustment.

Table of Contents

  1. What Is Bonferroni Correction?
  2. Bonferroni Correction Formula
  3. Why Bonferroni Correction Is Needed After ANOVA
  4. Bonferroni Post Hoc Hypotheses
  5. Dataset and Variables Used
  6. Assumptions Before Bonferroni Post Hoc Testing
  7. SPSS Output Interpretation
  8. Python Chart-by-Chart Interpretation
  9. R Chart-by-Chart Validation
  10. SPSS, R, Python and Excel Workflows
  11. Code Blocks for Bonferroni Correction
  12. APA Reporting Wording
  13. Common Mistakes
  14. When to Use Bonferroni Correction
  15. Downloads and Resources
  16. Related Guides
  17. FAQs

What Is Bonferroni Correction?

Bonferroni Correction is a multiple-comparison adjustment used when a researcher tests several hypotheses in the same family of comparisons. In post hoc ANOVA analysis, this usually means comparing every pair of group means after the overall ANOVA has shown that at least one group mean differs.

The problem is simple. If you run one test at α = .05, the chance of a false positive is controlled at about 5% for that test. But if you run many tests, the chance of getting at least one false positive increases. Bonferroni correction solves this by making each individual comparison harder to call significant.

In this example, there are four studytime groups, so there are six pairwise comparisons. Bonferroni correction either divides the familywise alpha by the number of comparisons or multiplies each raw p-value by the number of comparisons. Both views lead to the same decision logic.

Simple definition: Bonferroni Correction is a post hoc p-value adjustment that controls familywise error by making pairwise comparisons more conservative.

This guide connects naturally with One Way ANOVA, Factorial ANOVA, ANOVA Assumptions, ANOVA in SPSS, ANOVA in R, ANOVA in Python, P Value, Null and Alternative Hypothesis, Type I and Type II Error and Statistical Power.

Bonferroni Correction Formula

The Bonferroni correction can be written in two common ways. The first method divides the familywise alpha by the number of comparisons:

αBonferroni = αfamilywise / m

Here, m is the number of pairwise comparisons. In this example, there are four groups, so the number of comparisons is:

m = k(k − 1) / 2 = 4(4 − 1) / 2 = 6

With familywise α = .05:

αBonferroni = .05 / 6 = .008333

The second method adjusts each p-value directly:

padjusted = min(praw × m, 1)

SPSS, Python and R commonly report Bonferroni-adjusted p-values. A pairwise comparison is significant when the adjusted p-value is below .05.

ItemValue in This ExampleMeaning
Number of groups4Studytime groups 1, 2, 3 and 4.
Number of pairwise comparisons6All possible group pairs.
Familywise alpha.05Maximum error rate for the family of tests.
Bonferroni per-comparison alpha.008333Corrected alpha when using the divided-alpha method.
Decision with adjusted p-valuespadjusted < .05Significant after Bonferroni correction.

Why Bonferroni Correction Is Needed After ANOVA

A one-way ANOVA tells whether at least one group mean differs from the others. It does not tell exactly which groups differ. After a significant ANOVA, a post hoc test is used to compare group pairs. When many pairwise comparisons are made, the false-positive risk increases, so a correction is needed.

In this example, the ANOVA result is significant, but the meaningful reporting question is more specific: which studytime groups have different mean G3 scores? Bonferroni correction answers that question while controlling the familywise error rate.

StageQuestionResult in This Example
One-way ANOVADo any studytime groups differ in mean G3?Yes. F(3,645) = 15.876, p = 5.706e-10.
Bonferroni post hocWhich studytime pairs differ after correction?1–2, 1–3, 1–4 and 2–3 are significant.
InterpretationWhere is the practical mean difference?Lower studytime groups have lower mean G3, especially studytime 1.

For broader mean-comparison context, review T Test vs ANOVA, Student’s T Test, Two Sample T Test, One Tailed T Test, Two Tailed T Test, T Test in SPSS, T Test in R and T Test in Python.

Bonferroni Post Hoc Hypotheses

Bonferroni post hoc analysis tests pairwise hypotheses. Each pair has its own null and alternative hypothesis, but the p-values are adjusted so the family of tests is controlled.

ComparisonNull HypothesisAlternative HypothesisBonferroni Decision
1 vs 2μ1 = μ2μ1 ≠ μ2Significant after correction.
1 vs 3μ1 = μ3μ1 ≠ μ3Significant after correction.
1 vs 4μ1 = μ4μ1 ≠ μ4Significant after correction.
2 vs 3μ2 = μ3μ2 ≠ μ3Significant after correction.
2 vs 4μ2 = μ4μ2 ≠ μ4Not significant after correction.
3 vs 4μ3 = μ4μ3 ≠ μ4Not significant after correction.

Decision for this example: Four pairwise differences remain significant after Bonferroni correction. Studytime group 1 is significantly lower than every other group, and studytime group 2 is significantly lower than studytime group 3. The evidence does not support a corrected difference between groups 2 and 4 or between groups 3 and 4.

Dataset and Variables Used

The worked example uses student performance data. The dependent variable is G3 final grade. The post hoc factor is studytime, which has four groups. The analysis uses 649 valid cases.

VariableRoleLevels / TypeWhy It Matters
G3Dependent variableNumeric final gradeThe outcome whose group means are compared.
studytimePost hoc factor1, 2, 3, 4Defines the four groups used for ANOVA and Bonferroni pairwise comparisons.

Group Descriptive Statistics

Studytime GroupNMean G3SDVarianceMinimumMaximumInterpretation
121210.84433.218610.3595018Lowest mean G3.
230512.09183.243110.5179019Higher than group 1.
39713.22682.50216.2605818Highest mean G3.
43513.05713.03849.2319619High mean but smallest sample size.
Total64911.90603.230710.4370019Overall final-grade distribution.

The descriptive pattern explains why post hoc testing is useful. The mean rises from studytime 1 to studytime 3, while studytime 4 remains high but has fewer students. Bonferroni correction then identifies which of these visible mean differences remain statistically significant after controlling for multiple testing.

For supporting concepts, review Descriptive Statistics, Mean Median and Mode, Standard Deviation, Variance, Standard Error, Confidence Interval, Five Number Summary and Box Plot Interpretation.

Assumptions Before Bonferroni Post Hoc Testing

Bonferroni Correction adjusts for multiple comparisons, but it does not fix a poor ANOVA design. The same basic assumptions of one-way ANOVA should be considered before interpreting Bonferroni post hoc results.

AssumptionMeaningHow This Example Handles It
Continuous outcomeThe dependent variable should be numeric.G3 is a numeric final-grade variable.
Categorical factorThe grouping variable should define independent groups.Studytime defines four groups.
Independent observationsEach case should contribute one independent score.Each student contributes one G3 value.
Overall ANOVA significancePost hoc tests usually follow a significant omnibus test.The ANOVA p-value is 5.705728e-10.
Homogeneity of varianceGroup variances should be reasonably similar for standard ANOVA post hoc tests.Levene based on mean is p = .400, so equality of variance is not rejected.
Reasonable distribution shapeStrong non-normality can affect inference, especially in small groups.Histograms and Q-Q plots are used for distribution context.

For assumption support, use ANOVA Assumptions, Levene Test, Bartlett’s Test, Brown-Forsythe Test, Hartley F Max Test, Cochran C Test, Q-Q Plot Normality Check, P-P Plot Normality Check, Shapiro-Wilk Test and Outlier Detection.

Advertisement
Google AdSense middle placement reserved here

SPSS Output Interpretation for Bonferroni Correction

The SPSS output uses ONEWAY G3 BY studytime with descriptive statistics, homogeneity testing, ANOVA and Bonferroni post hoc comparisons. The key table is the Multiple Comparisons table under Bonferroni.

SPSS Reading Order

SPSS Output AreaWhat to ReadWhy It Matters
Case Processing Summary649 included, 0 excludedConfirms all valid cases were used.
DescriptivesN, mean, SD and confidence intervalShows group mean pattern before testing pairs.
Test of HomogeneityLevene based on mean p = .400Supports the equal-variance context for standard ANOVA post hoc testing.
ANOVA tableF(3,645) = 15.876, p < .001Shows that post hoc testing is justified.
Bonferroni Multiple ComparisonsMean difference, SE, adjusted Sig. and CIMain pairwise decision table.

SPSS One-Way ANOVA Table

SourceSum of SquaresdfMean SquareFSig.Interpretation
Between groups465.0783155.02615.876< .001At least one studytime group mean differs.
Within groups6298.1896459.765Residual variation within studytime groups.
Total6763.267648Total G3 variation.

SPSS Bonferroni Multiple Comparisons

ComparisonMean DifferenceStd. ErrorBonferroni Sig.95% CIDecision
1 vs 2-1.247.279< .001-1.99 to -.51Significant.
1 vs 3-2.382.383< .001-3.40 to -1.37Significant.
1 vs 4-2.213.570.001-3.72 to -.70Significant.
2 vs 3-1.135.364.011-2.10 to -.17Significant.
2 vs 4-.965.558.504-2.44 to .51Not significant.
3 vs 4.170.6161.000-1.46 to 1.80Not significant.

SPSS interpretation summary: The omnibus one-way ANOVA is significant, so Bonferroni post hoc comparisons are interpreted. Studytime group 1 differs significantly from groups 2, 3 and 4. Studytime group 2 also differs significantly from group 3. The 2 vs 4 and 3 vs 4 comparisons are not significant after Bonferroni correction.

Python Chart-by-Chart Interpretation

The Python chart sequence explains Bonferroni Correction through group distributions, group means, adjusted p-values, mean differences with Bonferroni confidence intervals and group sample sizes.

Python Chart 1: Group Distributions by Studytime

Bonferroni Correction Python boxplots showing G3 distributions by studytime group
Python boxplots showing G3 distributions across the four studytime groups before Bonferroni post hoc comparison.

The first chart shows how G3 final grade is distributed within each studytime group. Studytime group 1 has the lowest central pattern, while studytime groups 3 and 4 sit higher on the grade scale. The visible group separation explains why the one-way ANOVA becomes significant.

The boxplot also shows that the groups are not identical in spread or sample behavior. Bonferroni correction does not remove the need to inspect distributions; it controls the multiple-testing error after the ANOVA and pairwise comparisons are run.

Python Chart 2: Group Means with Confidence Intervals

Bonferroni Correction Python chart showing G3 means with confidence intervals
Python chart showing mean G3 for each studytime group with confidence intervals.

The group mean chart shows a clear increase from studytime 1 to studytime 3. Group 4 remains high, but it has the smallest sample size, which makes its interval wider than the larger groups.

This visual supports the post hoc result. The largest corrected differences involve group 1 compared with higher studytime groups, especially group 3.

Python Chart 3: Bonferroni-Adjusted p-values

Bonferroni Correction Python chart showing adjusted p-values for pairwise studytime comparisons
Python chart showing Bonferroni-adjusted p-values for the six pairwise comparisons.

The adjusted p-value chart places each comparison against the α = .05 decision line. The comparisons 1 vs 3, 1 vs 2, 1 vs 4 and 2 vs 3 fall on the significant side after Bonferroni correction.

The comparisons 2 vs 4 and 3 vs 4 remain to the right of the alpha line and are not significant after correction. This means the highest studytime groups are not all statistically separated from each other after familywise error control.

Python Chart 4: Bonferroni Mean Differences with Confidence Intervals

Bonferroni Correction Python chart showing pairwise mean differences with confidence intervals
Python chart showing pairwise mean differences with Bonferroni confidence intervals.

The mean-difference chart shows which corrected intervals cross zero. Comparisons whose intervals do not cross zero are significant after Bonferroni correction. The differences involving group 1 and the comparison 2 vs 3 do not cross zero.

The intervals for 2 vs 4 and 3 vs 4 cross zero. This matches the adjusted p-value result and confirms that those two comparisons should be reported as not significant after correction.

Python Chart 5: Group Sample Sizes

Bonferroni Correction Python chart showing studytime group sample sizes
Python chart showing valid sample sizes for the four studytime groups.

The sample-size chart shows that the groups are unequal: group 2 has 305 cases, group 1 has 212, group 3 has 97 and group 4 has 35. This matters because smaller groups usually have larger standard errors in pairwise comparisons.

Group 4 has a high mean but only 35 cases. That smaller sample size helps explain why some comparisons involving group 4 are less precise and why the 2 vs 4 comparison does not remain significant after correction.

R Chart-by-Chart Validation

The R charts validate the same Bonferroni Correction workflow using a second software environment. The R results confirm the same group distribution, mean pattern, adjusted p-value decision, confidence interval interpretation and sample-size context.

R Chart 1: Group Distributions by Studytime

Bonferroni Correction R boxplots showing G3 distributions by studytime group
R validation boxplots showing G3 distributions across studytime groups.

The R distribution chart confirms the same pattern shown by Python. Studytime group 1 has a lower grade distribution, while groups 3 and 4 appear higher.

This validates the descriptive foundation for the post hoc test. The statistical comparisons are not floating numbers; they are attached to a visible group pattern.

R Chart 2: Group Means with Confidence Intervals

Bonferroni Correction R chart showing group means with confidence intervals
R validation chart showing mean G3 by studytime group with confidence intervals.

The R mean chart confirms that studytime group 1 has the lowest mean and group 3 has the highest mean. Group 4 remains close to group 3 but with a wider interval because its sample size is smaller.

This supports the final interpretation that the strongest differences involve lower studytime compared with higher studytime groups.

R Chart 3: Bonferroni-Adjusted p-values

Bonferroni Correction R chart showing adjusted p-values
R validation chart showing Bonferroni-adjusted p-values for pairwise studytime comparisons.

The R adjusted p-value chart confirms the Python decision pattern. The comparisons 1 vs 2, 1 vs 3, 1 vs 4 and 2 vs 3 are significant after correction.

The comparisons 2 vs 4 and 3 vs 4 are not significant after correction. This repeated result across R, Python and SPSS makes the post hoc conclusion stable for reporting.

R Chart 4: Bonferroni Mean Differences with Confidence Intervals

Bonferroni Correction R mean difference confidence interval chart
R validation chart showing pairwise mean differences with Bonferroni confidence intervals.

The R mean-difference chart confirms that the significant comparisons have intervals away from zero. The non-significant comparisons have intervals that cross zero.

This chart is useful because it gives both direction and uncertainty. A negative difference such as 1 vs 3 means group 1 has a lower mean than group 3.

R Chart 5: Group Sample Sizes

Bonferroni Correction R group sample size chart
R validation chart showing sample sizes for each studytime group.

The R sample-size chart confirms the unequal group sizes. Group 2 is the largest group, and group 4 is the smallest group.

This context helps explain why group 4 comparisons need careful interpretation. Bonferroni correction controls the familywise error rate, while the sample-size chart explains the precision behind the pairwise estimates.

Advertisement
Google AdSense in-content placement reserved here

SPSS, R, Python and Excel Workflows for Bonferroni Correction

The same Bonferroni Correction workflow can be reproduced in SPSS, R, Python and Excel. SPSS provides Bonferroni directly in the One-Way ANOVA post hoc menu. R can use pairwise.t.test() with p.adjust.method = "bonferroni". Python can calculate adjusted p-values by multiplying raw p-values by the number of comparisons. Excel can support the calculation with formulas, but SPSS, R or Python is better for final reproducible reporting.

SPSS Workflow

StepSPSS Menu or SyntaxPurpose
Open datasetFile > Open > DataLoad G3 and studytime.
Run one-way ANOVAAnalyze > Compare Means > One-Way ANOVASet up group mean comparison.
Dependent variableG3Outcome variable.
FactorstudytimeGrouping variable.
OptionsDescriptive and HomogeneityRequest means and Levene test.
Post HocBonferroniRequest corrected pairwise comparisons.
Read outputMultiple Comparisons tableInterpret adjusted Sig. and confidence intervals.

R Workflow

StepR ActionPurpose
Read dataread.csv("dataset.csv")Load the dataset.
Convert groupfactor(studytime)Define studytime as categorical.
Run ANOVAaov(G3 ~ studytime)Test overall mean difference.
Run pairwise testspairwise.t.test(..., p.adjust.method="bonferroni")Apply Bonferroni adjustment.
Summarize meansgroup_by(studytime)Report group n, mean and SD.
Plot resultsBoxplots, means, adjusted p-values and CIsExplain the result visually.

Python Workflow

StepPython ActionPurpose
Read datapandas.read_csv()Load G3 and studytime.
Run ANOVAscipy.stats.f_oneway() or statsmodelsConfirm overall group difference.
Generate pairsitertools.combinations(groups, 2)Create all group pairs.
Run t-testsscipy.stats.ttest_ind()Calculate raw pairwise p-values.
Adjust p-valuesmin(raw_p * m, 1)Apply Bonferroni correction.
ReportAdjusted p-values and confidence intervalsPresent corrected pairwise decisions.

Excel Workflow

Excel TaskFormula or ToolPurpose
Prepare dataColumns for G3 and studytimeOrganize the dataset.
Group meansPivotTable average of G3 by studytimeShow descriptive pattern.
Group SD=STDEV.S(range)Calculate group spread.
Group N=COUNT(range)Calculate group sample size.
Number of comparisons=k*(k-1)/2Calculate m.
Corrected alpha=0.05/mApply divided-alpha Bonferroni rule.
Adjusted p-value=MIN(raw_p*m,1)Apply adjusted-p Bonferroni rule.

Code Blocks for Bonferroni Correction

SPSS Syntax for Bonferroni Correction

* Bonferroni Correction post hoc test in SPSS.
* Dependent variable: G3.
* Factor: studytime.

TITLE "Bonferroni Correction Post Hoc Analysis".

ONEWAY G3 BY studytime
  /STATISTICS DESCRIPTIVES HOMOGENEITY
  /POSTHOC = BONFERRONI ALPHA(.05)
  /MISSING ANALYSIS.

EXAMINE VARIABLES=G3 BY studytime
  /PLOT BOXPLOT HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

OUTPUT EXPORT
  /CONTENTS EXPORT=VISIBLE
  /PDF DOCUMENTFILE="Bonferroni-Correction-SPSS-Output.pdf".

Python Code for Bonferroni Correction

import pandas as pd
import numpy as np
from itertools import combinations
from scipy import stats

df = pd.read_csv("dataset.csv")

df["G3"] = pd.to_numeric(df["G3"], errors="coerce")
df["studytime"] = df["studytime"].astype("category")

data = df[["G3", "studytime"]].dropna().copy()

# Group summary
summary = data.groupby("studytime")["G3"].agg(
    n="count",
    mean="mean",
    standard_deviation="std",
    variance="var",
    standard_error=lambda x: x.std(ddof=1) / np.sqrt(x.count()),
    minimum="min",
    maximum="max"
).reset_index()

print(summary)

# One-way ANOVA
groups = [
    group["G3"].to_numpy()
    for _, group in data.groupby("studytime", observed=True)
]

anova = stats.f_oneway(*groups)
print("ANOVA F:", anova.statistic)
print("ANOVA p:", anova.pvalue)

# Bonferroni pairwise comparisons
labels = sorted(data["studytime"].dropna().unique())
pairs = list(combinations(labels, 2))
m = len(pairs)

results = []

for g1, g2 in pairs:
    x1 = data.loc[data["studytime"] == g1, "G3"].to_numpy()
    x2 = data.loc[data["studytime"] == g2, "G3"].to_numpy()

    t_stat, raw_p = stats.ttest_ind(x1, x2, equal_var=True)
    adj_p = min(raw_p * m, 1.0)

    mean_diff = x1.mean() - x2.mean()

    results.append({
        "group_1": g1,
        "group_2": g2,
        "mean_group_1": x1.mean(),
        "mean_group_2": x2.mean(),
        "mean_difference_group_1_minus_group_2": mean_diff,
        "t_value": t_stat,
        "raw_p_value": raw_p,
        "bonferroni_adjusted_p_value": adj_p,
        "decision_alpha_0_05": "Significant after Bonferroni correction"
        if adj_p < 0.05 else "Not significant after Bonferroni correction"
    })

pairwise_table = pd.DataFrame(results)
print(pairwise_table)

R Code for Bonferroni Correction

# Bonferroni Correction post hoc analysis in R

library(tidyverse)
library(car)

df <- read.csv("dataset.csv")

df$G3 <- as.numeric(df$G3)
df$studytime <- as.factor(df$studytime)

data <- df %>%
  select(G3, studytime) %>%
  drop_na()

# Group summary
data %>%
  group_by(studytime) %>%
  summarise(
    n = n(),
    mean_G3 = mean(G3),
    sd_G3 = sd(G3),
    variance_G3 = var(G3),
    se_G3 = sd(G3) / sqrt(n()),
    minimum = min(G3),
    maximum = max(G3),
    .groups = "drop"
  )

# Assumption context
leveneTest(G3 ~ studytime, data = data)

# One-way ANOVA
anova_model <- aov(G3 ~ studytime, data = data)
summary(anova_model)

# Bonferroni pairwise comparisons
pairwise.t.test(
  x = data$G3,
  g = data$studytime,
  p.adjust.method = "bonferroni",
  pool.sd = TRUE
)

# Optional: Tukey-style table with Bonferroni-adjusted p-values
pairwise_results <- pairwise.t.test(
  x = data$G3,
  g = data$studytime,
  p.adjust.method = "bonferroni",
  pool.sd = TRUE
)

print(pairwise_results)

Excel Notes for Bonferroni Correction

Excel support workflow:

1. Arrange the data:
   G3 | studytime

2. Count number of groups:
   k = 4

3. Count pairwise comparisons:
   =k*(k-1)/2
   =4*(4-1)/2
   =6

4. Calculate Bonferroni corrected alpha:
   =0.05/6
   =0.008333

5. Run pairwise t-tests for all six comparisons:
   1 vs 2
   1 vs 3
   1 vs 4
   2 vs 3
   2 vs 4
   3 vs 4

6. Adjust each p-value:
   =MIN(raw_p_value*6,1)

7. Decision:
   =IF(adjusted_p_value<0.05,"Significant","Not significant")

8. Report:
   Mean difference, raw p-value, adjusted p-value, corrected decision.

APA Reporting Wording

When reporting Bonferroni Correction, first report the omnibus ANOVA result, then report the corrected pairwise comparisons. Mention that Bonferroni adjustment was used to control familywise error.

APA-style report: A one-way ANOVA showed that mean G3 differed significantly across studytime groups, F(3, 645) = 15.876, p < .001. Bonferroni-adjusted post hoc comparisons showed that studytime group 1 had a significantly lower mean G3 than group 2, mean difference = -1.247, p < .001; group 3, mean difference = -2.382, p < .001; and group 4, mean difference = -2.213, p = .001. Studytime group 2 was also significantly lower than group 3, mean difference = -1.135, p = .011. The comparisons between groups 2 and 4 and between groups 3 and 4 were not significant after Bonferroni correction.

Short reporting version: Bonferroni post hoc tests showed that studytime group 1 was significantly lower than groups 2, 3 and 4, and group 2 was significantly lower than group 3. Groups 2 and 4 and groups 3 and 4 did not differ significantly after correction.

Common Mistakes

MistakeWhy It Is WrongCorrect Practice
Running pairwise tests without correctionFalse-positive risk increases when many tests are run.Use Bonferroni or another multiple-comparison correction.
Reporting only the ANOVA resultANOVA does not identify which groups differ.Report corrected post hoc comparisons after a significant ANOVA.
Using raw p-values after choosing BonferroniRaw p-values do not reflect familywise error control.Report Bonferroni-adjusted p-values or corrected alpha.
Thinking non-significant pairs are exactly equalNon-significance means insufficient corrected evidence, not equality.Use careful wording and report confidence intervals.
Forgetting the number of comparisonsBonferroni depends on m.State the number of groups and comparisons.
Using Bonferroni for every situation without thinkingBonferroni can be conservative.Consider Tukey, Holm, Games-Howell or planned contrasts when appropriate.

When to Use Bonferroni Correction

Use Bonferroni Correction when you need a simple and conservative way to control familywise error across multiple tests. It is often used after one-way ANOVA, factorial ANOVA, repeated-measures comparisons and planned pairwise comparisons.

SituationUse Bonferroni?Reporting Note
Several pairwise comparisons after ANOVAYesControls familywise error simply.
Small number of planned comparisonsYesWorks well when m is not too large.
Very many comparisonsUse cautionBonferroni can become overly conservative.
Equal variance post hoc after one-way ANOVAOften yesSPSS provides Bonferroni directly.
Unequal variance pairwise comparisonsMaybeGames-Howell may be better when variance equality fails.
Repeated-measures pairwise comparisonsYes, oftenBonferroni is commonly used for adjusted pairwise comparisons.

Compare this guide with One Way ANOVA, Factorial ANOVA, Mixed ANOVA, Nested ANOVA, Balanced ANOVA, Brown Forsythe ANOVA, ANOVA Effect Size, F Distribution, Eta Squared and Cohen’s F Formula.

Downloads and Resources for Bonferroni Correction

Use these resources to reproduce the Bonferroni Correction workflow. The Python report, R report and SPSS output PDF are included as verification files. Script and workbook placeholders can be replaced after the final downloadable files are uploaded to the WordPress Media Library.

FAQs About Bonferroni Correction

What is Bonferroni Correction?

Bonferroni Correction is a multiple-comparison adjustment that controls familywise error by dividing alpha by the number of comparisons or by multiplying raw p-values by the number of comparisons.

Why is Bonferroni Correction used?

It is used to reduce false positives when several pairwise tests are performed in the same analysis.

What was tested in this example?

The example compared mean G3 final grade across four studytime groups and then used Bonferroni post hoc tests for all six pairwise comparisons.

How many pairwise comparisons were made?

There were six pairwise comparisons because four groups produce 4(4 − 1) / 2 = 6 comparisons.

What was the corrected alpha?

With familywise alpha = .05 and six comparisons, the Bonferroni per-comparison alpha was .008333.

Which comparisons were significant after Bonferroni correction?

The significant comparisons were 1 vs 2, 1 vs 3, 1 vs 4 and 2 vs 3.

Which comparisons were not significant after Bonferroni correction?

The comparisons 2 vs 4 and 3 vs 4 were not significant after correction.

Is Bonferroni Correction conservative?

Yes. Bonferroni is simple and strong for familywise error control, but it can be conservative when many comparisons are tested.

Can Bonferroni Correction be done in SPSS?

Yes. In SPSS, use One-Way ANOVA, choose Post Hoc, and select Bonferroni.

How do I report this Bonferroni result?

A concise report is: Bonferroni-adjusted post hoc tests showed that studytime group 1 differed from groups 2, 3 and 4, and group 2 differed from group 3, while 2 vs 4 and 3 vs 4 were not significant after correction.

Need help applying this to your own data?

Salar Cafe can help interpret output, clean datasets, review assumptions, build dashboards and explain statistical results ethically.

Need help interpreting your data analysis results?

Contact Salar Cafe
Engr. Muhammad Yar Saqib author profile photo

Engr. Muhammad Yar Saqib

WhatsApp Get Data Analysis Help