GSL powered OCaml statistics library
OCaml Other
Switch branches/tags
Nothing to show


pareto is an OCaml statistics library, based on GSL gsl, which provides:

  • Common statistical tests for significant differences between samples.
  • Uniform interface for common discrete and continuous probability distributions.
  • Sample statistics, quantile estimation, kernel density estimation.
  • Resampling methods: jackknife, BCa bootstrap.

Note: before using pareto make sure you understand some of the subtleties in OCaml GSL bindinds. See section ERROR HANDLING in GSL README README.


Make sure you have gsl-ocaml, or install it with OPAM:

$ opam install gsl

Then go with the usual OASIS routines:

$ ./configure
$ make  # And you're done!

Examples (optional)

To build examples:

$ ./configure --enable-examples
$ make

Here's a simple t-test:

open Statistics

let open Distributions.Normal in
let v = sample ~size:10 standard in
let open Tests in
let { test_statistic = t; test_pvalue } =
  T.one_sample v ~mean:0. ~alternative:TwoSided ()
in begin
  printf "One-sample T-test for true mean = 0.0\n";
  printf "t = %f, P-value: %f\n" t test_pvalue;

Documentation (optional)

To build API documentation:

$ make doc

Tests (optional) Build Status

To build and run tests:

$ ./configure --enable-tests
$ make test