Bartlett's Test Calculator

Test if multiple groups have equal variances (sensitive to non-normality)

Enter groups separated by semicolons (;), values within groups by commas (,)

About Bartlett's Test

Bartlett's test assesses whether multiple groups have equal variances.

Caution: Very sensitive to departures from normality. If data is not normal, use Levene's test instead.

Null hypothesis: All groups have equal population variances.

Use when: Data is approximately normal and you need to test variance homogeneity.

What Is Bartlett's Test?

Bartlett's Test is a statistical hypothesis test that checks whether multiple groups have equal population variances — a property called homogeneity of variances or homoscedasticity. It is an essential prerequisite check before performing ANOVA, which assumes that all groups share the same variance.

The test compares each group's sample variance to a pooled variance estimate weighted by sample size. When variances differ substantially, the test statistic follows a chi-square distribution and produces a small p-value, leading to rejection of the null hypothesis. Our calculator also reports Hartley's F-max statistic — the ratio of the largest to smallest variance — as a simpler descriptive check.

Bartlett's test is most powerful when data is normally distributed. If your data deviates from normality, consider using Levene's test or the Brown-Forsythe test, which are more robust to skewed or heavy-tailed distributions.

Bartlett's Test Formula

The Bartlett statistic is derived from a likelihood ratio comparing individual group variances to a common pooled variance. The raw statistic is divided by a correction factor C to improve its approximation to the chi-square distribution, especially with small samples.

Bartlett's Test Statistic

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

Where:

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

Interpreting the Results

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

Verdict Condition Interpretation
Variances Equalp ≥ 0.05No evidence of variance differences — proceed with standard ANOVA
Variances Not Equalp < 0.05Evidence of unequal variances — use Welch's ANOVA or data transformation

The calculator also outputs the variance ratio (max/min) and Hartley's F-max, which provides a quick visual check. A variance ratio above 3-4 is generally cause for concern. Pooled variance and individual group statistics (mean, variance, standard deviation) are displayed to help you understand where any discrepancies lie.

How to Use This Calculator

This flexible calculator supports any number of groups using a simple separator format:

  1. Enter group data: Type each group's values separated by commas. Separate different groups with semicolons. Example format: 10,12,15,11,14;8,18,22,6,25;15,16,17,14,18 — this represents three groups with 5 values each.
  2. Ensure valid groups: Each group must have at least 2 values for variance to be calculable. Groups with fewer than 2 observations are automatically filtered out.
  3. Read the results: The calculator instantly computes Bartlett's chi-square statistic, degrees of freedom, p-value, variance ratio, Hartley's F-max, pooled variance, and individual group summaries.
  4. Check the conclusion: A clear verdict tells you whether variances are equal at α = 0.05, helping you decide which follow-up test is appropriate.

Real-World Applications

Bartlett's test is widely used in experimental research and clinical trials as a pre-check before ANOVA. If the test confirms equal variances, researchers can confidently apply parametric methods. If variances differ, they may switch to Welch's ANOVA or transform their data using log or square-root transformations to stabilize variance.

In quality assurance and manufacturing, Bartlett's test identifies whether different production lines or batches have consistent variability. A significant result might indicate that one machine or operator produces inconsistent output, warranting investigation even if the mean quality is acceptable.

In environmental monitoring, scientists use variance homogeneity tests to determine whether pollutant measurements across monitoring stations can be pooled for analysis. Unequal variances may signal that some stations experience different pollution dynamics or measurement conditions.

Worked Examples

Testing Three Treatment Groups

Problem:

A researcher tests three medical treatments on patient recovery scores. Group A: 10,12,15,11,14. Group B: 8,18,22,6,25. Group C: 15,16,17,14,18. Test whether group variances are equal at α = 0.05.

Solution Steps:

  1. 1Step 1: Enter the data as three semicolon-separated groups: 10,12,15,11,14;8,18,22,6,25;15,16,17,14,18.
  2. 2Step 2: The calculator computes each group's variance. Group A has mean = 12.4, variance ≈ 3.8. Group B has mean = 15.8, variance ≈ 68.2. Group C has mean = 16.0, variance ≈ 2.5.
  3. 3Step 3: Pooled variance is computed as a weighted average weighted by (n_i − 1). The Bartlett numerator is calculated from the log of pooled and individual variances.
  4. 4Step 4: The correction factor C adjusts for small sample bias. The chi-square statistic = numerator / C, and the p-value is obtained from the chi-square distribution with df = k − 1 = 2.

