choose#

class choose(max_n, n)[source]#

Choose a subset of items (e.g., people) without replacement.

Parameters:
  • max_n (int) – the total number of items

  • n (int) – the number of items to choose

Example:

choices = hpv.choose(5, 2) # choose 2 out of 5 people with equal probability (without repeats)