choose_r#

class choose_r(max_n, n)[source]#

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

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

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

Example:

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