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

Hochbergs GT2: Formula, Interpretation, SPSS, Python, R and Excel Guide

ANOVA Post Hoc Test, Unequal Group Sizes, Harmonic Mean Sample Size Hochbergs GT2: Formula, Interpretation, SPSS, Python, R and Excel Guide Hochbergs GT2, usually written as...

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

ANOVA Post Hoc Test, Unequal Group Sizes, Harmonic Mean Sample Size

Hochbergs GT2: Formula, Interpretation, SPSS, Python, R and Excel Guide

Hochbergs GT2, usually written as Hochberg’s GT2, is a post hoc multiple comparison method used after one-way ANOVA to compare group means pair by pair. It is commonly used when equal variances are assumed and group sizes are unequal. This guide explains Hochbergs GT2 with SPSS output, Python charts, R validation, Excel workflow, harmonic mean sample size, pairwise p-values, confidence intervals, APA reporting and downloadable resources.

Advertisement
Google AdSense top placement reserved here

Quick Answer: Hochbergs GT2 Result

The worked example compares G3 final grade across four studytime groups. The sample contains 649 students. The omnibus one-way ANOVA was statistically significant, F(3, 645) = 15.876, p < .001, so post hoc pairwise comparisons were justified. Hochbergs GT2 was then used to identify which studytime groups differed from each other.

The group means increased from the lowest studytime group to the higher studytime groups. Group 1 had the lowest mean G3 score, M = 10.84. Group 2 had M = 12.09. Group 4 had M = 13.06. Group 3 had the highest mean, M = 13.23. Hochbergs GT2 found 4 significant pairwise comparisons out of 6 total comparisons.

Dependent variableG3
Factorstudytime
Sample size649
Groups4

ANOVA F15.876
ANOVA p-value< .001
Pairwise tests6
Significant pairs4

Final interpretation: Hochbergs GT2 shows that studytime group 1 differs significantly from groups 2, 3 and 4. Group 2 also differs significantly from group 3. The comparisons 2 vs 4 and 3 vs 4 are not statistically significant. In plain language, students in the lowest studytime category had lower final grades than students in the higher studytime categories, while the highest studytime groups were not clearly different from each other.

Important reporting point: SPSS uses a harmonic mean sample size for Hochberg’s GT2 when group sizes are unequal. In this example, the harmonic mean sample size is approximately 85.331. SPSS also warns that Type I error levels are not guaranteed when group sizes are unequal, so the result should be interpreted as a post hoc comparison under unequal sample-size conditions.

Table of Contents

  1. What Is Hochbergs GT2?
  2. When to Use Hochbergs GT2
  3. Hochbergs GT2 Formula and Decision Logic
  4. Null and Alternative Hypotheses
  5. Dataset and Variables Used
  6. SPSS Output Interpretation
  7. Python Chart-by-Chart Interpretation
  8. R Chart-by-Chart Validation
  9. SPSS, R, Python and Excel Workflows
  10. Code Blocks for Hochbergs GT2
  11. APA Reporting Wording
  12. Common Mistakes
  13. Downloads and Resources
  14. Related Guides
  15. FAQs

What Is Hochbergs GT2?

Hochbergs GT2 is a post hoc multiple comparison test used after a one-way ANOVA. It compares all possible pairs of group means and adjusts the decision for the fact that several pairwise comparisons are being made. In SPSS, it appears as Hochberg’s GT2 in the post hoc test options.

The purpose of Hochbergs GT2 is to answer the question that ANOVA does not answer by itself. ANOVA tells whether at least one group mean differs, but it does not identify exactly which groups are different. Hochbergs GT2 compares each group pair and reports the mean difference, standard error, significance value and confidence interval.

Hochbergs GT2 is often discussed for designs with unequal group sizes under the equal-variance ANOVA framework. It uses the harmonic mean sample size when group sizes are unequal. That is why the group-size structure must be reported clearly when interpreting this test.

Simple definition: Hochbergs GT2 is an ANOVA post hoc test for comparing group means pair by pair, especially when group sizes are unequal but equal variances are assumed.

Before using Hochbergs GT2, review one-way ANOVA, ANOVA assumptions, Levene test, p-values, confidence intervals, and effect size.

When to Use Hochbergs GT2

Use Hochbergs GT2 when you have a one-way ANOVA with three or more groups, a continuous dependent variable, an overall significant ANOVA result, and a need to compare all pairs of group means. It is especially relevant when group sizes are unequal but the equal-variance assumption is acceptable.

