binomial_arr#

class binomial_arr(prob_arr)[source]#

Binomial (Bernoulli) trials each with different probabilities.

Parameters:

prob_arr (array) – array of probabilities

Returns:

Boolean array of which trials on the input array succeeded

Example:

outcomes = hpv.binomial_arr([0.1, 0.1, 0.2, 0.2, 0.8, 0.8]) # Perform 6 trials with different probabilities