Distributions.jl
Distributions.jl copied to clipboard
cdf of InverseGaussian
Hi,
I have noticed a problem with the cdf of InverseGaussian distribution which can potentially be equal to Inf. This is a problem since a cdf is probability and consequently must be between 0 and 1. For example,
d = InverseGaussian(1.65,590) cdf(d, 2.)
returns Inf. In addition, if you plot the empirical histogram, you can see that 2.0 is not so extreme with respect to the simulated values.
histogram(rand(d, 10000),normalize=:pdf)
For comparison, in the same situation R provides the good value of the cdf which is equal to 1 in this case.
Best regards.
Laurent