The definition for the Chi squared Cumulative Distribution Function given in 
the essay
http://www.jsoftware.com/jwiki/Essays/Chi%20Squared%20CDF and in the 
distribution.ijs script of the stats/base addon, seems to be unstable for large 
values.
For example:

   9 chisqcdf 5 10 30 100 1000 1400 1420 1470 1471
0.16569174 0.64951479 0.99956128 1 1 1 0 0 0
   9 chisqcdf 1472
|NaN error: chisqcdf
|       (1 H.(1+x)%x&((*^)*(^-)~))y

Also:
100 200 400 600 3545 chisqcdf 3
4.8195188e_57 9.8668347e_142 0 0 0
   3546 chisqcdf 3
|NaN error: chisqcdf
|   3546     chisqcdf 3

Has anyone come up with more robust implementations?

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to