Function Find-Critical-Value

Part of:

package cl-mathstats
( find-critical-value < p-function > < p-value > &optional < x-tolerance > < y-tolerance > )
Returns the critical value of some statistic. The function `p-function' should be a unary function mapping statistics---x values---to their significance---p values. The function will find the value of x such that the p-value is `p-value.' The function works by binary search. A secant method might be better, but this seems to be acceptably fast. Only positive values of x are considered, and `p-function' should be monotonically decreasing from its value at x=0. The binary search ends when either the function value is within `y-tolerance' of `p-value' or the size of the search region shrinks to less than `x-tolerance.'