Next: stcalc, Previous: gsmirn, Up: statistics
exact Smirnov Two-Sample tests for arbitrary distributions.
#include <suplib/stats.h>int gsmirn2( int nx, int ny, int kind, int *m, double dstat, double *q );
int nx
- The number of observations in the first sample
int ny
- The number of observations in the second sample
int kind
- The hypothesis tested
int *m
- The number of observations falling into each of K categories (with ascending order of category values)
double dstat
- The statistic
double *q
- output: p-value
gsmirn2
generates the P-value for the generalized two-sample
Smirnov tests. It calculates the probability of the null hypothesis
(that the two samples are the same) based upon one of three
statistics
The input parameter kind
indicates which of these should be
calculated. The input parameters m
and dstat
are
calculated by the stcalc
subroutine.
This version uses the method of Timonin and Chernomordik (Theor. Prob.Appl.,1985) to avoid large numbers for P instead of direct scaling adopted by published algorithm AS 288.
One-sided tests are coded separately to use the fast calculation scheme
See also gsmirn
.
0
1
nx
< 1 or ny
< 1
2
kind
!= 1, 2 or 3
3
q
is not positive
4
m
is inconsistent with nx
and ny
or has
non-positive elements
5
Original by Andrei M. Nikiforov C transcription by Diab Jerius
As there is no copyright or license notice, it is assumed to be freely redistributable with no restrictions.