package prbnmcn-stats

  1. Overview
  2. Docs

Probability density functions.

val poisson : lambda:float -> k:int -> float
val poisson_ln : lambda:float -> k:int -> float
val pi : float
val gaussian : mean:float -> std:float -> float -> float
val gaussian_ln : mean:float -> std:float -> float -> float
val exponential : rate:float -> float -> float
val exponential_ln : rate:float -> float -> float
val geometric : p:float -> int -> float
val geometric_ln : p:float -> int -> float
val uniform : Stats_intf.range -> float -> float
val uniform_ln : Stats_intf.range -> float -> float
val binomial_ln : p:float -> n:int -> k:int -> float

binomial_ln ~p ~n ~k gives the log-probability of having k successes in n independent Bernouilli trials with probability p.

  • raises Invalid_argument

    if p is not in the [0;1] interval, if n < 0, if k < 0 or if k > n.

val binomial : p:float -> n:int -> k:int -> float

binomial_ln ~p ~n ~k gives the probability of having k successes in n independent Bernouilli trials with probability p.

  • raises Invalid_argument

    if p is not in the [0;1] interval, if n < 0, if k < 0 or if k > n.

val gamma_ln : shape:int -> scale:float -> float -> float

gamma_ln ~shape ~scale x is the logarithm of the density function of the gamma distribution.

  • raises Invalid_argument

    if shape < 0 or scale < 0.

OCaml

Innovation. Community. Security.