ANOVA Post Hoc Test, Fisher’s Protected LSD, Pairwise Mean Comparisons
Fishers LSD Test: Formula, Interpretation, SPSS, Python, R and Excel Guide
Fishers LSD Test, also called Fisher’s Least Significant Difference test, is a post hoc method used after one-way ANOVA to compare group means pair by pair using the pooled ANOVA error term. This guide explains when to use Fishers LSD Test, how to interpret Fisher’s protected LSD results, how to read SPSS output, how Python and R validate the same result, and how to reproduce the calculation in Excel.
Google AdSense top placement reserved here
Quick Answer: Fishers LSD Test Result
The worked example compares G3 final grade across four studytime groups. The sample contains 649 students. The omnibus one-way ANOVA was significant, F(3, 645) = 15.876, p < .001, so follow-up pairwise comparisons were justified. Because the ANOVA was significant first, this example is interpreted as a Fisher’s protected LSD test.
The group means increased from studytime group 1 to group 3. Group 1 had the lowest mean G3 score, M = 10.84. Group 2 had M = 12.09. Group 3 had the highest mean, M = 13.23. Group 4 had a similar high mean, M = 13.06. Fishers LSD pairwise comparisons found 4 significant pairs out of 6 total pairwise comparisons.
Final interpretation: Fishers LSD Test shows that studytime group 1 differs significantly from groups 2, 3 and 4, and group 2 differs significantly from group 3. The comparisons 2 vs 4 and 3 vs 4 are not significant at α = .05. In plain language, students with the lowest studytime had lower final grades than students in higher studytime groups, while the two highest studytime groups did not differ clearly from each other.
Important limitation: Fishers LSD Test is more liberal than Tukey or Bonferroni methods because it does not strongly control the familywise error rate when many comparisons are made. It is best used for planned comparisons or after a significant omnibus ANOVA, not as an unrestricted search through many group differences.
Table of Contents
- What Is Fishers LSD Test?
- When to Use Fishers LSD Test
- Fishers LSD Test Formula
- Null and Alternative Hypotheses
- Dataset and Variables Used
- SPSS Output Interpretation
- Python Chart-by-Chart Interpretation
- R Chart-by-Chart Validation
- SPSS, R, Python and Excel Workflows
- Code Blocks for Fishers LSD Test
- APA Reporting Wording
- Common Mistakes
- Downloads and Resources
- Related Guides
- FAQs
What Is Fishers LSD Test?
Fishers LSD Test is a post hoc pairwise comparison method used after ANOVA. It compares each pair of group means and asks whether the mean difference is large enough to be considered statistically significant. The method uses the pooled within-group error term from the ANOVA table, so it is directly connected to the one-way ANOVA model.
The word LSD means Least Significant Difference. It is the smallest mean difference that must be exceeded before a pair is declared statistically significant. If the absolute mean difference is larger than the calculated LSD critical difference, the pair is significant. If the absolute mean difference is smaller than the LSD value, the pair is not significant.
Fishers LSD Test is often called Fisher’s protected LSD test when it is used only after a significant omnibus ANOVA. The “protected” part means the researcher first checks whether the overall ANOVA suggests that at least one group mean differs. Only after that overall test is significant are the pairwise comparisons interpreted.
Simple definition: Fishers LSD Test is like running pairwise t tests between ANOVA groups, but the standard error comes from the pooled ANOVA error term instead of separate pair-by-pair variance estimates.
Before using Fishers LSD Test, it is useful to understand one-way ANOVA, ANOVA assumptions, p-values, confidence intervals, and effect size.
When to Use Fishers LSD Test
Use Fishers LSD Test when you have one categorical factor with three or more groups, a continuous dependent variable, and a significant one-way ANOVA result. In this example, studytime is the grouping factor and G3 final grade is the dependent variable. The ANOVA found that not all group means were equal, so the LSD post hoc test was used to identify which groups differed.
| Use Fishers LSD Test When | Reason | Example in This Guide |
|---|---|---|
| The omnibus ANOVA is significant | LSD is commonly used as a protected follow-up test. | ANOVA p < .001, so pairwise follow-up is justified. |
| You want pairwise mean comparisons | LSD compares every group mean with every other group mean. | Studytime groups 1, 2, 3 and 4 create 6 pairwise comparisons. |
| The number of comparisons is modest | LSD is liberal and can inflate Type I error when many comparisons are tested. | There are only 6 pairwise comparisons in this example. |
| Planned comparisons are important | LSD is better when comparisons are planned rather than discovered after looking at the data. | The main comparison interest is how G3 changes across studytime groups. |
When not to use it: If the analysis has many groups and many unplanned comparisons, consider more conservative methods such as Tukey HSD, Bonferroni or Games-Howell. Fishers LSD Test can be too liberal when used as a large-scale exploratory post hoc method.
Fishers LSD Test Formula
The basic Fishers LSD pairwise test compares two group means using the pooled ANOVA mean square error. For groups i and j, the mean difference is:
The standard error for the mean difference is:
The t statistic for the pairwise comparison is:
The least significant difference, or LSD critical difference, is:
| Symbol | Meaning | Interpretation |
|---|---|---|
| Mi, Mj | Two group means | The means being compared in one pairwise LSD test. |
| MSE | Mean square error from ANOVA | The pooled within-group variance estimate. |
| ni, nj | Group sample sizes | The number of observations in each compared group. |
| dferror | Error degrees of freedom | Used to find the critical t value and p-value. |
| LSD | Least significant difference | The minimum absolute mean difference needed for significance. |
Decision rule: If |mean difference| > LSD critical difference, the pair is significant. If |mean difference| ≤ LSD critical difference, the pair is not significant.
Null and Alternative Hypotheses for Fishers LSD Test
Fishers LSD Test is interpreted pair by pair. Each comparison has its own null and alternative hypothesis. The null hypothesis says the two group means are equal. The alternative hypothesis says the two group means are different.
| Pairwise Test | Hypothesis | Meaning |
|---|---|---|
| Null hypothesis | H0: μi = μj | The two compared studytime groups have equal mean G3 scores. |
| Alternative hypothesis | H1: μi ≠ μj | The two compared studytime groups have different mean G3 scores. |
| Decision rule | p < .05 or confidence interval excludes 0 | The pair is significant by Fishers LSD Test. |
Decision for this example: The overall ANOVA rejected equal group means. Fishers LSD Test then found significant differences for 1 vs 2, 1 vs 3, 1 vs 4, and 2 vs 3. The pairs 2 vs 4 and 3 vs 4 were not significant.
Dataset and Variables Used
The worked example uses a student performance dataset. The dependent variable is G3 final grade. The grouping variable is studytime, coded into four weekly study-time groups. The analysis asks whether average final grade differs across the four studytime categories and which pairs of studytime groups are significantly different.
| Variable | Role | How It Is Used in Fishers LSD Test |
|---|---|---|
| G3 | Dependent variable | The final grade score being compared across studytime groups. |
| studytime | Grouping factor | The four-group factor used in one-way ANOVA and LSD post hoc comparisons. |
| Group 1 | < 2 hours | Lowest studytime group and lowest mean G3 score. |
| Group 2 | 2 to 5 hours | Middle studytime group with a higher mean than group 1. |
| Group 3 | 5 to 10 hours | Highest mean G3 score in this example. |
| Group 4 | > 10 hours | High mean G3 score, but not clearly different from groups 2 or 3 by LSD. |
Before interpreting post hoc results, review the descriptive statistics, group distributions and ANOVA assumptions. Helpful related guides include descriptive statistics, box plot interpretation, Levene test, and ANOVA in SPSS.
Google AdSense middle placement reserved here
SPSS Output Interpretation for Fishers LSD Test
The SPSS output begins with group descriptives, checks variance homogeneity, runs the one-way ANOVA, and then reports the LSD multiple comparisons table. The key point is that the omnibus ANOVA is significant and the Levene test is not significant, so the pooled-error LSD comparison is reasonable for this teaching example.
SPSS Group Descriptives
| Studytime Group | N | Mean G3 | Std. Deviation | Minimum | Maximum | Interpretation |
|---|---|---|---|---|---|---|
| 1 | 212 | 10.84 | 3.219 | 0 | 18 | Lowest average final grade. |
| 2 | 305 | 12.09 | 3.243 | 0 | 19 | Higher than group 1. |
| 3 | 97 | 13.23 | 2.502 | 8 | 18 | Highest average final grade. |
| 4 | 35 | 13.06 | 3.038 | 6 | 19 | Similar to group 3 but with smaller sample size. |
| Total | 649 | 11.91 | 3.231 | 0 | 19 | Overall final grade mean. |
SPSS Homogeneity of Variances
| Test | Statistic | df1 | df2 | p-value | Interpretation |
|---|---|---|---|---|---|
| Levene test based on mean | 0.985 | 3 | 645 | .400 | Not significant; equal-variance assumption is acceptable for this example. |
The Levene result supports the use of a pooled error term. That matters because Fishers LSD Test uses the ANOVA within-group mean square error as its pooled variance estimate. If variances were strongly unequal, a different post hoc method would be safer.
SPSS One-Way ANOVA Table
| Source | Sum of Squares | df | Mean Square | F | Sig. | Interpretation |
|---|---|---|---|---|---|---|
| Between Groups | 465.078 | 3 | 155.026 | 15.876 | < .001 | At least one studytime group mean differs. |
| Within Groups | 6298.189 | 645 | 9.765 | Pooled error term used by LSD comparisons. | ||
| Total | 6763.267 | 648 | Total variation in G3. |
SPSS Fishers LSD Multiple Comparisons
| Comparison | Mean Difference | p-value | 95% CI | LSD Decision | Plain Interpretation |
|---|---|---|---|---|---|
| 1 vs 2 | -1.247 | < .001 | [-1.80, -0.70] | Significant | Group 1 scored significantly lower than group 2. |
| 1 vs 3 | -2.382 | < .001 | [-3.13, -1.63] | Significant | Group 1 scored significantly lower than group 3. |
| 1 vs 4 | -2.213 | < .001 | [-3.33, -1.09] | Significant | Group 1 scored significantly lower than group 4. |
| 2 vs 3 | -1.135 | .002 | [-1.85, -0.42] | Significant | Group 2 scored significantly lower than group 3. |
| 2 vs 4 | -0.965 | .084 | [-2.06, 0.13] | Not significant | Groups 2 and 4 do not differ clearly at α = .05. |
| 3 vs 4 | 0.170 | .783 | [-1.04, 1.38] | Not significant | Groups 3 and 4 are statistically similar in this analysis. |
SPSS interpretation summary: The ANOVA shows a significant overall studytime effect on G3. The LSD post hoc table shows that the lowest studytime group differs significantly from every higher group. Group 2 also differs from group 3. The two highest studytime groups do not significantly differ from each other.
Python Chart-by-Chart Interpretation
The Python charts show the complete Fishers LSD Test workflow visually. They begin with group distributions, then show group means, pairwise p-values, mean difference confidence intervals and LSD critical differences.
Python Chart 1: Group Distributions Before Fishers LSD Test

