Related Functions:
The CHISQ.TEST function performs the chisquare test on two supplied data sets of observed and expected frequencies, and returns the probability that the differences between the sets are simply due to sampling error.
 This function was introduced in Excel 2010 and so is not available in earlier versions.
 CHISQ.TEST replaces the CHITEST function included in earlier versions of Excel.
Syntax
=CHISQ.TEST(actual_range,expected_range)
Arguments
Argument  Description 

actual_range  The range of data that contains observations to test against expected values 
expected_range  The range of data that contains the ratio of the product of row totals and column totals to the grand total 
Examples
A  B  C  D  E  F  G  H  

1  Observed Frequencies  Expected Frequencies  
2  Men  Women  Men  Women  
3  Agree  32  38  Agree  26.5  31.75  
4  Disagree  62  61  Disagree  57.25  59.8  
5  Neutral  6  1  Neutral  16.25  8.45  
6  
7  Formula  Result  Notes  
8  =CHISQ.TEST(B3:C5,F3:G5)  0.000366  The x^{2} statistic for the data above data with 2 degrees of freedom 
Common Function Error(s)
Problem  What went wrong  

#NUM!  Occurs if any of the values in the supplied expected_range are negative  
#N/A  Occurs if either:


#DIV/0!  Occurs if any of the values in the supplied expected_range are negative 
The chisquare test uses the chisquare distribution, to test whether there is a significant difference between observed frequencies and expected frequencies for a data set.
The chisquare distribution is given by the formula:
where:
A_{ij}  =  actual frequency in the i’th row & j’th column 
E_{ij}  =  expected frequency in the i’th row & j’th column 
r  =  number of rows 
c  =  number of columns 
The chisquare test gives an indication of whether the value of the chisquare distribution, for independent sets of data, is likely to have occurred by chance alone.
See Wikipedia for more information on the chisquare test.