generate_age_count_multinomial#

generate_age_count_multinomial(n, age_distr)[source]#

Generate a stochastic count of people for each age given the age distribution (age_distr) and number of people to generate (n).

Parameters:
  • n (int) – number of people to generate

  • age_distr (list or np.ndarray) – single year age distribution

Returns:

A dictionary with the count of people to generate for each age given an age distribution and the number of people to generate.

Return type:

dict