Bartlett's Test Calculator

Test for homogeneity of variances assuming normally distributed data.

Group Data

Note: Bartlett's test is sensitive to departures from normality. Use Levene's test for non-normal data.

Bartlett's Chi-Square

3.4126

Variances Are Homogeneous

dfDegrees of Freedom
2
pP-Value
0.181541
cvCritical Value
5.9910
FVariance Ratio
5.4772

Group Variances

Group 1 (n=6)s^2 = 19.7667
Group 2 (n=6)s^2 = 108.2667
Group 3 (n=6)s^2 = 107.3667
Pooled Variance78.4667

Formula

Chi^2 = [Sum((n-1)*ln(Sp^2)) - Sum((n-1)*ln(Si^2))] / C

What Is Bartlett's Test?

Bartlett's Test is a statistical procedure used to test whether multiple groups have equal variances — a property known as homoscedasticity or homogeneity of variances. It is one of the core assumption checks required before running parametric tests like ANOVA, which assume that all groups come from populations with the same variance.

The test was developed by Maurice Bartlett in 1937 and uses a chi-square test statistic. It compares each group's sample variance to a pooled variance estimate. If the variances differ substantially, the chi-square statistic becomes large, and you reject the null hypothesis of equal variances.

Bartlett's test is most powerful when the data in each group is approximately normally distributed. If your data significantly deviates from normality, consider using Levene's test or the Brown-Forsythe test instead, which are more robust to non-normal distributions.

Bartlett's Test Formula

The Bartlett test statistic is derived from a likelihood ratio approach. The raw statistic is adjusted by a correction factor C to better approximate the chi-square distribution. The full formula is shown below.

Bartlett's Test Statistic

χ² = [Σ(n_i−1)·ln(s²_p) − Σ(n_i−1)·ln(s²_i)] / C

Where:

  • n_i= Number of observations in group i
  • s²_i= Sample variance of group i
  • s²_p= Pooled variance = Σ(n_i−1)·s²_i / Σ(n_i−1)
  • C= Correction factor = 1 + (1/[3(k−1)]) · [Σ(1/[n_i−1]) − 1/Σ(n_i−1)]
  • k= Number of groups being compared

Interpreting Bartlett's Test Results

The null hypothesis H₀ states that all group variances are equal. The alternative H₁ is that at least one group has a different variance. The test statistic follows a chi-square distribution with k−1 degrees of freedom.

Outcome Condition What It Means
Fail to Reject H₀χ² ≤ critical valueVariances are homogeneous — ANOVA assumption is met
Reject H₀χ² > critical valueAt least one variance differs — consider Welch's ANOVA or non-parametric alternatives

Our calculator also reports the variance ratio (max variance divided by min variance), which provides a quick descriptive measure. A variance ratio below 2 is generally acceptable for ANOVA; ratios above 4 may indicate problems even if Bartlett's test is not significant with small samples.

How to Use This Calculator

Running Bartlett's test with this calculator takes four simple steps:

  1. Enter Group 1 data: Provide comma-separated numeric values for your first group. You need at least 2 observations per group for variance to be calculable.
  2. Enter Group 2 and Group 3 data: Populate the remaining groups with your measurements. The calculator supports three groups by default.
  3. Set the significance level: Choose α (commonly 0.05). This is your threshold for rejecting the null hypothesis of equal variances.
  4. Read the results: The calculator displays the chi-square statistic, p-value, critical value, individual group variances, pooled variance, and variance ratio — along with a clear verdict on whether variances are homogeneous.

Real-World Applications

Bartlett's test is most commonly used as a prerequisite check for ANOVA. Before comparing group means, researchers must verify that the variance assumption holds. In clinical trials, if Bartlett's test rejects equal variances, the researcher may switch to Welch's ANOVA or use data transformations like log or square-root to stabilize variances before proceeding.

In quality control and manufacturing, Bartlett's test helps determine whether different production lines, shifts, or machines produce items with consistent variability. If one machine has significantly higher variance, it may need maintenance even if its mean output is acceptable. In environmental science, researchers use variance homogeneity tests before comparing pollution levels across monitoring stations to ensure statistical tests are valid.

Worked Examples

Checking ANOVA Assumptions for Exam Scores

Problem:

A researcher has three groups of exam scores. Group 1: 23, 25, 28, 30, 32, 35. Group 2: 20, 22, 35, 38, 42, 45. Group 3: 18, 28, 30, 35, 40, 48. Test whether variances are equal at α = 0.05 before running ANOVA.

