Menu ▾ ▴

Key Demographics

sex ratio (1)
rc koh

Population Size

populationSizeMax = Integer.MAX_VALUE;

Primary Sex Ratio

Given nrOfMales and nrOfFemales, calculate the primarySexRatio

long primarySexRation = Math.round((nrOfMales / nrOfFemales) * 100.0);

Given a populationSize and a primarySexRatio, calculate nrOfMales and nrOfFemales

double nrOfMales = (populationSize * primarySexRatio) / (100.0 + primarySexRatio);
double nrOfFemales = (100.0 * populationSize) / (primarySexRatio + 100.0);
long nrOfMalesLong = Math.round(nrOfMales);
long nrOfFemalesLong = Math.round(nrOfFemales);
// recalculate primarySexRatio
long primarySexRatioNew = Math.round((nrOfMales/nrOfFemales)*100.0);

Gender Assignment of a Population

The gender assignment of a population can be initialized based on the following demographic data:

  1. by primary sex ratio,
  2. by gender table containing number of males and females by age group,
  3. by formula. The simplest formula is random assignment.

Related

Wiki: Home