The group distribution chart shows that studytime group 1 has the lowest central position, while groups 3 and 4 are centered higher. Group 2 sits between the lowest and highest studytime categories. This visual pattern explains why the omnibus ANOVA was significant and why Fisher’s LSD post hoc comparisons are useful after the ANOVA.
The chart also shows spread and outlying values. Groups 1 and 2 include some very low G3 scores, while group 3 has a tighter distribution and a higher center. Fishers LSD Test compares means, so the boxplot should be read as context rather than as the final decision table.
Python Chart 2: Group Means with Approximate 95% Confidence Intervals

The group means chart shows the same mean pattern as the SPSS descriptive table. Group 1 has the lowest mean G3 score, about 10.84. Group 2 rises to about 12.09. Group 3 has the highest mean, about 13.23, while group 4 is very close at about 13.06.
This visual result supports the Fisher LSD conclusion. The largest differences involve group 1 compared with groups 3 and 4. The smallest difference is between groups 3 and 4, so it is not surprising that the 3 vs 4 LSD comparison is not significant.
Python Chart 3: Pairwise Fishers LSD p-values

The p-value chart shows which pairwise comparisons fall below α = .05. The significant comparisons are 1 vs 3, 1 vs 2, 1 vs 4, and 2 vs 3. These p-values are to the left of the α = .05 reference line.
The comparisons 2 vs 4 and 3 vs 4 are not significant. The 3 vs 4 comparison has a much larger p-value, showing that groups 3 and 4 are very similar in mean G3 score. The chart makes the post hoc decision easier to read than a long SPSS table.
Python Chart 4: Fishers LSD Mean Differences with Confidence Intervals

