alternative parametrization of the negative binomial in scipy

前端 未结 2 837
一个人的身影
一个人的身影 2021-02-14 20:07

In scipy the negative binomial distribution is defined as:

nbinom.pmf(k) = choose(k+n-1, n-1) * p**n * (1-p)**k

This is the common definition,

2条回答
  •  隐瞒了意图╮
    2021-02-14 20:28

    The Wikipedia page you linked given a precise formula for p and r in terms of mu and sigma, see the very last bullet item in the Alternative parametrization section,https://en.m.wikipedia.org/wiki/Negative_binomial_distribution#Alternative_formulations

提交回复
热议问题