[SciPy-User] Gamma distribution in scipy.stats

josef.pktd@gmai... josef.pktd@gmai...
Thu Jan 28 11:45:01 CST 2010


On Thu, Jan 28, 2010 at 12:36 PM, Gökhan Sever <gokhansever@gmail.com> wrote:
> Hello,
>
> Could someone explain to me why doesn't scipy explicitly use the location
> and scaling parameters representing its PDF?
>
> From
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gamma.html#scipy.stats.gamma
> gamma.pdf(x,a) = x**(a-1)*exp(-x)/gamma(a) for x >= 0, a > 0.
>
> Gamma is represented with two or three parameters; as the function prototype
> shows correctly.
>
> Also both GSL and R is fine representing the Gamma PDF with two parameters:
>
> http://www.gnu.org/software/gsl/manual/html_node/The-Gamma-Distribution.html
> http://stat.ethz.ch/R-manual/R-patched/library/stats/html/GammaDist.html
>
> Should these instances need to be updated?

This should be the same if you replace `x` in the pdf by  `(x-loc)/scale`

loc and scale are handled generically, while the individual _pdf
method only defines the standardized distribution.

I think I checked the algebra once for gamma, but I'm not sure.

Josef


>
> PS: I am wrapping the distribution definitions given in the GSL library for
> SAGE. While doing this I want to make sure my understanding and use of the
> terms and concepts are correct.
>
> Thanks.
>
> --
> Gökhan
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


More information about the SciPy-User mailing list