Compatibility
Excel 2007 (Compatibility)
◉ 20 views
=CHITEST()
Returns the value from the chi-squared (χ2) distribution for the statistic and the appropriate degrees of freedom. You can use χ2 tests to determine whether hypothesized results are verified by an experiment.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=CHITEST(actual_range,expected_range)
Hover argument names in the table for details.
Output typeNumber
Popularity28 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =CHITEST() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
actual_range |
Range | Required | The range of data that contains observations to test against expected values. |
expected_range |
Range | Required | The range of data that contains the ratio of the product of row totals and column totals to the grand total. |
▣ Examples
▦ Data
| Cell | Value |
|---|---|
A2 |
58 |
B2 |
35 |
C2 |
Agree |
A3 |
11 |
B3 |
25 |
C3 |
Neutral |
A4 |
10 |
B4 |
23 |
C4 |
Disagree |
A5 |
Men (Expected) |
B5 |
Women (Expected) |
C5 |
Description |
A6 |
45.35 |
B6 |
47.65 |
C6 |
Agree |
A7 |
17.56 |
B7 |
18.44 |
C7 |
Neutral |
A8 |
16.09 |
B8 |
16.91 |
C8 |
Disagree |
A9 |
58 |
B9 |
35 |
C9 |
Agree |
A10 |
11 |
B10 |
25 |
C10 |
Neutral |
A11 |
10 |
B11 |
23 |
C11 |
Disagree |
A12 |
Men (Expected) |
B12 |
Women (Expected) |
C12 |
Description |
A13 |
45.35 |
B13 |
47.65 |
C13 |
Agree |
A14 |
17.56 |
B14 |
18.44 |
C14 |
Neutral |
A15 |
16.09 |
B15 |
16.91 |
C15 |
Disagree |
The χ2 statistic for the data above is 16.16957 with 2 degrees of freedom.
=CHITEST(A2:B4,A6:B8)
Result:
0.0003082
§ Remarks
- If actual_range and expected_range have a different number of data points, CHITEST returns the #N/A error value.
- The χ2 test first calculates a χ2 statistic using the formula: where: Aij = actual frequency in the i-th row, j-th column Eij = expected frequency in the i-th row, j-th column r = number or rows c = number of columns
- A low value of χ2 is an indicator of independence. As can be seen from the formula, χ2 is always positive or 0, and is 0 only if Aij = Eij for every i,j.
- CHITEST returns the probability that a value of the χ2 statistic at least as high as the value calculated by the above formula could have happened by chance under the assumption of independence. In computing this probability, CHITEST uses the χ2 distribution with an appropriate number of degrees of freedom, df. If r > 1 and c > 1, then df = (r - 1)(c - 1). If r = 1 and c > 1, then df = c - 1 or if r > 1 and c = 1, then df = r - 1. r = c= 1 is not allowed and #N/A is returned.
- Use of CHITEST is most appropriate when Eij’s are not too small. Some statisticians suggest that each Eij should be greater than or equal to 5.
✦ Tips
- This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. Although this function is still available for backward compatibility, you should consider using the new functions from now on, because this function may not be available in future versions of Excel.
- The χ2 test first calculates a χ2 statistic using the formula: where: Aij = actual frequency in the i-th row, j-th column Eij = expected frequency in the i-th row, j-th column r = number or rows c = number of columns
- A low value of χ2 is an indicator of independence. As can be seen from the formula, χ2 is always positive or 0, and is 0 only if Aij = Eij for every i,j.
- Use of CHITEST is most appropriate when Eij’s are not too small. Some statisticians suggest that each Eij should be greater than or equal to 5.
⚠ Common Errors
#N/A
If actual_range and expected_range have a different number of data points, CHITEST returns the #N/A error value. If r = 1 and c > 1, then df = c - 1 or if r > 1 and c = 1, then df = r - 1. r = c= 1 is not allowed and #N/A is returned.
Fix: مطمئن شوید هر دو محدوده هماندازهاند و حداقل دو سطر یا دو ستون دارند.
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!