Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

cdf of InverseGaussian

Open ldoyen opened this issue 1 year ago • 1 comments

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

ldoyen avatar Jun 24 '24 11:06 ldoyen