Returns the test for independence. CHITEST returns the value from the chi-squared (c2) distribution for the statistic and the appropriate degrees of freedom. You can use c2 tests to determine whether hypothesized results are verified by an experiment.
Syntax
CHITEST(actual_range,expected_range)
Actual_range is the range of data that contains observations to test against expected values.
Expected_range is the range of data that contains the ratio of the product of row totals and column totals to the grand total.
Remarks
and 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
CHITEST returns the probability for a c2 statistic and degrees of freedom, df, where df = (r - 1)(c - 1).
Example
A |
B |
C | |
1 |
Actual | ||
2 |
Men |
Women | |
3 |
Agree |
58 |
35 |
4 |
Neutral |
11 |
25 |
5 |
Disagree |
10 |
23 |
6 | |||
7 |
Expected | ||
8 |
Men |
Women | |
9 |
Agree |
45.35 |
47.65 |
10 |
Neutral |
17.56 |
18.44 |
11 |
Disagree |
16.09 |
16.91 |
The c2 statistic for the data above is 16.16957 with 2 degrees of freedom.
CHITEST(B3:C5,B9:C11)
equals 0.000308