[SciPy-User] scipy.stats.poisson, strange output?

nicky van foreest vanforeest@gmail....
Sun Feb 5 16:00:16 CST 2012


> I find the current version easier to follow, reading "given the parameters"

This is a good hint to memorize the proper sequence.

> (and we could even pretend we are Bayesians :)

I am some sort of a Bayesian :-)

Nicky

>
> Cheers,
>
> Josef
>
>>
>>>
>>>>>> stats.poisson.pmf(grid, 10)
>>> array([ 0.0000453999297625,  0.0004539992976248,  0.0022699964881242,
>>>        0.0075666549604141,  0.0189166374010354,  0.0378332748020708,
>>>        0.0630554580034512,  0.090079225719216 ,  0.1125990321490201,
>>>        0.1251100357211337,  0.1251100357211337,  0.1137363961101213,
>>>        0.094780330091768 ,  0.0729079462244373,  0.0520771044460262,
>>>        0.0347180696306844,  0.0216987935191777,  0.0127639961877516,
>>>        0.0070911089931953,  0.0037321626279975])
>>>
>>> in the first case it's a frozen distribution
>>>
>>>>>> stats.poisson(10).pmf(grid)
>>> array([ 0.0000453999297625,  0.0004539992976248,  0.0022699964881242,
>>>        0.0075666549604141,  0.0189166374010354,  0.0378332748020708,
>>>        0.0630554580034512,  0.090079225719216 ,  0.1125990321490201,
>>>        0.1251100357211337,  0.1251100357211337,  0.1137363961101213,
>>>        0.094780330091768 ,  0.0729079462244373,  0.0520771044460262,
>>>        0.0347180696306844,  0.0216987935191777,  0.0127639961877516,
>>>        0.0070911089931953,  0.0037321626279975])
>>>
>>> Josef
>>>
>>>>
>>>> In [7]:
>>>>
>>>>
>>>> So, in line [5], rv.pmf(grid)[0] is a number, while in [6],
>>>> poisson.pmf(10,grid)[0] is nan. Am I doing something wrong, or is this
>>>> an unintentional inconsistency?
>>>>
>>>> Nicky
>>>> _______________________________________________
>>>> SciPy-User mailing list
>>>> SciPy-User@scipy.org
>>>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>> _______________________________________________
>>> SciPy-User mailing list
>>> SciPy-User@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/scipy-user
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user


More information about the SciPy-User mailing list