Perform Chi-Square Goodness-of-Fit and Independence Tests (χ²). Calculate expected frequencies, chi-square test statistic, degrees of freedom, and p-value for categorical data.

Calculated Result
χ² = 2

p = 0.57241 with 3 degrees of freedom

Formula: χ² = Σ (O − E)² / E

About this calculator

The Chi-Square test evaluates categorical data distributions, testing whether observed frequency counts across categories differ significantly from theoretical expected counts under a null hypothesis.

This tool computes (Observed - Expected)² / Expected across all categories, summing them into the Pearson chi-square statistic χ² and evaluating the p-value using the Chi-Square CDF.

How It Works & Formula

Formulaχ² = Σ (O − E)² / E

χ² = ∑ [(Oᵢ - Eᵢ)² / Eᵢ]. Degrees of freedom df = k - 1 (for goodness of fit with k categories). P-value = 1 - Γ(df/2, χ²/2)/Γ(df/2) using the lower regularized incomplete gamma function.