Use Hochbergs GT2 WhenWhy It MattersExample in This Guide
The omnibus ANOVA is significantPost hoc testing is justified after evidence that at least one group mean differs.ANOVA p < .001.
You need pairwise comparisonsANOVA does not identify which specific group pairs differ.Four studytime groups create six pairwise comparisons.
Group sizes are unequalHochberg’s GT2 uses the harmonic mean sample size in unequal-size designs.Group sizes are 212, 305, 97 and 35.
Equal variances are acceptableHochberg’s GT2 belongs to the equal-variance ANOVA post hoc family.Levene test based on mean was not significant, p = .400.

When not to use it: If variances are clearly unequal, a method such as Games-Howell may be safer. If group sizes are extremely unequal, interpret Hochbergs GT2 carefully because SPSS warns that Type I error levels are not guaranteed when unequal group sizes are handled through the harmonic mean sample size.

Hochbergs GT2 Formula and Decision Logic

Hochbergs GT2 compares group means using the pooled ANOVA error term and a multiple-comparison critical value. The basic pairwise mean difference is:

Mean Difference = Mi − Mj

The pooled within-group mean square error comes from the ANOVA table:

MSE = SSwithin / dfwithin

For pairwise comparison, the standard error is based on the ANOVA MSE and the group sample sizes:

SEij = √[MSE × (1/ni + 1/nj)]

When group sizes are unequal, SPSS reports that the harmonic mean sample size is used. A simplified harmonic mean idea is:

nh = k / Σ(1/ng)

The pairwise decision is then based on whether the adjusted p-value is below α = .05 or whether the confidence interval excludes zero.

SymbolMeaningInterpretation
Mi, MjGroup meansThe two studytime group means being compared.
MSEMean square errorThe pooled within-group error estimate from ANOVA.
ni, njGroup sample sizesThe sample sizes for the compared pair.
nhHarmonic mean sample sizeUsed by SPSS when group sizes are unequal.
Adjusted p-valuePost hoc significance valueUsed to decide whether a pairwise difference is significant.

Decision rule: A pair is significant when the adjusted p-value is below .05 or when the Hochberg GT2 confidence interval for the mean difference excludes zero.

Null and Alternative Hypotheses for Hochbergs GT2

Hochbergs GT2 is interpreted pair by pair. Each comparison has its own null and alternative hypothesis. The null says the two population means are equal. The alternative says the two population means are different.

Pairwise TestHypothesisMeaning
Null hypothesisH0: μi = μjThe two studytime groups have equal mean G3 scores.
Alternative hypothesisH1: μi ≠ μjThe two studytime groups have different mean G3 scores.
Decision ruleAdjusted p < .05 or CI excludes 0The pair is significant by Hochbergs GT2.

Decision for this example: The significant comparisons are 1 vs 2, 1 vs 3, 1 vs 4, and 2 vs 3. The non-significant comparisons are 2 vs 4 and 3 vs 4.

Dataset and Variables Used

The worked example uses a student performance dataset. The dependent variable is G3 final grade. The factor is studytime, coded into four weekly study-time categories. The analysis asks whether average final grade differs across studytime groups and which pairs of groups are significantly different after the ANOVA.

VariableRoleHow It Is Used in Hochbergs GT2
G3Dependent variableThe final grade score being compared across studytime groups.
studytimeGrouping factorThe four-level factor used in one-way ANOVA and Hochberg GT2 post hoc comparisons.
Group 1< 2 hoursLowest studytime group and lowest mean G3 score.
Group 22 to 5 hoursMiddle studytime group with a higher mean than group 1.
Group 35 to 10 hoursHighest mean G3 score in this example.
Group 4> 10 hoursHigh mean G3 score but not significantly different from groups 2 or 3.

Before interpreting Hochbergs GT2, review the group distributions, means, sample sizes and variance context. Helpful related guides include descriptive statistics, box plot interpretation, Levene test, and ANOVA in SPSS.

Advertisement
Google AdSense middle placement reserved here

SPSS Output Interpretation for Hochbergs GT2

The SPSS output provides the official Hochberg’s GT2 post hoc table. It begins with group descriptives, checks homogeneity of variances, reports the one-way ANOVA and then lists the Hochberg multiple comparisons and homogeneous subsets.

SPSS Group Descriptives

