0

I am trying to generate an inverse gaussian distribution using the ICDF function in matlab. The parameters are:

mu = 4.68 lambda = 12286

I get the following error: Warning: Divide by zero. This warning will be removed in a future release. Consider using DBSTOP IF NANINF when debugging.

The issue is that the lambda is very high - when I try values of 50, 100, or 1000 there is no problem. I'm working with Matlab 2006, so I can't use the makedist function. Is there a way to avoid this error, or another function I can use to generate an inverse gaussian from a set of random probabilities?

Thanks!

  • Not clear what you want. Despite the names, the CDF of the [Inverse Gaussian Distribution](https://en.wikipedia.org/wiki/Inverse_Gaussian_distribution) is not the same thing inverse CDF of the Normal/Gaussian Distribution. There's a closed form for the former and you can use [`norminv`](https://www.mathworks.com/help/stats/norminv.html) for the latter. – horchler Nov 16 '16 at 22:17
  • My goal is to go from a random set of probabilities to the CDF of an inverse gaussian distribution described by the parameters mu and lambda. –  Nov 16 '16 at 22:51
  • Is `lambda` same as `sigma` ? – Severin Pappadeux Nov 17 '16 at 01:48

0 Answers0