Solution Steps:

  1. 1Step 1: Enter the three groups into the calculator. Group 1: 23,25,28,30,32,35 / Group 2: 20,22,35,38,42,45 / Group 3: 18,28,30,35,40,48. Set α = 0.05.
  2. 2Step 2: The calculator computes each group's variance. Group 1 has n₁ = 6, mean ≈ 28.83, variance ≈ 18.97. Group 2: n₂ = 6, mean ≈ 33.67, variance ≈ 119.87. Group 3: n₃ = 6, mean ≈ 33.17, variance ≈ 117.77.
  3. 3Step 3: Pooled variance s²_p = ((5×18.97)+(5×119.87)+(5×117.77)) / 15 = (94.85+599.35+588.85) / 15 ≈ 85.54. The numerator of the Bartlett statistic is 15·ln(85.54) − 5(ln18.97+ln119.87+ln117.77).
  4. 4Step 4: Correction factor C = 1 + (1/(3·2))·((1/5+1/5+1/5) − 1/15) = 1 + (1/6)·(0.6−0.067) = 1 + 0.089 = 1.089. χ² = numerator/C. If χ² > critical value (5.991 for df=2, α=0.05), variances differ.

Result:

Group 1 has a much smaller variance than Groups 2 and 3, leading to a significant Bartlett chi-square statistic. The researcher should reject H₀ and conclude variances are not equal — Welch's ANOVA or a non-parametric test like Kruskal-Wallis is recommended instead of standard one-way ANOVA.

Manufacturing Consistency Check

Problem:

A quality engineer compares weights (grams) from three production lines. Line A: 50, 52, 49, 51, 50. Line B: 51, 50, 52, 49, 51. Line C: 50, 51, 50, 52, 49. Test variance equality at α = 0.05.

Solution Steps:

  1. 1Step 1: Enter the three production lines' data as comma-separated lists. All lines have 5 observations each.
  2. 2Step 2: Since the values are very close across all lines, each group variance is small and similar — roughly 1 to 1.5.
  3. 3Step 3: The pooled variance is close to each individual variance. The numerator of the Bartlett statistic is small, reflecting the similarity of variances.
  4. 4Step 4: The chi-square statistic is well below the critical value of 5.991 (df=2, α=0.05), so the engineer fails to reject H₀.

Result:

The Bartlett test confirms that variances are homogeneous across production lines. The engineer can proceed with ANOVA to compare mean weights, confident that the equal-variance assumption is satisfied.

Large Variance Discrepancy

Problem:

A statistician notices one group's data is tightly clustered while another has wide spread: Group A: 100, 101, 99, 100, 102. Group B: 50, 75, 100, 125, 150. Group C: 90, 92, 88, 91, 94. Test at α = 0.01.

Solution Steps:

  1. 1Step 1: Enter the three groups and set α = 0.01 for a stricter significance threshold.
  2. 2Step 2: Group A variance ≈ 1.3, Group B variance ≈ 1562.5, Group C variance ≈ 5.0. The variance ratio is enormous: 1562.5/1.3 ≈ 1202.
  3. 3Step 3: Even with only 5 observations per group, the extreme discrepancy in variances produces a very large Bartlett chi-square statistic.
  4. 4Step 4: The p-value is effectively zero, far below even α = 0.01. Reject H₀ — variances are clearly not equal.

Result:

With such extreme variance differences, the test decisively rejects homogeneity. The statistician should not pool these groups in a standard ANOVA and should instead investigate why Group B exhibits such wide dispersion.

Tips & Best Practices

  • Always check normality before running Bartlett's test — use a normality test or Q-Q plots for each group.
  • A variance ratio (max/min) greater than 4 strongly suggests unequal variances, regardless of the formal test result.
  • With small sample sizes (n < 5 per group), Bartlett's test may fail to detect even large variance differences — interpret cautiously.
  • If Bartlett's test rejects, Welch's ANOVA is the most commonly used alternative that handles unequal variances.
  • Transformations like log or square-root often stabilize variances — apply them and re-run Bartlett's test to confirm.
  • Pooled variance is a weighted average of group variances — groups with larger sample sizes contribute more to the estimate.

Frequently Asked Questions

Bartlett's test assumes that the data in each group follows a normal distribution and is more powerful when this assumption holds. Levene's test is more robust to departures from normality because it uses absolute deviations from group means or medians rather than raw variances. If your data is normally distributed, Bartlett's test is preferred for its higher power; if the data is skewed or heavy-tailed, Levene's test or the Brown-Forsythe test is the safer choice.
Each group needs at least 2 observations for variance to be defined, but meaningful results typically require larger samples. With fewer than 4-5 observations per group, the correction factor C becomes large, and the test has limited power. A minimum of 5-10 observations per group is recommended for reliable inference.
If equal variances are rejected, standard ANOVA may give misleading p-values. You have several options: use Welch's ANOVA, which does not assume equal variances; apply a variance-stabilizing transformation to your data (log, square-root, or Box-Cox); or switch to a non-parametric test like Kruskal-Wallis, which does not assume normality or equal variances.
The correction factor C adjusts the raw likelihood-ratio statistic so that it better follows a chi-square distribution, especially with small samples. It depends on the degrees of freedom in each group. As sample sizes increase, C approaches 1, and the unadjusted statistic becomes adequate. Without this correction, the test would be slightly liberal, rejecting the null hypothesis too often.
Yes, Bartlett's test can be used for any number of groups k ≥ 2. This calculator supports three groups as the most common educational and research scenario, but the formula generalizes directly to any k. For more than three groups, dedicated statistical software like R or Python's statsmodels is recommended.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Bartlett's Test Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.