# [SciPy-User] Mean, variance, and parametrisation of an inverse Gaussian distribution

nicky van foreest vanforeest@gmail....
Thu Jun 28 12:23:12 CDT 2012

As a first step, here is some example code:

In [1]: from scipy.stats import invgauss

In [2]: rv = invgauss(3, loc = 4)

In [3]: rv.mean()
Out[3]: 7.0

In [4]: rv = invgauss(3, loc = 0)

In [5]: rv.mean()
Out[5]: 3.0

In [6]:

On 28 June 2012 19:22, nicky van foreest <vanforeest@gmail.com> wrote:
> Hi Mathieu,
>
> I just checked the wikipedia on this distribution. From this and the
> info on the sicpy.stats on invgauss I think you should try to use the
> loc, scale and shape parameters of invgauss to match your need. The
> meaning of loc and scale can be found here:
>
> http://docs.scipy.org/doc/scipy/reference/tutorial/stats.html#shifting-and-scaling
>
> The paragraph below this explains how to use shape parameters. You can
> tune these parameters such that the mean is a/\sigma and the variance
> is also what you need.
>
> Hope this helps
>
> Nicky
>
> On 28 June 2012 15:33, servant mathieu <servant.mathieu@gmail.com> wrote:
>> Dear scipy users,
>>
>> The time for a diffusion process to reach a single evidence threshold a is
>> often modeled as an inverse Gaussian distribution with mean (a/σ) and
>> variance (a*σ2/μ3 ), where  μ represents the mean drift rate and  σ2  the
>> variance of the accumlulation process. How could I reparametrise the
>> scipy.stats.invgauss  function to manipulate those parameters?
>>
>> Cheers,
>> Mathieu
>>
>>
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>