Loading…

A Test of Homogeneity

Statistics • Chi Square Tests

View all topics

A test of homogeneity checks whether two or more populations have the same distribution across a set of categories. The test statistic follows the chi-square distribution and is right-tailed.

Decision compares the p-value to α (and optionally to the critical value χ²α,df).

The test is right-tailed, so the rejection region is in the right tail.

Table size

Edit the observed counts below. Counts must be nonnegative and at least one cell should be positive.

Observed frequency table

Expected frequency formula: E = (Row total × Column total) / Grand total.

Ready
χ² model visualization (right-tailed)
0
After calculation, blue shading approximates the p-value (area to the right of χ²). Red shading is the rejection region at level α.

When this method applies

Use this calculator when:

  1. You have two or more independent samples (one from each population).
  2. Each sample is classified into the same categories.
  3. Expected frequencies are reasonably large (common guideline: most E ≥ 5).
Key formulas used
\[ \begin{aligned} E_{ij} &= \frac{(\text{row total}_i)(\text{column total}_j)}{N} \\ \chi^2 &= \sum_{i=1}^{R}\sum_{j=1}^{C}\frac{(O_{ij}-E_{ij})^2}{E_{ij}} \\ df &= (R-1)(C-1) \end{aligned} \]
Enter your observed counts and click Calculate.
Copy / export helpers
Observed and expected tables
After calculating, you can copy the observed/expected tables (TSV) and paste into a spreadsheet.
Batch mode: paste CSV/TSV tables (compute each block)

Paste one or more tables separated by a blank line. Each block is a rectangular table (optional header row / label column allowed).

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does a chi-square test of homogeneity test?

It tests whether two or more populations have the same distribution across a common set of categories. The null hypothesis states the category proportions are equal across populations.

How are expected counts computed for a homogeneity test?

Each expected count is computed from totals: Eij = (row total i x column total j) / N, where N is the grand total of all observations. These expected counts represent what you would expect if the populations were homogeneous.

What is the chi-square test statistic used in this calculator?

The test statistic is chi^2 = sum((Oij - Eij)^2 / Eij), summing over all cells of the table. Larger chi^2 values indicate a bigger departure from homogeneity.

What degrees of freedom does a homogeneity test use?

The degrees of freedom are df = (R - 1)(C - 1), where R is the number of category rows and C is the number of population columns. This df is used with the chi-square distribution to compute p-values and critical values.

When is the chi-square approximation reliable for a homogeneity test?

A common guideline is that expected counts should not be too small, often with most expected values at least 5. If expected counts are small, consider combining categories or collecting more data.