The mean difference chart uses zero as the no-difference line. Intervals that do not cross zero are significant by Fishers LSD Test. The intervals for 1 vs 2, 1 vs 3, 1 vs 4, and 2 vs 3 stay away from zero, so those comparisons are significant.
The intervals for 2 vs 4 and 3 vs 4 cross zero. That means the observed mean differences for these two pairs could reasonably be explained by sampling variation at α = .05. This is the clearest visual explanation of the LSD confidence-interval decision rule.
Python Chart 5: LSD Critical Difference by Pair

The LSD critical difference chart shows how large a mean difference must be before each pair is significant. The threshold changes by pair because the studytime groups have different sample sizes. For example, group 4 has a smaller sample size, so comparisons involving group 4 have larger critical differences.
The smallest LSD critical difference is for 1 vs 2, about 0.549, because those groups have larger sample sizes. The largest is for 3 vs 4, about 1.210. This explains why a small difference between groups 3 and 4 is not significant.
R Chart-by-Chart Validation
The R validation charts confirm the Python and SPSS conclusions. The same mean pattern appears: group 1 is lowest, group 3 is highest, group 4 is close to group 3, and only four of the six pairwise comparisons are significant by Fishers LSD Test.
R Chart 1: Colorful Group Means

The R group means chart validates the same ranking shown in Python and SPSS. Group 1 is clearly the lowest, group 2 is higher, and groups 3 and 4 are the highest. This agreement across software strengthens confidence that the pattern is not a charting artifact.
The figure also shows why Fisher’s LSD identifies several group 1 comparisons as significant. Group 1 is separated from the higher studytime groups by a meaningful mean gap.
R Chart 2: Colorful Fishers LSD p-values

