Taken from exmaple by Zhiyi Liu, zhiyil@fnal.gov here: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=6865 and converted into Python
the routine is used to calculate critical value given n and p, confidential level = 1 - p. Original Reference: http://velveeta.che.wisc.edu/octave/lists/archive//octave-sources.2003/msg00031.html I just checked it, but it is not available now...