Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
The Inverse cumulative distribution function for Inverse Gaussian(wald distribution)

Subject: The Inverse cumulative distribution function for Inverse Gaussian(wald distribution)

From: dhaskantha

Date: 22 Jan, 2011 01:57:05

Message: 1 of 6

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,
dhaskantha

Subject: The Inverse cumulative distribution function for Inverse Gaussian(wald distribution)

From: Bruno Luong

Date: 22 Jan, 2011 08:51:05

Message: 2 of 6

"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

Subject: The Inverse cumulative distribution function for Inverse Gaussian(wald distribution)

From: dhaskantha

Date: 23 Jan, 2011 01:17:03

Message: 3 of 6

"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,
dhaskantha

Subject: The Inverse cumulative distribution function for Inverse Gaussian(wald distribution)

From: Bruno Luong

Date: 23 Jan, 2011 07:35:04

Message: 4 of 6

"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

Subject: The Inverse cumulative distribution function for Inverse Gaussian(wald

From: Peter Perkins

Date: 24 Jan, 2011 14:18:16

Message: 5 of 6

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.

Subject: The Inverse cumulative distribution function for Inverse Gaussian(wald

From: dhaskantha

Date: 26 Jan, 2011 06:12:03

Message: 6 of 6

Thanks Peter. Thanks Bruno.

I really appreciate your help.

Regards,
dhaskantha


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.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us