analistica/ex-1/tests.h

29 lines
768 B
C
Raw Normal View History

2020-03-24 02:17:39 +01:00
/* This file contains functions to perform
* statistical tests on the points sampled
* from a Landau distribution.
*/
#pragma once
/* Kolmogorov distribution CDF
* for sample size n and statistic D
*/
double kolmogorov_cdf(double D, int n);
/* Numerically computes the mode of a Landau
* distribution by maximising the derivative.
* The min,max parameters are the initial search
* interval for the optimisation.
*/
double numeric_mode(double min, double max);
/* Numerically computes the FWHM of Landau
* distribution by maximising the derivative.
* The `min,max` parameters are the initial search
* interval for the optimisation. `mode` can be
* computer with `numeric_mode(min, max)`.
*/
double numeric_fwhm(double min, double max, double mode);