n_binomial#

class n_binomial(prob, n)[source]#

Perform multiple binomial (Bernolli) trials

Parameters:
  • prob (float) – probability of each trial succeeding

  • n (int) – number of trials (size of array)

Returns:

Boolean array of which trials succeeded

Example:

outcomes = hpv.n_binomial(0.5, 100) # Perform 100 coin-flips