The ranking order is from the smallest one to the largest. For example rank [|54.; 74.; 55.; 86.; 56.|] returns [|1.; 4.; 2.; 5.; 3.|]. Note that the ranking starts with one!
ties_strategy controls which ranks are assigned to equal values:
`Average the average of ranks should be assigned to each value. Default.
`Min the minimum of ranks is assigned to each value.
`Max the maximum of ranks is assigned to each value.
val histogram : float array->int ->int array
val ecdf : float array->float array * float array
ecdf x returns (x',f) which are the empirical cumulative distribution function f of x at points x'. x' is just x sorted in increasing order with duplicates removed.
val z_score : mu:float ->sigma:float ->float array->float array
val t_score : float array->float array
val normlise_pdf : float array->float array
MCMC: Markov Chain Monte Carlo
val metropolis_hastings :
(float array-> float)->float array->int ->float array array
TODO: metropolis_hastings f p n is Metropolis-Hastings MCMC algorithm. f is pdf of the p
z_test ~mu ~sigma ~alpha ~side x returns a test decision for the null hypothesis that the data x comes from a normal distribution with mean mu and a standard deviation sigma, using the z-test of alpha significance level. The alternative hypothesis is that the mean is not mu.
The result h,p,z: h is true if the test rejects the null hypothesis at the alpha significance level, and false otherwise. p is the p-value and z is the z-score.
t_test ~mu ~alpha ~side x returns a test decision of one-sample t-test which is a parametric test of the location parameter when the population standard deviation is unknown. mu is population mean, alpha is the significance level.
t_test_paired ~alpha ~side x y returns a test decision for the null hypothesis that the data in x – y comes from a normal distribution with mean equal to zero and unknown variance, using the paired-sample t-test.
t_test_unpaired ~alpha ~side ~equal_var x y returns a test decision for the null hypothesis that the data in vectors x and y comes from independent random samples from normal distributions with equal means and equal but unknown variances, using the two-sample t-test. The alternative hypothesis is that the data in x and y comes from populations with unequal means.
equal_var indicates whether two samples have the same variance. If the two variances are not the same, the test is referred to as Welche's t-test.
var_test ~alpha ~side ~var x returns a test decision for the null hypothesis that the data in x comes from a normal distribution with variance var, using the chi-square variance test. The alternative hypothesis is that x comes from a normal distribution with a different variance.
jb_test ~alpha x returns a test decision for the null hypothesis that the data x comes from a normal distribution with an unknown mean and variance, using the Jarque-Bera test.
fisher_test ~alpha ~side a b c d fisher's exact test for contingency table |a, b| |c, d| . The result h,p,z: h is true if the test rejects the null hypothesis at the alpha significance level, and false otherwise. p is the p-value and z is prior odds ratio.
runs_test ~alpha ~v x returns a test decision for the null hypothesis that the data x comes in random order, against the alternative that they do not, by runnign Wald–Wolfowitz runs test. The test is based on the number of runs of consecutive values above or below the mean of x. ~v is the reference value, the default value is the median of x.
mannwhitneyu ~alpha ~side x y Computes the Mann-Whitney rank test on samples x and y. If length of each sample less than 10 and no ties, then using exact test (see paper Ying Kuen Cheung and Jerome H. Klotz (1997) The Mann Whitney Wilcoxon distribution using linked list Statistica Sinica 7 805-813), else usning asymptotic normal distribution.