Studytime GroupNMean G3Std. DeviationVarianceMinimumMaximumInterpretation
121210.843.21910.360018Lowest average final grade.
230512.093.24310.518019Higher than group 1.
39713.232.5026.261818Highest average final grade.
43513.063.0389.232619Similar to group 3 but with a smaller sample size.
Total64911.913.23110.437019Overall final grade mean.

SPSS Homogeneity of Variances

TestStatisticdf1df2p-valueInterpretation
Levene test based on mean0.9853645.400Not significant; the equal-variance assumption is acceptable for this example.
Levene test based on median1.0263645.380Also not significant; supports the same variance conclusion.
Levene test based on trimmed mean1.0813645.356No strong variance warning from the trimmed mean version.

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.765Pooled error term used in equal-variance post hoc comparisons.
Total6763.267648Total variation in G3.

SPSS Hochberg GT2 Multiple Comparisons

ComparisonMean DifferenceStd. ErrorSPSS Sig.95% CIHochberg GT2 DecisionPlain Interpretation
1 vs 2-1.247.279< .001[-1.98, -0.51]SignificantGroup 1 scored significantly lower than group 2.
1 vs 3-2.382.383< .001[-3.39, -1.37]SignificantGroup 1 scored significantly lower than group 3.
1 vs 4-2.213.570.001[-3.72, -0.71]SignificantGroup 1 scored significantly lower than group 4.
2 vs 3-1.135.364.011[-2.10, -0.17]SignificantGroup 2 scored significantly lower than group 3.
2 vs 4-0.965.558.408[-2.44, 0.51]Not significantGroups 2 and 4 do not differ clearly at α = .05.
3 vs 40.170.6161.000[-1.46, 1.80]Not significantGroups 3 and 4 are statistically similar in this analysis.

SPSS Homogeneous Subsets

The SPSS homogeneous subsets table shows a lower subset containing group 1 and a higher subset containing groups 2, 4 and 3. Group 2 appears in the transition pattern because it is between the lowest group and the highest groups. This supports the post hoc table: group 1 is the main low-performing group, while the higher studytime groups are not all clearly separated from each other.

SPSS interpretation summary: The one-way ANOVA is significant, Levene’s test does not show a strong variance problem, and Hochberg’s GT2 identifies four significant pairwise differences. The strongest contrast is between studytime group 1 and group 3. The comparison between groups 3 and 4 is clearly not significant.

Python Chart-by-Chart Interpretation

The Python charts show the Hochbergs GT2 workflow visually. They include group distributions, group means, sample-size and variance context, pairwise p-values, mean-difference intervals, a p-value heatmap and significant difference counts.

Python Chart 1: Group Distribution Boxplots

Hochbergs GT2 group distribution boxplots for G3 by studytime
Python chart showing G3 distributions across studytime groups before Hochberg GT2 post hoc comparisons.

The group distribution chart shows that 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 overall ANOVA is significant and why post hoc comparisons are needed.

The boxplots also show that the lower studytime groups include more very low G3 values. Hochbergs GT2 compares means, so the boxplots should be read as context rather than as the final decision table.

Python Chart 2: Group Means with Confidence Intervals

Hochbergs GT2 group means with confidence intervals
Python chart showing studytime group means for G3 with confidence intervals.

The group means chart shows the same mean order as the SPSS table. Group 1 has the lowest mean, group 2 is higher, and groups 4 and 3 are the highest. The chart makes the practical direction of the result easy to see before reading the detailed post hoc table.

The largest mean gap is between group 1 and group 3. The smallest gap is between groups 3 and 4. This is why group 1 appears in several significant comparisons while group 3 and group 4 do not significantly differ.

Python Chart 3: Group Size and Variance Context

Hochbergs GT2 group size and variance context chart
Python chart showing group sample sizes and variance context for Hochberg GT2.

The group size and variance context chart explains why Hochbergs GT2 is relevant. The studytime groups are unequal in size: group 2 is the largest group, group 1 is also large, group 3 is smaller and group 4 is the smallest. Hochberg’s GT2 handles unequal group sizes through the harmonic mean sample size.

The variance pattern also helps interpret the post hoc method. Although the Levene test is not significant, the group variances are not identical. Reporting the variance context makes the post hoc decision more transparent.

Python Chart 4: Hochbergs GT2 Pairwise p-values

Hochbergs GT2 pairwise p-values chart
Python chart showing Hochberg GT2 pairwise p-values against the α = .05 reference line.

