I am looking for a library in C/C++ or java (or easily callable from those) that implements statistical normality tests: http://en.wikipedia.org/wiki/Normality_test
I had a quick look at boost and GSL, but they don't seem to include these.
I would appreciate links and examples how to use these tests (e.g. I am not sure how to link R libraries)
I would preferably work under Linux, but this is a secondary requirement.
See the Kolmogorov-Smirnov test. It's pretty simple -- you sort your data to get an array containing the population CDF, and compute the ideal CDF for a normal distribution with the population mean + standard deviation. Then iterate over the array and calculate the maximum deviation between the population CDF and the ideal CDF. Then plug it into the K-S distribution for a given degree of confidence.
All but the last part is trivial to implement in either language -- in Java here's one class to do that from Apache Commons.
See my answer to Benford's Law in Java - how to make a math function into Java for more details (different distribution, same idea though).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With