The R p-value chart confirms the same pairwise decision pattern. The significant comparisons fall below the α = .05 reference line, while the non-significant comparisons remain above it. The visual separation between significant and non-significant comparisons is especially useful for explaining the post hoc result to students.
The chart confirms that 2 vs 4 and 3 vs 4 should not be reported as significant differences. Their p-values do not support rejecting equality of means at the .05 level.
R Chart 3: Colorful Mean Differences

The R mean difference chart validates the confidence interval interpretation. Comparisons whose intervals do not cross zero are significant. Comparisons whose intervals cross zero are not significant. This is a direct visual version of the SPSS LSD multiple comparisons table.
The strongest mean difference is group 1 compared with group 3. The weakest is group 3 compared with group 4. This matches the descriptive means, where groups 3 and 4 are almost identical.
R Chart 4: Colorful LSD Critical Difference by Pair

The R critical difference chart confirms that each pair has its own threshold. Pairs with larger sample sizes have smaller LSD thresholds. Pairs involving the smaller group 4 have larger thresholds because there is more uncertainty in those comparisons.
This chart is important for Excel users because it shows that the LSD value is not always one fixed number when group sizes are unequal. In unequal sample-size designs, each pair can have a different LSD critical difference.
Google AdSense in-content placement reserved here
SPSS, R, Python and Excel Workflows for Fishers LSD Test
The same Fishers LSD Test can be reproduced in SPSS, R, Python and Excel. SPSS gives the easiest menu-based workflow. R and Python are useful for reproducible analysis and custom charts. Excel is useful for understanding the manual calculation behind the LSD critical difference.
SPSS Workflow
| Step | SPSS Action | Purpose |
|---|---|---|
| Open data | File > Open > Data | Load the cleaned dataset containing G3 and studytime. |
| Run one-way ANOVA | Analyze > Compare Means > One-Way ANOVA | Set G3 as dependent variable and studytime as factor. |
| Check assumptions | Options > Descriptive and Homogeneity of variance test | Review descriptives and Levene test. |
| Select post hoc | Post Hoc > LSD | Request Fisher’s LSD pairwise comparisons. |
| Interpret output | Read ANOVA and Multiple Comparisons tables | Confirm significant ANOVA and identify significant LSD pairs. |
R Workflow
| Step | R Action | Purpose |
|---|---|---|
| Read data | read.csv() | Import the dataset. |
| Fit ANOVA | aov(G3 ~ factor(studytime)) | Estimate the one-way ANOVA model. |
| Run LSD | LSD.test() or manual pairwise t calculations | Compare group means using the pooled ANOVA error term. |
| Plot results | ggplot2 or base R graphics | Visualize group means, p-values and mean differences. |
Python Workflow
| Step | Python Action | Purpose |
|---|---|---|
| Read data | pandas.read_csv() | Load G3 and studytime variables. |
| Fit ANOVA | statsmodels.formula.api.ols() | Estimate one-way ANOVA. |
| Extract MSE | Use ANOVA residual mean square | Get pooled error term for LSD comparisons. |
| Calculate pairwise LSD | Use scipy.stats.t | Compute t values, p-values, LSD critical differences and confidence intervals. |
Excel Workflow
In Excel, Fishers LSD Test can be calculated manually after running a one-way ANOVA. The key values needed are the group means, group sample sizes, MSE from the ANOVA table, and error degrees of freedom.
| Excel Item | Formula Idea | Purpose |
|---|---|---|
| Group mean | =AVERAGEIF(group_range, group_id, value_range) | Calculate each studytime group mean. |
| Group n | =COUNTIF(group_range, group_id) | Count observations in each group. |
| Mean difference | =mean_i - mean_j | Find pairwise difference. |
| Standard error | =SQRT(MSE*(1/n_i+1/n_j)) | Calculate LSD pairwise standard error. |
| t statistic | =mean_difference/standard_error | Test the pairwise mean difference. |
| p-value | =T.DIST.2T(ABS(t), df_error) | Get two-tailed Fisher LSD p-value. |
| LSD critical difference | =T.INV.2T(alpha, df_error)*standard_error | Find the minimum significant difference for the pair. |
Code Blocks for Fishers LSD Test
SPSS Syntax
ONEWAY G3 BY studytime
/STATISTICS DESCRIPTIVES HOMOGENEITY
/POSTHOC = LSD ALPHA(0.05).R Code
data <- read.csv("dataset.csv")
data$studytime <- factor(data$studytime)
model <- aov(G3 ~ studytime, data = data)
summary(model)
# Fisher LSD using agricolae
# install.packages("agricolae")
library(agricolae)
lsd_result <- LSD.test(model, "studytime", p.adj = "none")
print(lsd_result)Python Code
import pandas as pd
import itertools
from scipy import stats
import statsmodels.api as sm
import statsmodels.formula.api as smf
df = pd.read_csv("dataset.csv")
df["studytime"] = df["studytime"].astype("category")
model = smf.ols("G3 ~ C(studytime)", data=df).fit()
anova = sm.stats.anova_lm(model, typ=2)
mse = anova.loc["Residual", "sum_sq"] / anova.loc["Residual", "df"]
df_error = anova.loc["Residual", "df"]
alpha = 0.05
summary = df.groupby("studytime")["G3"].agg(["count", "mean", "std"])
rows = []
for g1, g2 in itertools.combinations(summary.index, 2):
n1, n2 = summary.loc[g1, "count"], summary.loc[g2, "count"]
m1, m2 = summary.loc[g1, "mean"], summary.loc[g2, "mean"]
diff = m1 - m2
se = (mse * (1/n1 + 1/n2)) ** 0.5
t_value = diff / se
p_value = 2 * stats.t.sf(abs(t_value), df_error)
lsd = stats.t.ppf(1 - alpha/2, df_error) * se
rows.append([g1, g2, m1, m2, diff, se, t_value, p_value, lsd])
lsd_table = pd.DataFrame(rows, columns=[
"group_1", "group_2", "mean_1", "mean_2",
"mean_difference", "standard_error", "t_value",
"p_value", "lsd_critical_difference"
])
lsd_table["decision"] = lsd_table["p_value"].apply(
lambda p: "Significant" if p < alpha else "Not significant"
)
print(anova)
print(summary)
print(lsd_table)Excel Formula Pattern
Mean Difference:
=Mean_Group_i - Mean_Group_j
Standard Error:
=SQRT(MSE*(1/n_i + 1/n_j))
t Statistic:
=Mean_Difference / Standard_Error
Two-tailed p-value:
=T.DIST.2T(ABS(t_statistic), df_error)
LSD Critical Difference:
=T.INV.2T(0.05, df_error) * Standard_Error
Confidence Interval:
Lower = Mean_Difference - LSD_Critical_Difference
Upper = Mean_Difference + LSD_Critical_DifferenceAPA Reporting Wording for Fishers LSD Test
A one-way ANOVA was conducted to compare G3 final grade across four studytime groups. The ANOVA was statistically significant, F(3, 645) = 15.876, p < .001, indicating that mean final grade differed across studytime groups. Levene's test was not significant, p = .400, supporting the homogeneity of variance assumption.
Fisher's LSD post hoc comparisons indicated that group 1 had significantly lower G3 scores than group 2, group 3 and group 4. Group 2 also had significantly lower G3 scores than group 3. The comparisons between group 2 and group 4 and between group 3 and group 4 were not statistically significant. These results suggest that lower studytime is associated with lower final grade performance, while the highest studytime groups do not differ clearly from each other.
Short APA version: A one-way ANOVA showed a significant effect of studytime on G3, F(3, 645) = 15.876, p < .001. Fisher's LSD post hoc tests showed significant differences for 1 vs 2, 1 vs 3, 1 vs 4 and 2 vs 3, but not for 2 vs 4 or 3 vs 4.
Common Mistakes in Fishers LSD Test
| Mistake | Why It Is a Problem | Better Practice |
|---|---|---|
| Using LSD without checking ANOVA first | Unprotected LSD can increase false-positive findings. | Use Fisher's protected LSD after a significant omnibus ANOVA. |
| Calling every mean gap important | A visible mean difference may not be statistically significant. | Check p-values, confidence intervals and LSD critical differences. |
| Ignoring variance assumptions | LSD uses the pooled ANOVA error term. | Review Levene test, distributions and sample sizes. |
| Using LSD for many unplanned comparisons | Familywise Type I error can rise quickly. | Consider Tukey, Bonferroni or Games-Howell for many comparisons. |
| Reporting only p-values | Readers cannot see direction or size of difference. | Report mean differences and confidence intervals too. |
Most important warning: Fishers LSD Test is easy to run, but it should not be treated as the safest post hoc test in every situation. Its main strength is sensitivity; its main weakness is weaker protection against false positives.
Downloads and Resources
Use the following downloadable outputs to verify the Fishers LSD Test result and compare the SPSS, Python and R workflows.
SPSS Output PDF
Complete SPSS output with descriptives, Levene test, ANOVA and LSD multiple comparisons.
Python Report PDF
Python verification report with ANOVA table, group summary and pairwise Fisher LSD results.
R Report PDF
R validation report with the same Fisher LSD decisions and supporting charts.
FAQs About Fishers LSD Test
What is Fishers LSD Test?
Fishers LSD Test is a post hoc pairwise comparison method used after ANOVA. It compares group means two at a time using the pooled ANOVA error term.
When should I use Fishers LSD Test?
Use it when the omnibus ANOVA is significant and the number of planned or meaningful pairwise comparisons is modest. It is often used as Fisher's protected LSD after a significant ANOVA.
What is Fisher's protected LSD test?
Fisher's protected LSD means the LSD pairwise comparisons are interpreted only after the overall ANOVA is significant. The significant ANOVA provides initial protection against unrestricted pairwise testing.
Is Fishers LSD Test the same as a t test?
It is similar to pairwise t testing, but Fishers LSD Test uses the pooled within-group error term from the ANOVA table. That makes it an ANOVA-based pairwise comparison method.
How do I interpret a Fishers LSD confidence interval?
If the LSD confidence interval for a mean difference does not include zero, the pair is significant. If the interval includes zero, the pair is not significant at the chosen alpha level.
What were the significant pairs in this example?
The significant pairs were 1 vs 2, 1 vs 3, 1 vs 4 and 2 vs 3. The pairs 2 vs 4 and 3 vs 4 were not significant.
Can Fishers LSD Test be done in Excel?
Yes. You need group means, sample sizes, ANOVA MSE and error degrees of freedom. Then calculate the pairwise standard error, t statistic, p-value and LSD critical difference.
What is the main drawback of Fishers LSD Test?
The main drawback is that it is liberal and does not strongly control the familywise error rate when many comparisons are tested. More conservative alternatives include Tukey and Bonferroni methods.
