How can I efficiently calculate the binomial cumulative distribution function?

后端 未结 10 963
你的背包
你的背包 2020-12-07 22:10

Let\'s say that I know the probability of a \"success\" is P. I run the test N times, and I see S successes. The test is akin to tossing an unevenly weighted coin (perhaps

10条回答
  •  感动是毒
    2020-12-07 22:42

    I can't totally vouch for the efficiency, but Scipy has a module for this

    from scipy.stats.distributions import binom
    binom.cdf(successes, attempts, chance_of_success_per_attempt)
    

提交回复
热议问题