Returns the test for independence. 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.
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 γ2 statistic and degrees of freedom, df, where df = (r - 1)(c - 1).
Example
The example may be easier to understand if you copy it to a blank spreadsheet.
Selecting an example from Help
Men (Actual) | Women (Actual) | Description |
---|---|---|
58 | 35 | Agree |
11 | 25 | Neutral |
10 | 23 | Disagree |
Men (Expected) | Women (Expected) | Description |
45.35 | 47.65 | Agree |
17.56 | 18.44 | Neutral |
16.09 | 16.91 | Disagree |
Formula | Description (Result) | |
=CHITEST(A2:B4,A6:B8) | The γ2 statistic for the data above is 16.16957 with 2 degrees of freedom (0.000308) |