Chi-Square Calculator

Calculate chi-square statistics, p-values, and test for goodness of fit or independence between categorical variables

Home Categories Math Chi-Square Calculator

χ² = Σ[(O - E)² / E]

Chi-Square Formula

Actual frequencies observed in your data

Expected frequencies based on hypothesis (or single value for equal distribution)

Enter observed frequencies for each cell in the contingency table

Quick Examples

Chi-Square Statistic (χ²)

P-Value

Degrees of Freedom

Critical Value

Decision

Interpretation

Contribution Breakdown

Category Observed Expected Contribution
Total χ²

Expected Frequencies

Critical Values Reference

df α=0.10 α=0.05 α=0.01

If you like this calculator

Please help us simply by sharing it. It will help us a lot!

Share this Calculator

About Chi-Square Calculator

What is a Chi-Square Test?

Chi-square (χ²) tests are statistical hypothesis tests used to determine if there is a significant difference between observed and expected frequencies in one or more categories. They are essential tools for analyzing categorical data.

Types of Chi-Square Tests

1. Goodness of Fit Test

Tests whether an observed frequency distribution differs from a theoretical distribution.

Formula: χ² = Σ[(Oᵢ - Eᵢ)² / Eᵢ]

Degrees of Freedom: df = k - 1 (where k is the number of categories)

Use when: Testing if your sample data follows an expected distribution (e.g., uniform, normal, or any specified proportions).

2. Test of Independence

Tests whether two categorical variables are related or independent.

Formula: χ² = Σ[(Oᵢⱼ - Eᵢⱼ)² / Eᵢⱼ]

Expected Frequency: Eᵢⱼ = (Row Total × Column Total) / Grand Total

Degrees of Freedom: df = (r - 1) × (c - 1) (where r = rows, c = columns)

Use when: Analyzing contingency tables to determine if there's an association between two categorical variables.

Key Concepts

Term Description
Observed (O) Actual frequencies from your data
Expected (E) Frequencies expected under the null hypothesis
Chi-square (χ²) Sum of squared differences between observed and expected, divided by expected
Degrees of Freedom (df) Number of values free to vary
p-value Probability of getting results at least as extreme if null hypothesis is true

Interpretation Guidelines

  • p < 0.01: Highly significant - very strong evidence against null hypothesis
  • p < 0.05: Significant - sufficient evidence to reject null hypothesis
  • p < 0.10: Marginally significant - weak evidence
  • p ≥ 0.10: Not significant - insufficient evidence to reject null hypothesis

Assumptions

  1. Random Sampling: Data should come from a random sample
  2. Independence: Observations should be independent
  3. Expected Frequencies: All expected frequencies should be ≥ 1, and at least 80% should be ≥ 5
  4. Categorical Data: Variables must be categorical (nominal or ordinal)

Note: If expected frequencies are too small, consider combining categories or using Fisher's exact test.