20#ifndef _statistics_pkg_h
21#define _statistics_pkg_h
23#include "alglibinternal.h"
25#include "specialfunctions.h"
26#include "alglibmisc.h"
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);
89double samplemean(
const real_1d_array &x,
const ae_int_t n);
90double samplemean(
const real_1d_array &x);
111double samplevariance(
const real_1d_array &x,
const ae_int_t n);
112double samplevariance(
const real_1d_array &x);
133double sampleskewness(
const real_1d_array &x,
const ae_int_t n);
134double sampleskewness(
const real_1d_array &x);
155double samplekurtosis(
const real_1d_array &x,
const ae_int_t n);
156double samplekurtosis(
const real_1d_array &x);
174void sampleadev(
const real_1d_array &x,
const ae_int_t n,
double &adev);
175void sampleadev(
const real_1d_array &x,
double &adev);
193void samplemedian(
const real_1d_array &x,
const ae_int_t n,
double &median);
194void samplemedian(
const real_1d_array &x,
double &median);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
665double pearsoncorrelation(
const real_1d_array &x,
const real_1d_array &y,
const ae_int_t n);
674double spearmanrankcorrelation(
const real_1d_array &x,
const real_1d_array &y,
const ae_int_t n);
725void wilcoxonsignedranktest(
const real_1d_array &x,
const ae_int_t n,
const double e,
double &bothtails,
double &lefttail,
double &righttail);
767void onesamplesigntest(
const real_1d_array &x,
const ae_int_t n,
const double median,
double &bothtails,
double &lefttail,
double &righttail);
805void pearsoncorrelationsignificance(
const double r,
const ae_int_t n,
double &bothtails,
double &lefttail,
double &righttail);
846void spearmanrankcorrelationsignificance(
const double r,
const ae_int_t n,
double &bothtails,
double &lefttail,
double &righttail);
890void studentttest1(
const real_1d_array &x,
const ae_int_t n,
const double mean,
double &bothtails,
double &lefttail,
double &righttail);
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);
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);
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);
1082void jarqueberatest(
const real_1d_array &x,
const ae_int_t n,
double &p);
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);
1157void onesamplevariancetest(
const real_1d_array &x,
const ae_int_t n,
const double variance,
double &bothtails,
double &lefttail,
double &righttail);
1165namespace alglib_impl
1167void samplemoments( ae_vector* x,
1174double samplemean( ae_vector* x,
1177double samplevariance( ae_vector* x,
1180double sampleskewness( ae_vector* x,
1183double samplekurtosis( ae_vector* x,
1186void sampleadev( ae_vector* x,
1190void samplemedian( ae_vector* x,
1194void samplepercentile( ae_vector* x,
1199double cov2( ae_vector* x,
1203double pearsoncorr2( ae_vector* x,
1207double spearmancorr2( ae_vector* x,
1211void covm( ae_matrix* x,
1216void _pexec_covm( ae_matrix* x,
1219 ae_matrix* c, ae_state *_state);
1220void pearsoncorrm( ae_matrix* x,
1225void _pexec_pearsoncorrm( ae_matrix* x,
1228 ae_matrix* c, ae_state *_state);
1229void spearmancorrm( ae_matrix* x,
1234void _pexec_spearmancorrm( ae_matrix* x,
1237 ae_matrix* c, ae_state *_state);
1238void covm2( ae_matrix* x,
1245void _pexec_covm2( ae_matrix* x,
1250 ae_matrix* c, ae_state *_state);
1251void pearsoncorrm2( ae_matrix* x,
1258void _pexec_pearsoncorrm2( ae_matrix* x,
1263 ae_matrix* c, ae_state *_state);
1264void spearmancorrm2( ae_matrix* x,
1271void _pexec_spearmancorrm2( ae_matrix* x,
1276 ae_matrix* c, ae_state *_state);
1277void rankdata( ae_matrix* xy,
1281void _pexec_rankdata( ae_matrix* xy,
1283 ae_int_t nfeatures, ae_state *_state);
1284void rankdatacentered( ae_matrix* xy,
1288void _pexec_rankdatacentered( ae_matrix* xy,
1290 ae_int_t nfeatures, ae_state *_state);
1291double pearsoncorrelation( ae_vector* x,
1295double spearmanrankcorrelation( ae_vector* x,
1299void wilcoxonsignedranktest( ae_vector* x,
1306void onesamplesigntest( ae_vector* x,
1313void pearsoncorrelationsignificance(
double r,
1319void spearmanrankcorrelationsignificance(
double r,
1325void studentttest1( ae_vector* x,
1332void studentttest2( ae_vector* x,
1340void unequalvariancettest( ae_vector* x,
1348void mannwhitneyutest( ae_vector* x,
1356void jarqueberatest( ae_vector* x,
1360void ftest( ae_vector* x,
1368void onesamplevariancetest( ae_vector* x,