GNOME Bugzilla – Bug 615920
CHITEST function
Last modified: 2010-04-17 03:56:09 UTC
The CHITEST function currently calculates a goodness of fit test if the expected and observed range is an n by 1 or 1 by n range. If the ranges are m by n with both m and n at least 2, then Excel and OOo appear to use a degree of freedom of (n-1) * (m-1) which is only appropriate if the expected values are calculated from the observed values to perform a test of independence or a test of homogeneity. Of course in this case we should not need to specify the expected values. (Behaviour A) If the ranges are m by n with both m and n at least 2, one could also make sense out of this function by using degrees of freedom (n*m-1). In that case it would simply be a goodness of fit test (assuming that the expected values were determined apriori (rather than fromthe observed values). (Behaviour B) Currently in the case of the ranges being m by n with both m and n at least 2, gnumeric uses the degree of freedom (n-1). This does not make any sense at all. Gnumeric's behaviour should be changed to reflect either Behaviour A or B. The strength of Behaviour A is compatibility with Excel (and probably OOo) with the drawback that the results are only meaningful if the expected values are appropriate constructed, THe strength of Behaviour B is that it makes the most mathematical sense (unless the expected values are constructed from the observed ones.)
I would say do A+docs. There are surely detailed instructions out there for how to do this kind of test with Excel. Some of those instructions might even be correct. Adding to the confusion by behaving differently is not likely to help.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.