[SciPy-dev] stats.distributions.poisson loc parameter : is it wise ?
nicky van foreest
Thu Aug 6 16:21:40 CDT 2009
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 confusing---what 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.
| x : array-like
| arg1, arg2, arg3,... : array-like
| The shape parameter(s) for the distribution (see docstring of the
| instance object for more information)
| loc : array-like, optional
| location parameter (default=0)
| scale : array-like, 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
Of course, this is not to say that I am not happy with the
distribution package. It makes me a happier man every day :-)
2009/8/6 Pierre GM <firstname.lastname@example.org>:
> 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
> I thought I could use `loc` as a way to control truncation, but that
> doesn't seem to work either: emulating zero-truncation by using
> `loc=1` gives a distribution with a mean `mu+1` when is should be `mu/
> (1-exp(-mu))` (the exact expression for zero-truncation).
> 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 ?
> Scipy-dev mailing list
More information about the Scipy-dev