Class documentation of Concepts

Loading...
Searching...
No Matches
statistics.h
1/*************************************************************************
2ALGLIB 3.11.0 (source code generated 2017-05-11)
3Copyright (c) Sergey Bochkanov (ALGLIB project).
4
5>>> SOURCE LICENSE >>>
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation (www.fsf.org); either version 2 of the
9License, or (at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16A copy of the GNU General Public License is available at
17http://www.fsf.org/licensing/licenses
18>>> END OF LICENSE >>>
19*************************************************************************/
20#ifndef _statistics_pkg_h
21#define _statistics_pkg_h
22#include "ap.h"
23#include "alglibinternal.h"
24#include "linalg.h"
25#include "specialfunctions.h"
26#include "alglibmisc.h"
27
29//
30// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
31//
33namespace alglib_impl
34{
35
36}
37
39//
40// THIS SECTION CONTAINS C++ INTERFACE
41//
43namespace alglib
44{
45
46
47/*************************************************************************
48Calculation of the distribution moments: mean, variance, skewness, kurtosis.
49
50INPUT PARAMETERS:
51 X - sample
52 N - N>=0, sample size:
53 * if given, only leading N elements of X are processed
54 * if not given, automatically determined from size of X
55
56OUTPUT PARAMETERS
57 Mean - mean.
58 Variance- variance.
59 Skewness- skewness (if variance<>0; zero otherwise).
60 Kurtosis- kurtosis (if variance<>0; zero otherwise).
61
62NOTE: variance is calculated by dividing sum of squares by N-1, not N.
63
64 -- ALGLIB --
65 Copyright 06.09.2006 by Bochkanov Sergey
66*************************************************************************/
67void samplemoments(const real_1d_array &x, const ae_int_t n, double &mean, double &variance, double &skewness, double &kurtosis);
68void samplemoments(const real_1d_array &x, double &mean, double &variance, double &skewness, double &kurtosis);
69
70
71/*************************************************************************
72Calculation of the mean.
73
74INPUT PARAMETERS:
75 X - sample
76 N - N>=0, sample size:
77 * if given, only leading N elements of X are processed
78 * if not given, automatically determined from size of X
79
80NOTE:
81
82This function return result which calculated by 'SampleMoments' function
83and stored at 'Mean' variable.
84
85
86 -- ALGLIB --
87 Copyright 06.09.2006 by Bochkanov Sergey
88*************************************************************************/
89double samplemean(const real_1d_array &x, const ae_int_t n);
90double samplemean(const real_1d_array &x);
91
92
93/*************************************************************************
94Calculation of the variance.
95
96INPUT PARAMETERS:
97 X - sample
98 N - N>=0, sample size:
99 * if given, only leading N elements of X are processed
100 * if not given, automatically determined from size of X
101
102NOTE:
103
104This function return result which calculated by 'SampleMoments' function
105and stored at 'Variance' variable.
106
107
108 -- ALGLIB --
109 Copyright 06.09.2006 by Bochkanov Sergey
110*************************************************************************/
111double samplevariance(const real_1d_array &x, const ae_int_t n);
112double samplevariance(const real_1d_array &x);
113
114
115/*************************************************************************
116Calculation of the skewness.
117
118INPUT PARAMETERS:
119 X - sample
120 N - N>=0, sample size:
121 * if given, only leading N elements of X are processed
122 * if not given, automatically determined from size of X
123
124NOTE:
125
126This function return result which calculated by 'SampleMoments' function
127and stored at 'Skewness' variable.
128
129
130 -- ALGLIB --
131 Copyright 06.09.2006 by Bochkanov Sergey
132*************************************************************************/
133double sampleskewness(const real_1d_array &x, const ae_int_t n);
134double sampleskewness(const real_1d_array &x);
135
136
137/*************************************************************************
138Calculation of the kurtosis.
139
140INPUT PARAMETERS:
141 X - sample
142 N - N>=0, sample size:
143 * if given, only leading N elements of X are processed
144 * if not given, automatically determined from size of X
145
146NOTE:
147
148This function return result which calculated by 'SampleMoments' function
149and stored at 'Kurtosis' variable.
150
151
152 -- ALGLIB --
153 Copyright 06.09.2006 by Bochkanov Sergey
154*************************************************************************/
155double samplekurtosis(const real_1d_array &x, const ae_int_t n);
156double samplekurtosis(const real_1d_array &x);
157
158
159/*************************************************************************
160ADev
161
162Input parameters:
163 X - sample
164 N - N>=0, sample size:
165 * if given, only leading N elements of X are processed
166 * if not given, automatically determined from size of X
167
168Output parameters:
169 ADev- ADev
170
171 -- ALGLIB --
172 Copyright 06.09.2006 by Bochkanov Sergey
173*************************************************************************/
174void sampleadev(const real_1d_array &x, const ae_int_t n, double &adev);
175void sampleadev(const real_1d_array &x, double &adev);
176
177
178/*************************************************************************
179Median calculation.
180
181Input parameters:
182 X - sample (array indexes: [0..N-1])
183 N - N>=0, sample size:
184 * if given, only leading N elements of X are processed
185 * if not given, automatically determined from size of X
186
187Output parameters:
188 Median
189
190 -- ALGLIB --
191 Copyright 06.09.2006 by Bochkanov Sergey
192*************************************************************************/
193void samplemedian(const real_1d_array &x, const ae_int_t n, double &median);
194void samplemedian(const real_1d_array &x, double &median);
195
196
197/*************************************************************************
198Percentile calculation.
199
200Input parameters:
201 X - sample (array indexes: [0..N-1])
202 N - N>=0, sample size:
203 * if given, only leading N elements of X are processed
204 * if not given, automatically determined from size of X
205 P - percentile (0<=P<=1)
206
207Output parameters:
208 V - percentile
209
210 -- ALGLIB --
211 Copyright 01.03.2008 by Bochkanov Sergey
212*************************************************************************/
213void samplepercentile(const real_1d_array &x, const ae_int_t n, const double p, double &v);
214void samplepercentile(const real_1d_array &x, const double p, double &v);
215
216
217/*************************************************************************
2182-sample covariance
219
220Input parameters:
221 X - sample 1 (array indexes: [0..N-1])
222 Y - sample 2 (array indexes: [0..N-1])
223 N - N>=0, sample size:
224 * if given, only N leading elements of X/Y are processed
225 * if not given, automatically determined from input sizes
226
227Result:
228 covariance (zero for N=0 or N=1)
229
230 -- ALGLIB --
231 Copyright 28.10.2010 by Bochkanov Sergey
232*************************************************************************/
233double cov2(const real_1d_array &x, const real_1d_array &y, const ae_int_t n);
234double cov2(const real_1d_array &x, const real_1d_array &y);
235
236
237/*************************************************************************
238Pearson product-moment correlation coefficient
239
240Input parameters:
241 X - sample 1 (array indexes: [0..N-1])
242 Y - sample 2 (array indexes: [0..N-1])
243 N - N>=0, sample size:
244 * if given, only N leading elements of X/Y are processed
245 * if not given, automatically determined from input sizes
246
247Result:
248 Pearson product-moment correlation coefficient
249 (zero for N=0 or N=1)
250
251 -- ALGLIB --
252 Copyright 28.10.2010 by Bochkanov Sergey
253*************************************************************************/
254double pearsoncorr2(const real_1d_array &x, const real_1d_array &y, const ae_int_t n);
255double pearsoncorr2(const real_1d_array &x, const real_1d_array &y);
256
257
258/*************************************************************************
259Spearman's rank correlation coefficient
260
261Input parameters:
262 X - sample 1 (array indexes: [0..N-1])
263 Y - sample 2 (array indexes: [0..N-1])
264 N - N>=0, sample size:
265 * if given, only N leading elements of X/Y are processed
266 * if not given, automatically determined from input sizes
267
268Result:
269 Spearman's rank correlation coefficient
270 (zero for N=0 or N=1)
271
272 -- ALGLIB --
273 Copyright 09.04.2007 by Bochkanov Sergey
274*************************************************************************/
275double spearmancorr2(const real_1d_array &x, const real_1d_array &y, const ae_int_t n);
276double spearmancorr2(const real_1d_array &x, const real_1d_array &y);
277
278
279/*************************************************************************
280Covariance matrix
281
282SMP EDITION OF ALGLIB:
283
284 ! This function can utilize multicore capabilities of your system. In
285 ! order to do this you have to call version with "smp_" prefix, which
286 ! indicates that multicore code will be used.
287 !
288 ! This note is given for users of SMP edition; if you use GPL edition,
289 ! or commercial edition of ALGLIB without SMP support, you still will
290 ! be able to call smp-version of this function, but all computations
291 ! will be done serially.
292 !
293 ! We recommend you to carefully read ALGLIB Reference Manual, section
294 ! called 'SMP support', before using parallel version of this function.
295 !
296 ! You should remember that starting/stopping worker thread always have
297 ! non-zero cost. Although multicore version is pretty efficient on
298 ! large problems, we do not recommend you to use it on small problems -
299 ! with covariance matrices smaller than 128*128.
300
301INPUT PARAMETERS:
302 X - array[N,M], sample matrix:
303 * J-th column corresponds to J-th variable
304 * I-th row corresponds to I-th observation
305 N - N>=0, number of observations:
306 * if given, only leading N rows of X are used
307 * if not given, automatically determined from input size
308 M - M>0, number of variables:
309 * if given, only leading M columns of X are used
310 * if not given, automatically determined from input size
311
312OUTPUT PARAMETERS:
313 C - array[M,M], covariance matrix (zero if N=0 or N=1)
314
315 -- ALGLIB --
316 Copyright 28.10.2010 by Bochkanov Sergey
317*************************************************************************/
318void covm(const real_2d_array &x, const ae_int_t n, const ae_int_t m, real_2d_array &c);
319void smp_covm(const real_2d_array &x, const ae_int_t n, const ae_int_t m, real_2d_array &c);
320void covm(const real_2d_array &x, real_2d_array &c);
321void smp_covm(const real_2d_array &x, real_2d_array &c);
322
323
324/*************************************************************************
325Pearson product-moment correlation matrix
326
327SMP EDITION OF ALGLIB:
328
329 ! This function can utilize multicore capabilities of your system. In
330 ! order to do this you have to call version with "smp_" prefix, which
331 ! indicates that multicore code will be used.
332 !
333 ! This note is given for users of SMP edition; if you use GPL edition,
334 ! or commercial edition of ALGLIB without SMP support, you still will
335 ! be able to call smp-version of this function, but all computations
336 ! will be done serially.
337 !
338 ! We recommend you to carefully read ALGLIB Reference Manual, section
339 ! called 'SMP support', before using parallel version of this function.
340 !
341 ! You should remember that starting/stopping worker thread always have
342 ! non-zero cost. Although multicore version is pretty efficient on
343 ! large problems, we do not recommend you to use it on small problems -
344 ! with correlation matrices smaller than 128*128.
345
346INPUT PARAMETERS:
347 X - array[N,M], sample matrix:
348 * J-th column corresponds to J-th variable
349 * I-th row corresponds to I-th observation
350 N - N>=0, number of observations:
351 * if given, only leading N rows of X are used
352 * if not given, automatically determined from input size
353 M - M>0, number of variables:
354 * if given, only leading M columns of X are used
355 * if not given, automatically determined from input size
356
357OUTPUT PARAMETERS:
358 C - array[M,M], correlation matrix (zero if N=0 or N=1)
359
360 -- ALGLIB --
361 Copyright 28.10.2010 by Bochkanov Sergey
362*************************************************************************/
363void pearsoncorrm(const real_2d_array &x, const ae_int_t n, const ae_int_t m, real_2d_array &c);
364void smp_pearsoncorrm(const real_2d_array &x, const ae_int_t n, const ae_int_t m, real_2d_array &c);
365void pearsoncorrm(const real_2d_array &x, real_2d_array &c);
366void smp_pearsoncorrm(const real_2d_array &x, real_2d_array &c);
367
368
369/*************************************************************************
370Spearman's rank correlation matrix
371
372SMP EDITION OF ALGLIB:
373
374 ! This function can utilize multicore capabilities of your system. In
375 ! order to do this you have to call version with "smp_" prefix, which
376 ! indicates that multicore code will be used.
377 !
378 ! This note is given for users of SMP edition; if you use GPL edition,
379 ! or commercial edition of ALGLIB without SMP support, you still will
380 ! be able to call smp-version of this function, but all computations
381 ! will be done serially.
382 !
383 ! We recommend you to carefully read ALGLIB Reference Manual, section
384 ! called 'SMP support', before using parallel version of this function.
385 !
386 ! You should remember that starting/stopping worker thread always have
387 ! non-zero cost. Although multicore version is pretty efficient on
388 ! large problems, we do not recommend you to use it on small problems -
389 ! with correlation matrices smaller than 128*128.
390
391INPUT PARAMETERS:
392 X - array[N,M], sample matrix:
393 * J-th column corresponds to J-th variable
394 * I-th row corresponds to I-th observation
395 N - N>=0, number of observations:
396 * if given, only leading N rows of X are used
397 * if not given, automatically determined from input size
398 M - M>0, number of variables:
399 * if given, only leading M columns of X are used
400 * if not given, automatically determined from input size
401
402OUTPUT PARAMETERS:
403 C - array[M,M], correlation matrix (zero if N=0 or N=1)
404
405 -- ALGLIB --
406 Copyright 28.10.2010 by Bochkanov Sergey
407*************************************************************************/
408void spearmancorrm(const real_2d_array &x, const ae_int_t n, const ae_int_t m, real_2d_array &c);
409void smp_spearmancorrm(const real_2d_array &x, const ae_int_t n, const ae_int_t m, real_2d_array &c);
410void spearmancorrm(const real_2d_array &x, real_2d_array &c);
411void smp_spearmancorrm(const real_2d_array &x, real_2d_array &c);
412
413
414/*************************************************************************
415Cross-covariance matrix
416
417SMP EDITION OF ALGLIB:
418
419 ! This function can utilize multicore capabilities of your system. In
420 ! order to do this you have to call version with "smp_" prefix, which
421 ! indicates that multicore code will be used.
422 !
423 ! This note is given for users of SMP edition; if you use GPL edition,
424 ! or commercial edition of ALGLIB without SMP support, you still will
425 ! be able to call smp-version of this function, but all computations
426 ! will be done serially.
427 !
428 ! We recommend you to carefully read ALGLIB Reference Manual, section
429 ! called 'SMP support', before using parallel version of this function.
430 !
431 ! You should remember that starting/stopping worker thread always have
432 ! non-zero cost. Although multicore version is pretty efficient on
433 ! large problems, we do not recommend you to use it on small problems -
434 ! with covariance matrices smaller than 128*128.
435
436INPUT PARAMETERS:
437 X - array[N,M1], sample matrix:
438 * J-th column corresponds to J-th variable
439 * I-th row corresponds to I-th observation
440 Y - array[N,M2], sample matrix:
441 * J-th column corresponds to J-th variable
442 * I-th row corresponds to I-th observation
443 N - N>=0, number of observations:
444 * if given, only leading N rows of X/Y are used
445 * if not given, automatically determined from input sizes
446 M1 - M1>0, number of variables in X:
447 * if given, only leading M1 columns of X are used
448 * if not given, automatically determined from input size
449 M2 - M2>0, number of variables in Y:
450 * if given, only leading M1 columns of X are used
451 * if not given, automatically determined from input size
452
453OUTPUT PARAMETERS:
454 C - array[M1,M2], cross-covariance matrix (zero if N=0 or N=1)
455
456 -- ALGLIB --
457 Copyright 28.10.2010 by Bochkanov Sergey
458*************************************************************************/
459void covm2(const real_2d_array &x, const real_2d_array &y, const ae_int_t n, const ae_int_t m1, const ae_int_t m2, real_2d_array &c);
460void smp_covm2(const real_2d_array &x, const real_2d_array &y, const ae_int_t n, const ae_int_t m1, const ae_int_t m2, real_2d_array &c);
461void covm2(const real_2d_array &x, const real_2d_array &y, real_2d_array &c);
462void smp_covm2(const real_2d_array &x, const real_2d_array &y, real_2d_array &c);
463
464
465/*************************************************************************
466Pearson product-moment cross-correlation matrix
467
468SMP EDITION OF ALGLIB:
469
470 ! This function can utilize multicore capabilities of your system. In
471 ! order to do this you have to call version with "smp_" prefix, which
472 ! indicates that multicore code will be used.
473 !
474 ! This note is given for users of SMP edition; if you use GPL edition,
475 ! or commercial edition of ALGLIB without SMP support, you still will
476 ! be able to call smp-version of this function, but all computations
477 ! will be done serially.
478 !
479 ! We recommend you to carefully read ALGLIB Reference Manual, section
480 ! called 'SMP support', before using parallel version of this function.
481 !
482 ! You should remember that starting/stopping worker thread always have
483 ! non-zero cost. Although multicore version is pretty efficient on
484 ! large problems, we do not recommend you to use it on small problems -
485 ! with correlation matrices smaller than 128*128.
486
487INPUT PARAMETERS:
488 X - array[N,M1], sample matrix:
489 * J-th column corresponds to J-th variable
490 * I-th row corresponds to I-th observation
491 Y - array[N,M2], sample matrix:
492 * J-th column corresponds to J-th variable
493 * I-th row corresponds to I-th observation
494 N - N>=0, number of observations:
495 * if given, only leading N rows of X/Y are used
496 * if not given, automatically determined from input sizes
497 M1 - M1>0, number of variables in X:
498 * if given, only leading M1 columns of X are used
499 * if not given, automatically determined from input size
500 M2 - M2>0, number of variables in Y:
501 * if given, only leading M1 columns of X are used
502 * if not given, automatically determined from input size
503
504OUTPUT PARAMETERS:
505 C - array[M1,M2], cross-correlation matrix (zero if N=0 or N=1)
506
507 -- ALGLIB --
508 Copyright 28.10.2010 by Bochkanov Sergey
509*************************************************************************/
510void pearsoncorrm2(const real_2d_array &x, const real_2d_array &y, const ae_int_t n, const ae_int_t m1, const ae_int_t m2, real_2d_array &c);
511void smp_pearsoncorrm2(const real_2d_array &x, const real_2d_array &y, const ae_int_t n, const ae_int_t m1, const ae_int_t m2, real_2d_array &c);
512void pearsoncorrm2(const real_2d_array &x, const real_2d_array &y, real_2d_array &c);
513void smp_pearsoncorrm2(const real_2d_array &x, const real_2d_array &y, real_2d_array &c);
514
515
516/*************************************************************************
517Spearman's rank cross-correlation matrix
518
519SMP EDITION OF ALGLIB:
520
521 ! This function can utilize multicore capabilities of your system. In
522 ! order to do this you have to call version with "smp_" prefix, which
523 ! indicates that multicore code will be used.
524 !
525 ! This note is given for users of SMP edition; if you use GPL edition,
526 ! or commercial edition of ALGLIB without SMP support, you still will
527 ! be able to call smp-version of this function, but all computations
528 ! will be done serially.
529 !
530 ! We recommend you to carefully read ALGLIB Reference Manual, section
531 ! called 'SMP support', before using parallel version of this function.
532 !
533 ! You should remember that starting/stopping worker thread always have
534 ! non-zero cost. Although multicore version is pretty efficient on
535 ! large problems, we do not recommend you to use it on small problems -
536 ! with correlation matrices smaller than 128*128.
537
538INPUT PARAMETERS:
539 X - array[N,M1], sample matrix:
540 * J-th column corresponds to J-th variable
541 * I-th row corresponds to I-th observation
542 Y - array[N,M2], sample matrix:
543 * J-th column corresponds to J-th variable
544 * I-th row corresponds to I-th observation
545 N - N>=0, number of observations:
546 * if given, only leading N rows of X/Y are used
547 * if not given, automatically determined from input sizes
548 M1 - M1>0, number of variables in X:
549 * if given, only leading M1 columns of X are used
550 * if not given, automatically determined from input size
551 M2 - M2>0, number of variables in Y:
552 * if given, only leading M1 columns of X are used
553 * if not given, automatically determined from input size
554
555OUTPUT PARAMETERS:
556 C - array[M1,M2], cross-correlation matrix (zero if N=0 or N=1)
557
558 -- ALGLIB --
559 Copyright 28.10.2010 by Bochkanov Sergey
560*************************************************************************/
561void spearmancorrm2(const real_2d_array &x, const real_2d_array &y, const ae_int_t n, const ae_int_t m1, const ae_int_t m2, real_2d_array &c);
562void smp_spearmancorrm2(const real_2d_array &x, const real_2d_array &y, const ae_int_t n, const ae_int_t m1, const ae_int_t m2, real_2d_array &c);
563void spearmancorrm2(const real_2d_array &x, const real_2d_array &y, real_2d_array &c);
564void smp_spearmancorrm2(const real_2d_array &x, const real_2d_array &y, real_2d_array &c);
565
566
567/*************************************************************************
568This function replaces data in XY by their ranks:
569* XY is processed row-by-row
570* rows are processed separately
571* tied data are correctly handled (tied ranks are calculated)
572* ranking starts from 0, ends at NFeatures-1
573* sum of within-row values is equal to (NFeatures-1)*NFeatures/2
574
575SMP EDITION OF ALGLIB:
576
577 ! This function can utilize multicore capabilities of your system. In
578 ! order to do this you have to call version with "smp_" prefix, which
579 ! indicates that multicore code will be used.
580 !
581 ! This note is given for users of SMP edition; if you use GPL edition,
582 ! or commercial edition of ALGLIB without SMP support, you still will
583 ! be able to call smp-version of this function, but all computations
584 ! will be done serially.
585 !
586 ! We recommend you to carefully read ALGLIB Reference Manual, section
587 ! called 'SMP support', before using parallel version of this function.
588 !
589 ! You should remember that starting/stopping worker thread always have
590 ! non-zero cost. Although multicore version is pretty efficient on
591 ! large problems, we do not recommend you to use it on small problems -
592 ! ones where expected operations count is less than 100.000
593
594INPUT PARAMETERS:
595 XY - array[NPoints,NFeatures], dataset
596 NPoints - number of points
597 NFeatures- number of features
598
599OUTPUT PARAMETERS:
600 XY - data are replaced by their within-row ranks;
601 ranking starts from 0, ends at NFeatures-1
602
603 -- ALGLIB --
604 Copyright 18.04.2013 by Bochkanov Sergey
605*************************************************************************/
606void rankdata(const real_2d_array &xy, const ae_int_t npoints, const ae_int_t nfeatures);
607void smp_rankdata(const real_2d_array &xy, const ae_int_t npoints, const ae_int_t nfeatures);
608void rankdata(real_2d_array &xy);
609void smp_rankdata(real_2d_array &xy);
610
611
612/*************************************************************************
613This function replaces data in XY by their CENTERED ranks:
614* XY is processed row-by-row
615* rows are processed separately
616* tied data are correctly handled (tied ranks are calculated)
617* centered ranks are just usual ranks, but centered in such way that sum
618 of within-row values is equal to 0.0.
619* centering is performed by subtracting mean from each row, i.e it changes
620 mean value, but does NOT change higher moments
621
622SMP EDITION OF ALGLIB:
623
624 ! This function can utilize multicore capabilities of your system. In
625 ! order to do this you have to call version with "smp_" prefix, which
626 ! indicates that multicore code will be used.
627 !
628 ! This note is given for users of SMP edition; if you use GPL edition,
629 ! or commercial edition of ALGLIB without SMP support, you still will
630 ! be able to call smp-version of this function, but all computations
631 ! will be done serially.
632 !
633 ! We recommend you to carefully read ALGLIB Reference Manual, section
634 ! called 'SMP support', before using parallel version of this function.
635 !
636 ! You should remember that starting/stopping worker thread always have
637 ! non-zero cost. Although multicore version is pretty efficient on
638 ! large problems, we do not recommend you to use it on small problems -
639 ! ones where expected operations count is less than 100.000
640
641INPUT PARAMETERS:
642 XY - array[NPoints,NFeatures], dataset
643 NPoints - number of points
644 NFeatures- number of features
645
646OUTPUT PARAMETERS:
647 XY - data are replaced by their within-row ranks;
648 ranking starts from 0, ends at NFeatures-1
649
650 -- ALGLIB --
651 Copyright 18.04.2013 by Bochkanov Sergey
652*************************************************************************/
653void rankdatacentered(const real_2d_array &xy, const ae_int_t npoints, const ae_int_t nfeatures);
654void smp_rankdatacentered(const real_2d_array &xy, const ae_int_t npoints, const ae_int_t nfeatures);
655void rankdatacentered(real_2d_array &xy);
656void smp_rankdatacentered(real_2d_array &xy);
657
658
659/*************************************************************************
660Obsolete function, we recommend to use PearsonCorr2().
661
662 -- ALGLIB --
663 Copyright 09.04.2007 by Bochkanov Sergey
664*************************************************************************/
665double pearsoncorrelation(const real_1d_array &x, const real_1d_array &y, const ae_int_t n);
666
667
668/*************************************************************************
669Obsolete function, we recommend to use SpearmanCorr2().
670
671 -- ALGLIB --
672 Copyright 09.04.2007 by Bochkanov Sergey
673*************************************************************************/
674double spearmanrankcorrelation(const real_1d_array &x, const real_1d_array &y, const ae_int_t n);
675
676/*************************************************************************
677Wilcoxon signed-rank test
678
679This test checks three hypotheses about the median of the given sample.
680The following tests are performed:
681 * two-tailed test (null hypothesis - the median is equal to the given
682 value)
683 * left-tailed test (null hypothesis - the median is greater than or
684 equal to the given value)
685 * right-tailed test (null hypothesis - the median is less than or
686 equal to the given value)
687
688Requirements:
689 * the scale of measurement should be ordinal, interval or ratio (i.e.
690 the test could not be applied to nominal variables).
691 * the distribution should be continuous and symmetric relative to its
692 median.
693 * number of distinct values in the X array should be greater than 4
694
695The test is non-parametric and doesn't require distribution X to be normal
696
697Input parameters:
698 X - sample. Array whose index goes from 0 to N-1.
699 N - size of the sample.
700 Median - assumed median value.
701
702Output parameters:
703 BothTails - p-value for two-tailed test.
704 If BothTails is less than the given significance level
705 the null hypothesis is rejected.
706 LeftTail - p-value for left-tailed test.
707 If LeftTail is less than the given significance level,
708 the null hypothesis is rejected.
709 RightTail - p-value for right-tailed test.
710 If RightTail is less than the given significance level
711 the null hypothesis is rejected.
712
713To calculate p-values, special approximation is used. This method lets us
714calculate p-values with two decimal places in interval [0.0001, 1].
715
716"Two decimal places" does not sound very impressive, but in practice the
717relative error of less than 1% is enough to make a decision.
718
719There is no approximation outside the [0.0001, 1] interval. Therefore, if
720the significance level outlies this interval, the test returns 0.0001.
721
722 -- ALGLIB --
723 Copyright 08.09.2006 by Bochkanov Sergey
724*************************************************************************/
725void wilcoxonsignedranktest(const real_1d_array &x, const ae_int_t n, const double e, double &bothtails, double &lefttail, double &righttail);
726
727/*************************************************************************
728Sign test
729
730This test checks three hypotheses about the median of the given sample.
731The following tests are performed:
732 * two-tailed test (null hypothesis - the median is equal to the given
733 value)
734 * left-tailed test (null hypothesis - the median is greater than or
735 equal to the given value)
736 * right-tailed test (null hypothesis - the median is less than or
737 equal to the given value)
738
739Requirements:
740 * the scale of measurement should be ordinal, interval or ratio (i.e.
741 the test could not be applied to nominal variables).
742
743The test is non-parametric and doesn't require distribution X to be normal
744
745Input parameters:
746 X - sample. Array whose index goes from 0 to N-1.
747 N - size of the sample.
748 Median - assumed median value.
749
750Output parameters:
751 BothTails - p-value for two-tailed test.
752 If BothTails is less than the given significance level
753 the null hypothesis is rejected.
754 LeftTail - p-value for left-tailed test.
755 If LeftTail is less than the given significance level,
756 the null hypothesis is rejected.
757 RightTail - p-value for right-tailed test.
758 If RightTail is less than the given significance level
759 the null hypothesis is rejected.
760
761While calculating p-values high-precision binomial distribution
762approximation is used, so significance levels have about 15 exact digits.
763
764 -- ALGLIB --
765 Copyright 08.09.2006 by Bochkanov Sergey
766*************************************************************************/
767void onesamplesigntest(const real_1d_array &x, const ae_int_t n, const double median, double &bothtails, double &lefttail, double &righttail);
768
769/*************************************************************************
770Pearson's correlation coefficient significance test
771
772This test checks hypotheses about whether X and Y are samples of two
773continuous distributions having zero correlation or whether their
774correlation is non-zero.
775
776The following tests are performed:
777 * two-tailed test (null hypothesis - X and Y have zero correlation)
778 * left-tailed test (null hypothesis - the correlation coefficient is
779 greater than or equal to 0)
780 * right-tailed test (null hypothesis - the correlation coefficient is
781 less than or equal to 0).
782
783Requirements:
784 * the number of elements in each sample is not less than 5
785 * normality of distributions of X and Y.
786
787Input parameters:
788 R - Pearson's correlation coefficient for X and Y
789 N - number of elements in samples, N>=5.
790
791Output parameters:
792 BothTails - p-value for two-tailed test.
793 If BothTails is less than the given significance level
794 the null hypothesis is rejected.
795 LeftTail - p-value for left-tailed test.
796 If LeftTail is less than the given significance level,
797 the null hypothesis is rejected.
798 RightTail - p-value for right-tailed test.
799 If RightTail is less than the given significance level
800 the null hypothesis is rejected.
801
802 -- ALGLIB --
803 Copyright 09.04.2007 by Bochkanov Sergey
804*************************************************************************/
805void pearsoncorrelationsignificance(const double r, const ae_int_t n, double &bothtails, double &lefttail, double &righttail);
806
807
808/*************************************************************************
809Spearman's rank correlation coefficient significance test
810
811This test checks hypotheses about whether X and Y are samples of two
812continuous distributions having zero correlation or whether their
813correlation is non-zero.
814
815The following tests are performed:
816 * two-tailed test (null hypothesis - X and Y have zero correlation)
817 * left-tailed test (null hypothesis - the correlation coefficient is
818 greater than or equal to 0)
819 * right-tailed test (null hypothesis - the correlation coefficient is
820 less than or equal to 0).
821
822Requirements:
823 * the number of elements in each sample is not less than 5.
824
825The test is non-parametric and doesn't require distributions X and Y to be
826normal.
827
828Input parameters:
829 R - Spearman's rank correlation coefficient for X and Y
830 N - number of elements in samples, N>=5.
831
832Output parameters:
833 BothTails - p-value for two-tailed test.
834 If BothTails is less than the given significance level
835 the null hypothesis is rejected.
836 LeftTail - p-value for left-tailed test.
837 If LeftTail is less than the given significance level,
838 the null hypothesis is rejected.
839 RightTail - p-value for right-tailed test.
840 If RightTail is less than the given significance level
841 the null hypothesis is rejected.
842
843 -- ALGLIB --
844 Copyright 09.04.2007 by Bochkanov Sergey
845*************************************************************************/
846void spearmanrankcorrelationsignificance(const double r, const ae_int_t n, double &bothtails, double &lefttail, double &righttail);
847
848/*************************************************************************
849One-sample t-test
850
851This test checks three hypotheses about the mean of the given sample. The
852following tests are performed:
853 * two-tailed test (null hypothesis - the mean is equal to the given
854 value)
855 * left-tailed test (null hypothesis - the mean is greater than or
856 equal to the given value)
857 * right-tailed test (null hypothesis - the mean is less than or equal
858 to the given value).
859
860The test is based on the assumption that a given sample has a normal
861distribution and an unknown dispersion. If the distribution sharply
862differs from normal, the test will work incorrectly.
863
864INPUT PARAMETERS:
865 X - sample. Array whose index goes from 0 to N-1.
866 N - size of sample, N>=0
867 Mean - assumed value of the mean.
868
869OUTPUT PARAMETERS:
870 BothTails - p-value for two-tailed test.
871 If BothTails is less than the given significance level
872 the null hypothesis is rejected.
873 LeftTail - p-value for left-tailed test.
874 If LeftTail is less than the given significance level,
875 the null hypothesis is rejected.
876 RightTail - p-value for right-tailed test.
877 If RightTail is less than the given significance level
878 the null hypothesis is rejected.
879
880NOTE: this function correctly handles degenerate cases:
881 * when N=0, all p-values are set to 1.0
882 * when variance of X[] is exactly zero, p-values are set
883 to 1.0 or 0.0, depending on difference between sample mean and
884 value of mean being tested.
885
886
887 -- ALGLIB --
888 Copyright 08.09.2006 by Bochkanov Sergey
889*************************************************************************/
890void studentttest1(const real_1d_array &x, const ae_int_t n, const double mean, double &bothtails, double &lefttail, double &righttail);
891
892
893/*************************************************************************
894Two-sample pooled test
895
896This test checks three hypotheses about the mean of the given samples. The
897following tests are performed:
898 * two-tailed test (null hypothesis - the means are equal)
899 * left-tailed test (null hypothesis - the mean of the first sample is
900 greater than or equal to the mean of the second sample)
901 * right-tailed test (null hypothesis - the mean of the first sample is
902 less than or equal to the mean of the second sample).
903
904Test is based on the following assumptions:
905 * given samples have normal distributions
906 * dispersions are equal
907 * samples are independent.
908
909Input parameters:
910 X - sample 1. Array whose index goes from 0 to N-1.
911 N - size of sample.
912 Y - sample 2. Array whose index goes from 0 to M-1.
913 M - size of sample.
914
915Output parameters:
916 BothTails - p-value for two-tailed test.
917 If BothTails is less than the given significance level
918 the null hypothesis is rejected.
919 LeftTail - p-value for left-tailed test.
920 If LeftTail is less than the given significance level,
921 the null hypothesis is rejected.
922 RightTail - p-value for right-tailed test.
923 If RightTail is less than the given significance level
924 the null hypothesis is rejected.
925
926NOTE: this function correctly handles degenerate cases:
927 * when N=0 or M=0, all p-values are set to 1.0
928 * when both samples has exactly zero variance, p-values are set
929 to 1.0 or 0.0, depending on difference between means.
930
931 -- ALGLIB --
932 Copyright 18.09.2006 by Bochkanov Sergey
933*************************************************************************/
934void studentttest2(const real_1d_array &x, const ae_int_t n, const real_1d_array &y, const ae_int_t m, double &bothtails, double &lefttail, double &righttail);
935
936
937/*************************************************************************
938Two-sample unpooled test
939
940This test checks three hypotheses about the mean of the given samples. The
941following tests are performed:
942 * two-tailed test (null hypothesis - the means are equal)
943 * left-tailed test (null hypothesis - the mean of the first sample is
944 greater than or equal to the mean of the second sample)
945 * right-tailed test (null hypothesis - the mean of the first sample is
946 less than or equal to the mean of the second sample).
947
948Test is based on the following assumptions:
949 * given samples have normal distributions
950 * samples are independent.
951Equality of variances is NOT required.
952
953Input parameters:
954 X - sample 1. Array whose index goes from 0 to N-1.
955 N - size of the sample.
956 Y - sample 2. Array whose index goes from 0 to M-1.
957 M - size of the sample.
958
959Output parameters:
960 BothTails - p-value for two-tailed test.
961 If BothTails is less than the given significance level
962 the null hypothesis is rejected.
963 LeftTail - p-value for left-tailed test.
964 If LeftTail is less than the given significance level,
965 the null hypothesis is rejected.
966 RightTail - p-value for right-tailed test.
967 If RightTail is less than the given significance level
968 the null hypothesis is rejected.
969
970NOTE: this function correctly handles degenerate cases:
971 * when N=0 or M=0, all p-values are set to 1.0
972 * when both samples has zero variance, p-values are set
973 to 1.0 or 0.0, depending on difference between means.
974 * when only one sample has zero variance, test reduces to 1-sample
975 version.
976
977 -- ALGLIB --
978 Copyright 18.09.2006 by Bochkanov Sergey
979*************************************************************************/
980void unequalvariancettest(const real_1d_array &x, const ae_int_t n, const real_1d_array &y, const ae_int_t m, double &bothtails, double &lefttail, double &righttail);
981
982/*************************************************************************
983Mann-Whitney U-test
984
985This test checks hypotheses about whether X and Y are samples of two
986continuous distributions of the same shape and same median or whether
987their medians are different.
988
989The following tests are performed:
990 * two-tailed test (null hypothesis - the medians are equal)
991 * left-tailed test (null hypothesis - the median of the first sample
992 is greater than or equal to the median of the second sample)
993 * right-tailed test (null hypothesis - the median of the first sample
994 is less than or equal to the median of the second sample).
995
996Requirements:
997 * the samples are independent
998 * X and Y are continuous distributions (or discrete distributions well-
999 approximating continuous distributions)
1000 * distributions of X and Y have the same shape. The only possible
1001 difference is their position (i.e. the value of the median)
1002 * the number of elements in each sample is not less than 5
1003 * the scale of measurement should be ordinal, interval or ratio (i.e.
1004 the test could not be applied to nominal variables).
1005
1006The test is non-parametric and doesn't require distributions to be normal.
1007
1008Input parameters:
1009 X - sample 1. Array whose index goes from 0 to N-1.
1010 N - size of the sample. N>=5
1011 Y - sample 2. Array whose index goes from 0 to M-1.
1012 M - size of the sample. M>=5
1013
1014Output parameters:
1015 BothTails - p-value for two-tailed test.
1016 If BothTails is less than the given significance level
1017 the null hypothesis is rejected.
1018 LeftTail - p-value for left-tailed test.
1019 If LeftTail is less than the given significance level,
1020 the null hypothesis is rejected.
1021 RightTail - p-value for right-tailed test.
1022 If RightTail is less than the given significance level
1023 the null hypothesis is rejected.
1024
1025To calculate p-values, special approximation is used. This method lets us
1026calculate p-values with satisfactory accuracy in interval [0.0001, 1].
1027There is no approximation outside the [0.0001, 1] interval. Therefore, if
1028the significance level outlies this interval, the test returns 0.0001.
1029
1030Relative precision of approximation of p-value:
1031
1032N M Max.err. Rms.err.
10335..10 N..10 1.4e-02 6.0e-04
10345..10 N..100 2.2e-02 5.3e-06
103510..15 N..15 1.0e-02 3.2e-04
103610..15 N..100 1.0e-02 2.2e-05
103715..100 N..100 6.1e-03 2.7e-06
1038
1039For N,M>100 accuracy checks weren't put into practice, but taking into
1040account characteristics of asymptotic approximation used, precision should
1041not be sharply different from the values for interval [5, 100].
1042
1043NOTE: P-value approximation was optimized for 0.0001<=p<=0.2500. Thus,
1044 P's outside of this interval are enforced to these bounds. Say, you
1045 may quite often get P equal to exactly 0.25 or 0.0001.
1046
1047 -- ALGLIB --
1048 Copyright 09.04.2007 by Bochkanov Sergey
1049*************************************************************************/
1050void mannwhitneyutest(const real_1d_array &x, const ae_int_t n, const real_1d_array &y, const ae_int_t m, double &bothtails, double &lefttail, double &righttail);
1051
1052/*************************************************************************
1053Jarque-Bera test
1054
1055This test checks hypotheses about the fact that a given sample X is a
1056sample of normal random variable.
1057
1058Requirements:
1059 * the number of elements in the sample is not less than 5.
1060
1061Input parameters:
1062 X - sample. Array whose index goes from 0 to N-1.
1063 N - size of the sample. N>=5
1064
1065Output parameters:
1066 P - p-value for the test
1067
1068Accuracy of the approximation used (5<=N<=1951):
1069
1070p-value relative error (5<=N<=1951)
1071[1, 0.1] < 1%
1072[0.1, 0.01] < 2%
1073[0.01, 0.001] < 6%
1074[0.001, 0] wasn't measured
1075
1076For N>1951 accuracy wasn't measured but it shouldn't be sharply different
1077from table values.
1078
1079 -- ALGLIB --
1080 Copyright 09.04.2007 by Bochkanov Sergey
1081*************************************************************************/
1082void jarqueberatest(const real_1d_array &x, const ae_int_t n, double &p);
1083
1084/*************************************************************************
1085Two-sample F-test
1086
1087This test checks three hypotheses about dispersions of the given samples.
1088The following tests are performed:
1089 * two-tailed test (null hypothesis - the dispersions are equal)
1090 * left-tailed test (null hypothesis - the dispersion of the first
1091 sample is greater than or equal to the dispersion of the second
1092 sample).
1093 * right-tailed test (null hypothesis - the dispersion of the first
1094 sample is less than or equal to the dispersion of the second sample)
1095
1096The test is based on the following assumptions:
1097 * the given samples have normal distributions
1098 * the samples are independent.
1099
1100Input parameters:
1101 X - sample 1. Array whose index goes from 0 to N-1.
1102 N - sample size.
1103 Y - sample 2. Array whose index goes from 0 to M-1.
1104 M - sample size.
1105
1106Output parameters:
1107 BothTails - p-value for two-tailed test.
1108 If BothTails is less than the given significance level
1109 the null hypothesis is rejected.
1110 LeftTail - p-value for left-tailed test.
1111 If LeftTail is less than the given significance level,
1112 the null hypothesis is rejected.
1113 RightTail - p-value for right-tailed test.
1114 If RightTail is less than the given significance level
1115 the null hypothesis is rejected.
1116
1117 -- ALGLIB --
1118 Copyright 19.09.2006 by Bochkanov Sergey
1119*************************************************************************/
1120void ftest(const real_1d_array &x, const ae_int_t n, const real_1d_array &y, const ae_int_t m, double &bothtails, double &lefttail, double &righttail);
1121
1122
1123/*************************************************************************
1124One-sample chi-square test
1125
1126This test checks three hypotheses about the dispersion of the given sample
1127The following tests are performed:
1128 * two-tailed test (null hypothesis - the dispersion equals the given
1129 number)
1130 * left-tailed test (null hypothesis - the dispersion is greater than
1131 or equal to the given number)
1132 * right-tailed test (null hypothesis - dispersion is less than or
1133 equal to the given number).
1134
1135Test is based on the following assumptions:
1136 * the given sample has a normal distribution.
1137
1138Input parameters:
1139 X - sample 1. Array whose index goes from 0 to N-1.
1140 N - size of the sample.
1141 Variance - dispersion value to compare with.
1142
1143Output parameters:
1144 BothTails - p-value for two-tailed test.
1145 If BothTails is less than the given significance level
1146 the null hypothesis is rejected.
1147 LeftTail - p-value for left-tailed test.
1148 If LeftTail is less than the given significance level,
1149 the null hypothesis is rejected.
1150 RightTail - p-value for right-tailed test.
1151 If RightTail is less than the given significance level
1152 the null hypothesis is rejected.
1153
1154 -- ALGLIB --
1155 Copyright 19.09.2006 by Bochkanov Sergey
1156*************************************************************************/
1157void onesamplevariancetest(const real_1d_array &x, const ae_int_t n, const double variance, double &bothtails, double &lefttail, double &righttail);
1158}
1159
1161//
1162// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
1163//
1165namespace alglib_impl
1166{
1167void samplemoments(/* Real */ ae_vector* x,
1168 ae_int_t n,
1169 double* mean,
1170 double* variance,
1171 double* skewness,
1172 double* kurtosis,
1173 ae_state *_state);
1174double samplemean(/* Real */ ae_vector* x,
1175 ae_int_t n,
1176 ae_state *_state);
1177double samplevariance(/* Real */ ae_vector* x,
1178 ae_int_t n,
1179 ae_state *_state);
1180double sampleskewness(/* Real */ ae_vector* x,
1181 ae_int_t n,
1182 ae_state *_state);
1183double samplekurtosis(/* Real */ ae_vector* x,
1184 ae_int_t n,
1185 ae_state *_state);
1186void sampleadev(/* Real */ ae_vector* x,
1187 ae_int_t n,
1188 double* adev,
1189 ae_state *_state);
1190void samplemedian(/* Real */ ae_vector* x,
1191 ae_int_t n,
1192 double* median,
1193 ae_state *_state);
1194void samplepercentile(/* Real */ ae_vector* x,
1195 ae_int_t n,
1196 double p,
1197 double* v,
1198 ae_state *_state);
1199double cov2(/* Real */ ae_vector* x,
1200 /* Real */ ae_vector* y,
1201 ae_int_t n,
1202 ae_state *_state);
1203double pearsoncorr2(/* Real */ ae_vector* x,
1204 /* Real */ ae_vector* y,
1205 ae_int_t n,
1206 ae_state *_state);
1207double spearmancorr2(/* Real */ ae_vector* x,
1208 /* Real */ ae_vector* y,
1209 ae_int_t n,
1210 ae_state *_state);
1211void covm(/* Real */ ae_matrix* x,
1212 ae_int_t n,
1213 ae_int_t m,
1214 /* Real */ ae_matrix* c,
1215 ae_state *_state);
1216void _pexec_covm(/* Real */ ae_matrix* x,
1217 ae_int_t n,
1218 ae_int_t m,
1219 /* Real */ ae_matrix* c, ae_state *_state);
1220void pearsoncorrm(/* Real */ ae_matrix* x,
1221 ae_int_t n,
1222 ae_int_t m,
1223 /* Real */ ae_matrix* c,
1224 ae_state *_state);
1225void _pexec_pearsoncorrm(/* Real */ ae_matrix* x,
1226 ae_int_t n,
1227 ae_int_t m,
1228 /* Real */ ae_matrix* c, ae_state *_state);
1229void spearmancorrm(/* Real */ ae_matrix* x,
1230 ae_int_t n,
1231 ae_int_t m,
1232 /* Real */ ae_matrix* c,
1233 ae_state *_state);
1234void _pexec_spearmancorrm(/* Real */ ae_matrix* x,
1235 ae_int_t n,
1236 ae_int_t m,
1237 /* Real */ ae_matrix* c, ae_state *_state);
1238void covm2(/* Real */ ae_matrix* x,
1239 /* Real */ ae_matrix* y,
1240 ae_int_t n,
1241 ae_int_t m1,
1242 ae_int_t m2,
1243 /* Real */ ae_matrix* c,
1244 ae_state *_state);
1245void _pexec_covm2(/* Real */ ae_matrix* x,
1246 /* Real */ ae_matrix* y,
1247 ae_int_t n,
1248 ae_int_t m1,
1249 ae_int_t m2,
1250 /* Real */ ae_matrix* c, ae_state *_state);
1251void pearsoncorrm2(/* Real */ ae_matrix* x,
1252 /* Real */ ae_matrix* y,
1253 ae_int_t n,
1254 ae_int_t m1,
1255 ae_int_t m2,
1256 /* Real */ ae_matrix* c,
1257 ae_state *_state);
1258void _pexec_pearsoncorrm2(/* Real */ ae_matrix* x,
1259 /* Real */ ae_matrix* y,
1260 ae_int_t n,
1261 ae_int_t m1,
1262 ae_int_t m2,
1263 /* Real */ ae_matrix* c, ae_state *_state);
1264void spearmancorrm2(/* Real */ ae_matrix* x,
1265 /* Real */ ae_matrix* y,
1266 ae_int_t n,
1267 ae_int_t m1,
1268 ae_int_t m2,
1269 /* Real */ ae_matrix* c,
1270 ae_state *_state);
1271void _pexec_spearmancorrm2(/* Real */ ae_matrix* x,
1272 /* Real */ ae_matrix* y,
1273 ae_int_t n,
1274 ae_int_t m1,
1275 ae_int_t m2,
1276 /* Real */ ae_matrix* c, ae_state *_state);
1277void rankdata(/* Real */ ae_matrix* xy,
1278 ae_int_t npoints,
1279 ae_int_t nfeatures,
1280 ae_state *_state);
1281void _pexec_rankdata(/* Real */ ae_matrix* xy,
1282 ae_int_t npoints,
1283 ae_int_t nfeatures, ae_state *_state);
1284void rankdatacentered(/* Real */ ae_matrix* xy,
1285 ae_int_t npoints,
1286 ae_int_t nfeatures,
1287 ae_state *_state);
1288void _pexec_rankdatacentered(/* Real */ ae_matrix* xy,
1289 ae_int_t npoints,
1290 ae_int_t nfeatures, ae_state *_state);
1291double pearsoncorrelation(/* Real */ ae_vector* x,
1292 /* Real */ ae_vector* y,
1293 ae_int_t n,
1294 ae_state *_state);
1295double spearmanrankcorrelation(/* Real */ ae_vector* x,
1296 /* Real */ ae_vector* y,
1297 ae_int_t n,
1298 ae_state *_state);
1299void wilcoxonsignedranktest(/* Real */ ae_vector* x,
1300 ae_int_t n,
1301 double e,
1302 double* bothtails,
1303 double* lefttail,
1304 double* righttail,
1305 ae_state *_state);
1306void onesamplesigntest(/* Real */ ae_vector* x,
1307 ae_int_t n,
1308 double median,
1309 double* bothtails,
1310 double* lefttail,
1311 double* righttail,
1312 ae_state *_state);
1313void pearsoncorrelationsignificance(double r,
1314 ae_int_t n,
1315 double* bothtails,
1316 double* lefttail,
1317 double* righttail,
1318 ae_state *_state);
1319void spearmanrankcorrelationsignificance(double r,
1320 ae_int_t n,
1321 double* bothtails,
1322 double* lefttail,
1323 double* righttail,
1324 ae_state *_state);
1325void studentttest1(/* Real */ ae_vector* x,
1326 ae_int_t n,
1327 double mean,
1328 double* bothtails,
1329 double* lefttail,
1330 double* righttail,
1331 ae_state *_state);
1332void studentttest2(/* Real */ ae_vector* x,
1333 ae_int_t n,
1334 /* Real */ ae_vector* y,
1335 ae_int_t m,
1336 double* bothtails,
1337 double* lefttail,
1338 double* righttail,
1339 ae_state *_state);
1340void unequalvariancettest(/* Real */ ae_vector* x,
1341 ae_int_t n,
1342 /* Real */ ae_vector* y,
1343 ae_int_t m,
1344 double* bothtails,
1345 double* lefttail,
1346 double* righttail,
1347 ae_state *_state);
1348void mannwhitneyutest(/* Real */ ae_vector* x,
1349 ae_int_t n,
1350 /* Real */ ae_vector* y,
1351 ae_int_t m,
1352 double* bothtails,
1353 double* lefttail,
1354 double* righttail,
1355 ae_state *_state);
1356void jarqueberatest(/* Real */ ae_vector* x,
1357 ae_int_t n,
1358 double* p,
1359 ae_state *_state);
1360void ftest(/* Real */ ae_vector* x,
1361 ae_int_t n,
1362 /* Real */ ae_vector* y,
1363 ae_int_t m,
1364 double* bothtails,
1365 double* lefttail,
1366 double* righttail,
1367 ae_state *_state);
1368void onesamplevariancetest(/* Real */ ae_vector* x,
1369 ae_int_t n,
1370 double variance,
1371 double* bothtails,
1372 double* lefttail,
1373 double* righttail,
1374 ae_state *_state);
1375
1376}
1377#endif
1378