Result:

Group B's variance (68.2) is dramatically larger than Groups A (3.8) and C (2.5). The p-value is well below 0.05, confirming variances are unequal. The researcher should use Welch's ANOVA or a non-parametric alternative.

Consistent Manufacturing Batches

Problem:

A manufacturer checks fill weights across four production runs. Batch 1: 250,248,252,251. Batch 2: 249,250,251,248. Batch 3: 252,249,250,251. Batch 4: 250,251,249,250. Test at α = 0.05.

Solution Steps:

  1. 1Step 1: Enter as 250,248,252,251;249,250,251,248;252,249,250,251;250,251,249,250.
  2. 2Step 2: All batches have means near 250g and variances around 2-3. The individual variances are very similar.
  3. 3Step 3: The pooled variance ≈ 2.5, close to each individual variance. The Bartlett numerator is small since the logs of individual variances are nearly identical.
  4. 4Step 4: The chi-square statistic is low and the p-value is large (>0.05). Variances are equal.

Result:

All four batches show consistent variability. The manufacturer can pool the data or proceed with ANOVA without concern about the equal-variance assumption.

Two-Group Comparison Before T-Test

Problem:

A student wants to compare test scores between two teaching methods. Method X: 72,78,85,90,88,76. Method Y: 65,70,60,68,72,66. Check if variances are equal before running a t-test.

Solution Steps:

  1. 1Step 1: Enter as 72,78,85,90,88,76;65,70,60,68,72,66.
  2. 2Step 2: Method X mean ≈ 81.5, variance ≈ 58.3. Method Y mean ≈ 66.8, variance ≈ 19.4. The variance ratio is 58.3/19.4 ≈ 3.0.
  3. 3Step 3: With k = 2 groups, df = 1. The Bartlett statistic is computed and corrected by C.
  4. 4Step 4: The p-value is compared against α = 0.05. If p < 0.05, the student should use Welch's t-test, which does not assume equal variances.

Result:

The variance ratio of 3.0 suggests potential inequality. If the p-value falls below 0.05, Welch's t-test is the appropriate choice. If above 0.05, a standard pooled-variance Student's t-test is acceptable.

Tips & Best Practices

  • Always run a normality check (Shapiro-Wilk or Anderson-Darling) on each group before interpreting Bartlett's test.
  • A variance ratio above 3 should raise concern even if the formal test is not significant — especially with small samples.
  • When variances are unequal, Welch's ANOVA is the simplest and most robust alternative to standard one-way ANOVA.
  • Log transformation often stabilizes variance in positively skewed data — apply it and re-run Bartlett's test.
  • Use semicolons to separate groups and commas to separate values within groups — the calculator handles this automatically.
  • For just two groups, Bartlett's test is equivalent to the F-test for equality of two variances.

Frequently Asked Questions

Bartlett's test assumes normally distributed data and is more powerful when this holds. Levene's test is robust to non-normality and should be preferred when data is skewed or has outliers. Many statisticians recommend Levene's test as the default because real-world data rarely follows a perfect normal distribution.
Hartley's F-max is the ratio of the largest group variance to the smallest group variance — a quick, intuitive measure of variance inequality. It is not a formal test but serves as a diagnostic. Values above 3-4 generally indicate potential problems with the equal-variance assumption, especially with smaller sample sizes.
This calculator supports any number of groups (k ≥ 2). Enter each group's values separated by commas, and separate groups with semicolons. For example, 1,2,3;4,5,6;7,8,9;10,11,12 tests four groups. Each group must have at least 2 observations for variance to be computable.
You have several options. Use Welch's ANOVA, which does not assume equal group variances. Apply a variance-stabilizing transformation (log, square-root, or Box-Cox) and re-test. Or switch to a non-parametric alternative like the Kruskal-Wallis test, which does not depend on normality or equal variance assumptions.
Bartlett's test uses the chi-square approximation, which is derived from the assumption that each group's data follows a normal distribution. When data is non-normal, the chi-square approximation breaks down, and the test may produce misleading p-values — either too liberal or too conservative depending on the type of departure from normality.

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.