The pairwise p-value chart shows which comparisons are below α = .05. The significant comparisons are 1 vs 3, 1 vs 2, 1 vs 4, and 2 vs 3. These are the pairs where the mean difference is large enough after the Hochberg GT2 adjustment.

The non-significant comparisons are 2 vs 4 and 3 vs 4. The group 3 vs group 4 comparison has a very large p-value, which supports the conclusion that these two higher studytime groups are statistically similar.

Python Chart 5: Hochbergs GT2 Mean Difference Confidence Intervals

Hochbergs GT2 mean difference confidence intervals
Python chart showing Hochberg GT2 confidence intervals for pairwise mean differences.

The mean difference chart uses zero as the no-difference line. Intervals that do not cross zero are significant. The intervals for 1 vs 2, 1 vs 3, 1 vs 4, and 2 vs 3 exclude zero.

The intervals for 2 vs 4 and 3 vs 4 cross zero. That means those observed mean differences are not statistically clear after the Hochberg GT2 adjustment. This chart gives a visual explanation of the confidence-interval decision rule.

Python Chart 6: Hochbergs GT2 p-value Heatmap

Hochbergs GT2 p-value heatmap
Python heatmap showing Hochberg GT2 adjusted p-values for all studytime group pairs.

The p-value heatmap gives a compact matrix view of the same pairwise decisions. It shows that group 1 differs from each higher group and that group 2 differs from group 3. These cells represent the main significant post hoc findings.

The heatmap also makes the non-significant pairs easy to see. Groups 2 and 4 do not differ clearly, and groups 3 and 4 are very close. This supports a careful interpretation rather than claiming that every studytime group differs from every other group.

Python Chart 7: Significant Difference Count by Group

Hochbergs GT2 significant difference count by group
Python chart showing how many significant Hochberg GT2 comparisons involve each studytime group.

The significant difference count chart shows which groups drive the post hoc result. Group 1 is involved in three significant differences because it differs from groups 2, 3 and 4. Group 2 is involved in two significant differences because it differs from group 1 and group 3.

Group 4 is significantly different from group 1 only, while group 3 is high in mean G3 but not significantly different from group 4. This chart turns the post hoc table into a practical group-level summary.

R Chart-by-Chart Validation

The R validation charts confirm the same substantive result. The same group mean order appears, the same significant comparisons are identified, and the same non-significant comparisons remain non-significant.

R Chart 1: Group Distribution Boxplots

R Hochbergs GT2 group distribution boxplots
R chart showing G3 distributions across studytime groups.

The R boxplot confirms the same distribution pattern shown by Python and SPSS. Group 1 has the lowest central position, group 2 is higher, and groups 3 and 4 are centered near the top.

This agreement across software strengthens the interpretation. The post hoc differences are not caused by one plotting method; they reflect the actual group mean structure.

R Chart 2: Group Means with Confidence Intervals

R Hochbergs GT2 group means with confidence intervals
R chart showing colorful group means for G3 across studytime groups.

The R group means chart validates the Python mean pattern. Group 1 has the lowest mean, group 3 has the highest mean and group 4 is close to group 3.

This chart explains why groups 3 and 4 are not significantly different. Their mean gap is small compared with the uncertainty around the estimates.

R Chart 3: Group Size and Variance Context

R Hochbergs GT2 group size and variance context chart
R chart showing group sample size and variance context.

The R group-size and variance chart confirms the unequal group-size structure. Group 4 is much smaller than groups 1 and 2, which is why the harmonic mean sample size note matters for Hochberg’s GT2.

The variance context is also useful because Hochberg’s GT2 is used under an equal-variance ANOVA framework. Reporting this chart helps readers see the assumption context before the post hoc decisions.

R Chart 4: Hochbergs GT2 Pairwise p-values

R Hochbergs GT2 pairwise p-values chart
R chart showing significant and non-significant Hochberg GT2 pairwise p-values.

The R p-value chart confirms the same four significant pairs: 1 vs 2, 1 vs 3, 1 vs 4, and 2 vs 3. These p-values are below the .05 threshold.

The non-significant pairs remain 2 vs 4 and 3 vs 4. This software-to-software agreement supports the final interpretation.

R Chart 5: Hochbergs GT2 Mean Difference Confidence Intervals

R Hochbergs GT2 mean difference confidence intervals
R chart showing Hochberg GT2 confidence intervals for mean differences.

The R confidence interval chart validates the same interval decisions. Significant pairs have intervals that stay away from zero, while non-significant pairs cross zero.

