Module Cgr.Quantiles


module Quantiles: Cgr_quantiles
Predefined quantiles for Chi2 distribution.


This module can be used to get the quantiles of a Chi-2 law. Quantiles were taken from http://www.agro-montpellier.fr/cnam-lr/statnet/tables.htm.
exception Invalid_degree of string
type probability = [ `p0_01
| `p0_02
| `p0_05
| `p0_1
| `p0_15
| `p0_2
| `p0_25
| `p0_3
| `p0_4
| `p0_5
| `p0_6
| `p0_7
| `p0_75
| `p0_8
| `p0_85
| `p0_9
| `p0_95
| `p0_975
| `p0_98
| `p0_99
| `p0_999 ]
val probabilities : probability list
val string_of_probability : probability -> string
val quantile_of_freedom_degree : ?p:probability -> int -> float
quantile_of_freedom_degree n returns the quantile for the given freedrom degree n.
Raises Invalid_degree if n < 1 or n > 100
p : can be used to specify the probability. Default is `p0_95.
exception Out_of_table of string
val probability_of_quantile : int -> float -> probability
probability_of_quantile degree q returns the probability corresponding to the given degree (<=100) and the given quantile.
Raises Out_of_table if degree > 100 or the given q is greater than the quantile associated to the greatest probability.