maths.binomial_distribution

For more information about the Binomial Distribution - https://en.wikipedia.org/wiki/Binomial_distribution

Functions

binomial_distribution(→ float)

Return probability of k successes out of n tries, with p probability for one

Module Contents

maths.binomial_distribution.binomial_distribution(successes: int, trials: int, prob: float) float

Return probability of k successes out of n tries, with p probability for one success

The function uses the factorial function in order to calculate the binomial coefficient

>>> binomial_distribution(3, 5, 0.7)
0.30870000000000003
>>> binomial_distribution (2, 4, 0.5)
0.375