The strongest difference is group 1 compared with group 3. The smallest difference is group 3 compared with group 4. This matches the SPSS post hoc table and the Python confidence interval chart.

R Chart 6: Hochbergs GT2 p-value Heatmap

R Hochbergs GT2 p-value heatmap
R heatmap showing Hochberg GT2 adjusted p-values across group pairs.

The R heatmap summarizes the pairwise decisions in a compact matrix. It shows that group 1 is the main separated group because it differs from all higher studytime groups.

The heatmap also shows that groups 3 and 4 are not meaningfully separated by the post hoc test. This prevents the common reporting mistake of claiming all higher studytime levels are different from one another.

R Chart 7: Significant Difference Count by Group

R Hochbergs GT2 significant difference count by group
R validation chart showing significant comparison counts linked to each group.

The R significant difference count chart confirms that group 1 drives the result. Group 1 differs from groups 2, 3 and 4, making it the clearest low-performing category.

The higher studytime groups show fewer significant differences among themselves. The final conclusion should therefore emphasize lower performance in group 1 rather than claiming a complete step-by-step difference across every group.

Advertisement
Google AdSense in-content placement reserved here

SPSS, R, Python and Excel Workflows for Hochbergs GT2

The same Hochbergs GT2 workflow can be reproduced in SPSS, R, Python and Excel. SPSS gives the easiest official Hochberg GT2 menu output. Python and R are useful for reproducible analysis and custom charts. Excel is useful for understanding the underlying pairwise comparison logic, although it does not provide a one-click Hochberg GT2 post hoc menu.

SPSS Workflow

StepSPSS ActionPurpose
Open dataFile > Open > DataLoad the cleaned dataset containing G3 and studytime.
Run one-way ANOVAAnalyze > Compare Means > One-Way ANOVASet G3 as dependent variable and studytime as factor.
Check assumptionsOptions > Descriptive and Homogeneity of variance testReview group means, group sizes, standard deviations and Levene test.
Select post hocPost Hoc > Hochberg’s GT2Request Hochberg GT2 pairwise comparisons.
Interpret outputRead ANOVA, Multiple Comparisons and Homogeneous SubsetsIdentify significant pairs and subset patterns.

R Workflow

StepR ActionPurpose
Read dataread.csv()Import the dataset.
Fit ANOVAaov(G3 ~ factor(studytime))Estimate the one-way ANOVA model.
Get group summariesaggregate() or dplyr::summarise()Calculate group n, mean, standard deviation and variance.
Run post hoc logicUse a Hochberg GT2-capable package or manual approximationCompute pairwise adjusted decisions and charts.

Python Workflow

StepPython ActionPurpose
Read datapandas.read_csv()Load G3 and studytime variables.
Fit ANOVAstatsmodels.formula.api.ols()Estimate one-way ANOVA.
Extract MSEUse residual mean square from ANOVAGet pooled within-group error.
Calculate pairwise comparisonsUse means, MSE, group n and harmonic mean contextCompute p-values, confidence intervals and decisions.

Excel Workflow

Excel can reproduce the core comparison logic by using group means, group sample sizes, ANOVA MSE and error degrees of freedom. The official Hochberg GT2 adjustment is easier in SPSS, but Excel can still be used to teach the structure of the calculations.

Excel ItemFormula IdeaPurpose
Group mean=AVERAGEIF(group_range, group_id, value_range)Calculate each studytime group mean.
Group sample size=COUNTIF(group_range, group_id)Count observations in each group.
Harmonic mean n=number_of_groups/SUM(1/n1,1/n2,1/n3,1/n4)Approximate the harmonic mean sample-size logic.
Mean difference=mean_i - mean_jFind pairwise difference.
Standard error=SQRT(MSE*(1/n_i+1/n_j))Calculate pairwise standard error.
Confidence interval=mean_difference ± critical_value*standard_errorCheck whether the interval excludes zero.

Code Blocks for Hochbergs GT2

SPSS Syntax

ONEWAY G3 BY studytime
  /STATISTICS DESCRIPTIVES HOMOGENEITY
  /POSTHOC = GT2 ALPHA(0.05).

R Code

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

data$studytime <- factor(data$studytime)

model <- aov(G3 ~ studytime, data = data)
summary(model)

group_summary <- aggregate(G3 ~ studytime, data = data, function(x) {
c(n = length(x), mean = mean(x), sd = sd(x), variance = var(x))
})

print(group_summary)

# For official Hochberg's GT2 output, compare with SPSS.

