Inverse Gaussian distribution

Greetings,

I am new to the UQLab/UQWorld interface and have found it to be an outstanding tool, significantly reducing the time I would otherwise spend developing and writing code from scratch.

My research focuses on reliability analysis in geotechnical engineering, and I require a sampling technique that generates random variables following an inverse Gaussian distribution. However, I could not locate this distribution within the UQLab package. Given my limited experience with the tool, I might have overlooked it or been unable to find it.

To address this need, I developed the inverse Gaussian distribution based on the patterns used for other input distributions in the default files within UQLab. If the inverse Gaussian distribution is indeed unavailable in the current version of UQLab, I would be happy to share my implementation with anyone who needs it.

Thank you!

1 Like

Dear Abdul

Thanks for your interest in UQLab.

You can indeed add you own distributions, following the procedure described in the UQLab user manual: The Input Module, Section 2.7.

You need to code 3 files for the PDF, CDF and inverse CDF, with a certain naming. That’s all.
If you happen to code an inverse Gaussian distribution, you may want to sahre the code on UQWorld afterwards

Best regards
Bruno

Thanks for sharing the procedure from the UQLab user manual, Prof. Sudret. This is such a valuable tool!

However, I had followed a procedure based on intuition from the marginal distribution modules available in the setup. I am sharing the same here for the community’s benefit.

How I’ve done it is as follows:

Please find the attachment.
inversegaussian.zip (4.1 KB)
Unzip it.

Then follow these steps:
Go to UQ_lab’s intalled setup → modules → uq_input → builtin → uq_default_input → marginals → [Paste the unzipped folder here]

You can now access the input marginals as per the usual method, i.e.,

Input.Marginals.Type = 'inversegaussian';

If there is something which is not correct or can be improved or you find a bug please feel free to let me know. Thanks.

Best regards,
Waris

1 Like

Please use the following attachment instead of the one shared above:
inversegaussian.zip (6.6 KB)

The PtoM and MtoP functions have been corrected.

1 Like

Hi Waris ,

Thank you for sharing the ZIP file and the procedure for installing the Inverse Gaussian distribution in the UQ Lab. I have successfully installed it.

I have a quick question regarding its usage:

What parameters should be used as inputs for the Inverse Gaussian distribution in UQ Lab to generate the moments (mean and standard deviation)?

Additionally, if there are specific conventions or constraints for the parameter values, could you please explain those or point me to any relevant documentation?

Thank you for your guidance!

Best regards,
Abhinai

Hi Abhinai,

I’m glad to hear that you successfully installed the Inverse Gaussian distribution in UQLab.

This distribution works like any other distribution in UQLab, meaning you have two options for defining it:

  1. Using moments – You can specify the mean and standard deviation directly.
  2. Using distribution parameters – You can define it using the standard parameters of the Inverse Gaussian distribution, which are:
  • Mean (μ)
  • Shape parameter (λ), where \lambda = \frac{\mu^3}{\sigma^2}

If you prefer to define it using the mean and standard deviation, the provided code will internally compute the necessary parameters. However, if you wish to input the parameters directly, you can use the standard expressions for the Inverse Gaussian.

Let me know if you need any further clarification!

Best regards,
Waris

1 Like