Previous: stcalc, Up: statistics
calculate the probability distribution of Kolmogorov's goodness-of-fit measure.
#include <suplib/stats.h>int kolmogorov( int n, double d, double *p );
int n
- The number of random variates
double d
- The Kolmogorov statistic, D_n
double *p
- Output: probability( D_n < d )
kolmogorov
calculates the probability distribution of
Kolmogorov's goodness-of-fit measure, D_n, providing P(D_n < d).
This code is taken from G. Marsaglia, Wai Wan Tsang and Jingbo Wong, J.Stat.Software (http://www.jstatsoft.org/v08/i18/). The only changes were to support error returns.
0
ENOMEM
Original by G. Marsaglia, Wai Wan Tsang and Jingbo Wong.
As per http://www.jstatsoft.org/instructions.php
, "papers
and code on our servers, will be freely and unrestrictedly available
for anonymous ftp".