# R can also reproduce the ANOVA table, group summaries,

# pairwise mean differences and post hoc charts.

Python Code

import pandas as pd
import itertools
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"]

summary = df.groupby("studytime")["G3"].agg(["count", "mean", "std", "var"])

# Harmonic mean sample size across groups

harmonic_n = len(summary) / (1 / summary["count"]).sum()

rows = []
for g1, g2 in itertools.combinations(summary.index, 2):
n1 = summary.loc[g1, "count"]
n2 = summary.loc[g2, "count"]
m1 = summary.loc[g1, "mean"]
m2 = summary.loc[g2, "mean"]
diff = m1 - m2
se = (mse * (1/n1 + 1/n2)) ** 0.5
rows.append([g1, g2, n1, n2, m1, m2, diff, se])

gt2_table = pd.DataFrame(rows, columns=[
"group_1", "group_2", "n_1", "n_2",
"mean_1", "mean_2", "mean_difference", "standard_error"
])

print(anova)
print(summary)
print("Harmonic mean sample size:", harmonic_n)
print(gt2_table)

Excel Formula Pattern

Group mean:
=AVERAGEIF(group_range, group_id, value_range)

Group sample size:
=COUNTIF(group_range, group_id)

Harmonic mean sample size:
=number_of_groups/SUM(1/n1,1/n2,1/n3,1/n4)

Pairwise mean difference:
=Mean_Group_i - Mean_Group_j

Pairwise standard error:
=SQRT(MSE*(1/n_i + 1/n_j))

Confidence interval:
Lower = Mean_Difference - Critical_Value*Standard_Error
Upper = Mean_Difference + Critical_Value*Standard_Error

Decision:
If the confidence interval excludes 0, the pair is significant.
If the confidence interval includes 0, the pair is not significant.

APA Reporting Wording for Hochbergs GT2

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 based on the mean was not significant, p = .400, supporting the homogeneity of variance assumption for this example.

Hochberg's GT2 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 the lowest studytime group had lower final grades than the higher studytime groups, while the highest studytime categories did 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. Hochberg's GT2 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 Hochbergs GT2

MistakeWhy It Is a ProblemBetter Practice
Running post hoc tests without reporting ANOVAThe post hoc table should be interpreted after the omnibus ANOVA context.Report ANOVA first, then Hochberg GT2 comparisons.
Ignoring unequal group sizesHochberg's GT2 uses the harmonic mean sample size when groups are unequal.Report group sample sizes and mention the harmonic mean note.
Ignoring variance assumptionsHochberg's GT2 is used under the equal-variance ANOVA framework.Review Levene test and group variance context.
Reporting only p-valuesReaders cannot see direction or size of differences.Report means, mean differences and confidence intervals.
Claiming all groups differGroups 2 vs 4 and 3 vs 4 are not significant.Report only the significant pairs supported by the post hoc table.

Most important warning: Do not say every studytime group is different from every other group. In this example, 2 vs 4 and 3 vs 4 are not significant.

Downloads and Resources

Use the following downloadable outputs to verify the Hochbergs GT2 result and compare the SPSS, Python and R workflows.

FAQs About Hochbergs GT2

What is Hochbergs GT2?

Hochbergs GT2 is an ANOVA post hoc multiple comparison method used to compare group means pair by pair after a significant one-way ANOVA.

When should I use Hochbergs GT2?

Use Hochbergs GT2 when the omnibus ANOVA is significant, equal variances are acceptable, and group sizes are unequal.

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.

What is the harmonic mean sample size in Hochbergs GT2?

When group sizes are unequal, SPSS uses the harmonic mean sample size for Hochberg's GT2. In this example, the harmonic mean sample size is approximately 85.331.

Does Hochbergs GT2 require equal variances?

Yes. Hochbergs GT2 is used within the equal-variance ANOVA post hoc framework. If variances are clearly unequal, Games-Howell may be more appropriate.

How do I interpret a Hochbergs GT2 confidence interval?

If the confidence interval for a mean difference excludes zero, the pair is significant. If the interval includes zero, the pair is not significant.

Can Hochbergs GT2 be done in Excel?

Excel can reproduce the core pairwise mean-difference logic using group means, sample sizes, harmonic mean context and ANOVA MSE, but SPSS is easier for official Hochberg GT2 output.

What is the main limitation of Hochbergs GT2?

The main limitation is that when group sizes are unequal, SPSS warns that Type I error levels are not guaranteed. This should be mentioned when reporting the result.

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