Course contentsShow
← Data Science
Lesson 363 of 2,14510. Hypothesis Tests for MeansFree lesson

Testing Equality of Variances

Apply Levene's and F-tests to determine whether variances are equal before choosing a t-test.

Testing Equality of Variances

You'll learn: How to test whether two groups have equal variances—a critical step before choosing between pooled and Welch's t-tests.

Why This Matters

Remember when you learned about pooled variance t-tests (which assume equal variances) versus Welch's t-test (which doesn't)? Before choosing between them, you need to know: do my two groups actually have similar variability?

Think of it like comparing two basketball teams' scoring consistency. One team might average 85 points per game with scores ranging from 80-90 (low variance), while another also averages 85 but scores anywhere from 60-110 (high variance). Testing equality of variances tells you if these spreads are statistically different.

Two Common Tests

Levene's Test

The more robust option, especially when data isn't perfectly normal. It tests whether the absolute deviations from group means differ significantly.

  • H₀: σ₁² = σ₂² (variances are equal)
  • H₁: σ₁² ≠ σ₂² (variances differ)

Use Levene's when you're unsure about normality—it's more forgiving.

F-Test for Variances

Tests the ratio of two sample variances using the F-distribution. It's the classic approach but sensitive to non-normality.

  • Test statistic: F = s₁² / s₂² (larger variance in numerator)
  • Compare against critical F-values with appropriate degrees of freedom

The Decision Flow

  1. Run Levene's or F-test on your two groups
  2. If p-value > α: fail to reject H₀ → variances appear equal → use pooled t-test
  3. If p-value ≤ α: reject H₀ → variances differ → use Welch's t-test

Key Takeaway: Testing variance equality with Levene's or F-tests helps you choose the appropriate two-sample t-test, ensuring your conclusions about mean differences are statistically valid.