help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Understand how to use the Gumbel Type 1 distribution


From: Martin Jansche
Subject: Re: [Help-gsl] Understand how to use the Gumbel Type 1 distribution
Date: Thu, 8 Mar 2018 03:14:14 +0000

Per the GSL manual [
https://www.gnu.org/software/gsl/manual/html_node/The-Type_002d1-Gumbel-Distribution.html]
we have

p(x) dx = a b \exp(-(b \exp(-ax) + ax)) dx

And Wikipedia has

p(x) = 1/beta exp(-(z + exp(-z)))  where  z = (x - mu)/beta

Now substitute a = 1/beta and write z= ax - mu/beta

p(x) = a exp(-(ax - mu/beta + exp(-ax + mu/beta))

And so

p(x) = a exp(mu/beta) exp(-(ax + exp(-ax) exp(mu/beta))

This matches the GSL definition when you substitute b = exp(mu/beta).

tl;dr:  a = 1.0/beta; b = exp(mu/beta);

On Sat, Mar 3, 2018 at 2:10 PM, Matias Berrueta <address@hidden>
wrote:

> Hello there,
>
> Sorry to bother you guys, but I'm trying to use the
> * `double gsl_ran_gumbel1(const gsl_rng * r, double a, double b)`*
> without success.
>
> I have the `location` & `scale` parameters (
> https://en.wikipedia.org/wiki/Gumbel_distribution)
> how to convert those to `a` & `b` ?
>
> thanks in advance!
>
> Matt
> --
> Matias Berrueta
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]