Written and maintained by CASRAI Editorial Board
Published
On this page
In inferential statistics and experimental design, between groups refers to the comparison, variation, or structural partitioning across distinct cohorts subjected to different levels of an independent variable. When partitioning variance in an omnibus ANOVA (analysis of variance), between-groups variance measures how much individual group sample means deviate from the grand mean, capturing systematic intervention effects alongside random sampling error. In experimental architecture, a between-groups design—also called an independent-groups or between-subjects study—assigns each participant to exactly one condition, eliminating carryover and order effects across treatments.
Definition in One Paragraph
Between groups defines both a variance component in linear models and a participant allocation framework in experimental methodology. What does “between groups” mean in quantitative analysis? Mathematically, between-groups variance isolates the dispersion between group sample means and the grand mean, serving as the numerator in the classical F-ratio test. What does “between-subjects” mean in research design? It denotes that separate, non-overlapping groups of participants are tested under different treatment conditions, meaning no participant experiences multiple experimental levels. This contrasts directly with within-groups structures, where researchers collect repeated measurements from the same participants over time.
Formula with Every Symbol Explained
In a one-way between-groups ANOVA, total variation partitions into between-groups and within-groups sums of squares: SStotal = SSbetween + SSwithin. The between-groups sum of squares (SSbetween) measures the weighted squared distance of each group mean from the grand mean:
SSbetween = Σj=1k nj(X̄j − X̄)2
Where the symbols represent:
- k: Total number of independent groups or factor levels.
- j: Group index (from 1 to k).
- nj: Sample size of group j.
- X̄j: Sample mean of group j.
- X̄: Grand mean across all combined observations: (Σ X) / N, where N = Σ nj.
Dividing by the degrees of freedom (dfbetween = k − 1) yields the between-groups mean square:
MSbetween = SSbetween / (k − 1)
What does “between groups and within groups” mean for the omnibus test statistic? The F-ratio evaluates the ratio of between-groups variance to pooled within-groups residual error variance:
F = MSbetween / MSwithin
Where MSwithin = SSwithin / (N − k). Under the null hypothesis (H0: μ1 = μ2 = … = μk), both terms estimate the population variance σ2, giving an expected F near 1.0. When treatment differences exist, MSbetween increases, yielding an F greater than 1.0.
Worked Example with Real Numbers and Arithmetic Shown
Consider an experiment evaluating three independent instructional methods (Group 1: Lecture, Group 2: Discussion, Group 3: Flipped Classroom). Five participants are randomly assigned to each condition (k = 3, n = 5 per group, N = 15):
- Group 1: 4, 5, 6, 7, 8 (Mean X̄1 = 6.0)
- Group 2: 8, 9, 10, 11, 12 (Mean X̄2 = 10.0)
- Group 3: 12, 13, 14, 15, 16 (Mean X̄3 = 14.0)
Step 1: Grand Mean (X̄)
Sum of all 15 scores = 30 + 50 + 70 = 150.
Grand mean X̄ = 150 / 15 = 10.0.
Step 2: Between-Groups Sum of Squares (SSbetween)
- Group 1: 5 × (6.0 − 10.0)2 = 5 × (−4.0)2 = 5 × 16 = 80.0
- Group 2: 5 × (10.0 − 10.0)2 = 5 × (0.0)2 = 5 × 0 = 0.0
- Group 3: 5 × (14.0 − 10.0)2 = 5 × (4.0)2 = 5 × 16 = 80.0
- SSbetween = 80.0 + 0.0 + 80.0 = 160.0.
Step 3: Within-Groups Sum of Squares (SSwithin)
Squared deviations within each group sum to 10.0 per group:
SSwithin = 10.0 + 10.0 + 10.0 = 30.0.
Step 4: Degrees of Freedom, Mean Squares, and F-Ratio
- dfbetween = k − 1 = 3 − 1 = 2
- dfwithin = N − k = 15 − 3 = 12
- MSbetween = 160.0 / 2 = 80.0
- MSwithin = 30.0 / 12 = 2.5
- F = 80.0 / 2.5 = 32.00
- Right-tail probability: p = .000015 (p < .001)
- Eta-squared: η2 = 160.0 / 190.0 = 0.842
Interpretation
Interpreting a between-groups test requires evaluating the omnibus F-statistic, the p-value, and effect sizes.
| Metric | Observed Value | Benchmark / Threshold | Interpretation |
|---|---|---|---|
| F-Ratio | 32.00 | Critical F(2, 12) = 3.89 (α = .05) | Between-groups variance is 32 times larger than residual error variance. |
| p-Value | < .001 | Standard alpha threshold α = .05 | Rejects the null hypothesis of equal group means. |
| Eta-Squared (η2) | 0.842 | Small = .01, Medium = .06, Large ≥ .14 | 84.2% of total score variance is explained by group assignment. |
| Post-Hoc Contrast | Omnibus significant | Tukey HSD post-hoc test required | Identifies which specific pairwise group means differ significantly. |
An omnibus between-groups F-test is non-directional. A significant F indicates that at least two group means differ, but does not identify which specific groups drive the effect. In experimental planning, researchers compare between-groups protocols with within-groups or split-plot designs to balance sample size efficiency against carryover risks, as detailed in our guide to between-subjects study designs.
Assumptions and Common Mistakes
Valid statistical inference from a between-groups ANOVA relies on four key assumptions:
- Independence of Observations: Each participant contributes exactly one score without mutual interference.
- Normality: Residuals within each group follow an approximately normal distribution. ANOVA is robust to moderate departures when group sizes are equal.
- Homogeneity of Variance (Homoscedasticity): Population variances are equal across all groups (σ12 = σ22 = … = σk2). When violated, Welch’s adjusted F should be reported.
- Measurement Level: The dependent variable is measured on a continuous interval or ratio scale.
Common analytical mistakes to avoid include conducting multiple uncorrected pairwise t-tests (inflating familywise Type I error rates), treating repeated measures as independent between-groups observations (which reduces power), ignoring heteroscedasticity in unbalanced designs, and reporting p-values without standardized effect sizes.
How to Report It (APA Example)
Following APA statistics reporting guidelines (7th edition), report the degrees of freedom in parentheses after the italicized test statistic F, accompanied by the exact p-value and an effect size estimate (η2 or ηp2). Group means and standard deviations should appear in the text or an accompanying table.
APA 7th Reporting Example:
A one-way between-groups analysis of variance was conducted to assess the effect of instructional method on examination scores across three independent cohorts: Traditional Lecture (n = 5), Discussion Seminar (n = 5), and Flipped Classroom (n = 5). The omnibus between-groups effect was statistically significant, F(2, 12) = 32.00, p < .001, η2 = .84. Post-hoc comparisons using Tukey’s HSD test revealed that students in the Flipped Classroom condition (M = 14.00, SD = 1.58) scored significantly higher than those in the Discussion Seminar condition (M = 10.00, SD = 1.58, p = .003) and the Traditional Lecture condition (M = 6.00, SD = 1.58, p < .001). Additionally, Discussion Seminar scores were significantly higher than Traditional Lecture scores (p = .003).
How to Calculate It in Excel, R or Python
Researchers can execute between-groups ANOVA computations using standard analytical environments:
Excel / Google Sheets
Place scores for Group 1, Group 2, and Group 3 in columns A, B, and C (rows 1:5). Under the Data tab, open Data Analysis and select Anova: Single Factor. Specify the input range ($A$1:$C$5). Alternatively, calculate the exact upper-tail p-value from the F-ratio using the formula: =F.DIST.RT(32.0, 2, 12), which returns 0.0000155.
R
# Define scores and group factor
scores <- c(4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16)
groups <- factor(rep(c("Lecture", "Discussion", "Flipped"), each = 5))
# Fit one-way between-groups ANOVA
model <- aov(scores ~ groups)
summary(model)
# Pairwise post-hoc comparisons
TukeyHSD(model)
Python
from scipy import stats
import pandas as pd
import statsmodels.api as sm
from statsmodels.formula.api import ols
# Group data arrays
group1 = [4, 5, 6, 7, 8]
group2 = [8, 9, 10, 11, 12]
group3 = [12, 13, 14, 15, 16]
# One-way between-groups ANOVA via SciPy
f_stat, p_val = stats.f_oneway(group1, group2, group3)
print(f"F-statistic: {f_stat:.2f}, p-value: {p_val:.6f}")
# Linear model decomposition with Statsmodels
df = pd.DataFrame({
'score': group1 + group2 + group3,
'group': ['G1']*5 + ['G2']*5 + ['G3']*5
})
ols_model = ols('score ~ C(group)', data=df).fit()
anova_table = sm.stats.anova_lm(ols_model, typ=2)
print(anova_table)
FAQ
What does “between groups” mean?
“Between groups” refers to the variation or comparison across separate, distinct cohorts subjected to different levels of an independent variable. In an ANOVA table, between-groups variance (mean square) quantifies the extent to which group sample means deviate from the grand mean due to treatment effects and sampling variation.
What is a between-group experiment?
A between-group experiment (also termed a between-subjects or independent-groups study) is an experimental design where each participant is assigned to exactly one condition. Different cohorts experience different treatments, preventing practice effects, fatigue, or carryover across conditions.
What does “between groups and within groups” mean?
“Between groups and within groups” refers to the partitioning of total variance in statistical analysis. Between-groups variance measures systematic differences caused by treatment manipulations and sampling error across groups. Within-groups variance measures random variation, individual differences, and measurement error among participants within each group. The ratio of between-groups variance to within-groups variance yields the F-statistic.
What does “between-subjects” mean?
“Between-subjects” is an experimental design term indicating that comparisons are made between separate individuals or independent cohorts. Unlike within-subjects designs where each participant completes all conditions, a between-subjects design ensures that each subject contributes data to only one condition.
Sources
- NIST/SEMATECH. (2012). e-Handbook of Statistical Methods. Section 7.4.3: “Are the means equal?” and Section 7.4.3.3: “The ANOVA Table and Tests of Hypotheses about Means.” National Institute of Standards and Technology. URL: https://www.itl.nist.gov/div898/handbook/prc/section4/prc433.htm
- OpenStax. (2018). Introductory Statistics. Chapter 13: “F-Distribution and One-Way ANOVA,” Section 13.3: “The F-Distribution and the F-Ratio.” Statistics LibreTexts. URL: https://stats.libretexts.org/Bookshelves/Applied_Statistics/Introductory_Statistics_(OpenStax)/13%3A_F-Distribution_and_One-Way_ANOVA/13.03%3A_The_F-Distribution_and_the_F-Ratio
- American Psychological Association. (2020). Publication Manual of the American Psychological Association (7th ed.). Section 6.44: “Statistical Copy” and Section 6.45: “Formulas.” Washington, DC: American Psychological Association.







