This is one implementation for the normal CDF, in terms of the error function provided in ocamlgsl:
Le 15/04/11 11:22, Miguel Pignatelli a écrit :Probability of one point for a continuous law is zero ... You probably wand theHi all,
Maybe this is a long shot, but...
I have a gaussian (normal) distribution defined by its mean and std deviation and I want to know the probability of a given known point in the curve.
probability Phi(x) of a point in ]-infinity,x] from which you can compute the probability of
a point in any interval ...The same page has a section :
I have followed the formula given in [1] but I realized that there are cases where P > 1. After struggling myself for a while I realized that that formula expresses the probability *density* distribution that happens that can be > 1. Are you aware of any module in ocaml to calculate the probability [0<P<1]?
(other kind of relevant references are also welcome)
Thanks in advance,
M;
[1] http://en.wikipedia.org/wiki/Normal_distribution
Numerical approximations for the normal CDF
to compute Phi(x) yourself (this is not completely trivial).
Hope this helps,
Christophe