COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### The Inverse cumulative distribution function for Inverse Gaussian(wald distribution)

• Email
• Follow

```Hi!

I would like to know how to find the inverse cumulative distribution function for the inverse Gaussian(Wald Distribution). Is there any built in function to do this?
Thank you.

Regards,
```
 0

See related articles to this posting

```"dhaskantha" wrote in message <ihddhg\$hi6\$1@fred.mathworks.com>...
> Hi!
>
> I would like to know how to find the inverse cumulative distribution function for the inverse Gaussian(Wald Distribution). Is there any built in function to do this?

The cdf of Wald distribution has a closed form (google for it) tha can be computed with Matlab. It does not look like the inverse has, you might use fzero to invert it.

Bruno
```
 0

```"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ihe5pp\$5bf\$1@fred.mathworks.com>...
> "dhaskantha" wrote in message <ihddhg\$hi6\$1@fred.mathworks.com>...
> > Hi!
> >
> > I would like to know how to find the inverse cumulative distribution function for the inverse Gaussian(Wald Distribution). Is there any built in function to do this?
>
> The cdf of Wald distribution has a closed form (google for it) tha can be computed with Matlab. It does not look like the inverse has, you might use fzero to invert it.
>
> Bruno

Thanks Bruno!
I am new to this. Can I use ProbDistUnivParam?
For example,
PD = ProbDistUnivParam('inversegaussian',[3 1]);
icdf(PD, 0.95) %to find the 0.95th quantile.
Is this the way to do it?
I saw something similar to this to generate random variates of the inverse gaussian distribution in a post by Jan Müller.
Thanks once again!

Regards,
```
 0

```"dhaskantha" wrote in message <ihfvif\$dr6\$1@fred.mathworks.com>...

> I am new to this. Can I use ProbDistUnivParam?
> For example,
> PD = ProbDistUnivParam('inversegaussian',[3 1]);
> icdf(PD, 0.95) %to find the 0.95th quantile.
> Is this the way to do it?

I'm not familiar with ProbDistUnivParam but I take a look at the help page, and it seems like you are using it correctly.

Bruno
```
 0

```On 1/21/2011 8:57 PM, dhaskantha wrote:
> I would like to know how to find the inverse cumulative distribution
> function for the inverse Gaussian(Wald Distribution). Is there any built
> in function to do this?

There are two things you might do, assuming you have access to the
Statistics Toolbox (which it seems you do):

1) (as you say) create a probability distribution using
ProbDistUnivParam, and use its

>> p = ProbDistUnivParam('inversegaussian',[1 1])
p =
inversegaussian distribution
mu = 1
lambda = 1
>> icdf(p,.5)
ans =
0.67584

2) Use the icdf function (the doc on this is not clear on this, I've
made a note to fix that)

>> icdf('inversegaussian',.5,1,1)
ans =
0.67584

Hope this helps.
```
 0

```Thanks Peter. Thanks Bruno.

Regards,

Peter Perkins <Peter.Perkins@MathRemoveThisWorks.com> wrote in message <ihk1n8\$bqc\$1@fred.mathworks.com>...
> On 1/21/2011 8:57 PM, dhaskantha wrote:
> > I would like to know how to find the inverse cumulative distribution
> > function for the inverse Gaussian(Wald Distribution). Is there any built
> > in function to do this?
>
> There are two things you might do, assuming you have access to the
> Statistics Toolbox (which it seems you do):
>
> 1) (as you say) create a probability distribution using
> ProbDistUnivParam, and use its
>
>  >> p = ProbDistUnivParam('inversegaussian',[1 1])
> p =
> inversegaussian distribution
>      mu = 1
>      lambda = 1
>  >> icdf(p,.5)
> ans =
>        0.67584
>
> 2) Use the icdf function (the doc on this is not clear on this, I've
> made a note to fix that)
>
>  >> icdf('inversegaussian',.5,1,1)
> ans =
>        0.67584
>
> Hope this helps.
```
 0