Statistical

CHISQ.TEST Formula

Performs a chi-squared test of independence or goodness-of-fit and returns the p-value. It compares observed frequencies against expected frequencies to determine if there is a statistically significant association between categorical variables. This is one of the most widely used statistical tests in practice.

Syntax

CHISQ.TEST(actual_range, expected_range)
ParameterDescription
actual_range Parameter of the CHISQ.TEST function.
expected_range Parameter of the CHISQ.TEST function.
Try CHISQ.TEST in Viztab — free, no signup

Examples

Survey response by region

Formula
=CHISQ.TEST(A2:C4, E2:G4)
Returns the p-value testing whether survey responses (3 options) are independent of region (3 regions). The actual range contains observed counts; the expected range contains expected counts under independence.

Dice fairness test

Formula
=CHISQ.TEST(A2:A7, B2:B7)
Tests whether a die is fair by comparing observed roll frequencies (A) against expected equal frequencies (B). A low p-value suggests the die is biased.

Customer preference test

Formula
=CHISQ.TEST(C2:D5, F2:G5)
Tests whether product preference differs by demographic group. Returns a p-value indicating whether the association is statistically significant.

Common Errors

#N/A

Actual and expected ranges must have the same dimensions. Mismatched row or column counts cause this error.

#NUM!

Expected values must all be positive. A zero or negative expected frequency triggers this error.

Tips

Calculate expected values correctly

For a test of independence, expected = (row total * column total) / grand total. You must compute the expected range yourself — CHISQ.TEST does not do it for you.

Minimum expected frequency

The chi-squared test is unreliable when any expected frequency is below 5. If you have small expected counts, consider combining categories or using Fisher's exact test.

Interpret the p-value

If p < 0.05, there is evidence of a statistically significant association between the variables. A p-value near 1 means the observed data matches expected frequencies closely.

Try CHISQ.TEST in Viztab

Import your data and use CHISQ.TEST with 370+ other formulas. No signup required.

Open Viztab

Related Formulas