[SciPydev] stats.distributions.poisson loc parameter : is it wise ?
nicky van foreest
vanforeest@gmail....
Thu Aug 6 16:21:40 CDT 2009
Hi,
I agree. Anything that makes the behavior of the distribution
functions more intuitive is helpful, at least to me.
BTW, I find the term loc already by itself very confusingwhat does
it actually mean? For instance,
>>> Help on gamma_gen in module scipy.stats.distributions object
...
 cdf(self, x, *args, **kwds)
 Cumulative distribution function at x of the given RV.

 Parameters
 
 x : arraylike
 quantiles
 arg1, arg2, arg3,... : arraylike
 The shape parameter(s) for the distribution (see docstring of the
 instance object for more information)
 loc : arraylike, optional
 location parameter (default=0)
 scale : arraylike, optional
 scale parameter (default=1)
I am inclined to characterize the gamma distbution by means of n
(number of stages if one is used to the Erlang distribution) and the
rate parameter lambda, say, and I am clueless as to the meaning of
scale and location here. Actually, I am not alone in this: see for
instance:
http://www.johndcook.com/blog/2009/07/20/probabilitydistributionsscipy/
Of course, this is not to say that I am not happy with the
distribution package. It makes me a happier man every day :)
Nicky
2009/8/6 Pierre GM <pgmdevlist@gmail.com>:
> All,
> Consider the poisson distribution in stats.distributions: it requires
> a mandatory argument, `mu`, as the mean/variance of the distribution.
> All is fine, but the `loc` parameter is still available, and that's my
> problem. When `loc` is not 0, the mean becomes `mu+loc`,
> `.cdf(range(loc))==0`, but the variance stays `mu`. That's a bit
> confusing.
> I thought I could use `loc` as a way to control truncation, but that
> doesn't seem to work either: emulating zerotruncation by using
> `loc=1` gives a distribution with a mean `mu+1` when is should be `mu/
> (1exp(mu))` (the exact expression for zerotruncation).
> In short, I don't really see any advantage in having a location
> parameter for the Poisson distribution. AAMOF, for any discrete
> distribution. I suggest we would implement some mechanism to force loc
> to 0 while outputting a warning.
> Any comment ?
> P.
>
> _______________________________________________
> Scipydev mailing list
> Scipydev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipydev
>
More information about the Scipydev
mailing list