RandomSelection(float years, float population)

RandomSelection(float _years, float _population) is a function used in many aspects of Banished. It takes two floating point variables as parameters, and presumably returns true or false based on random chance determined by the parameters, either causing something to happen or not. Without access to the game's source code, the only way to learn how the algorithm works is through black-boxing, and even that has yielded limited success so far. But in general: The table on the Work-related death page gives some idea of how the numbers relate to one another.
 * 1) If both numbers are large, this is a low chance.
 * 2) If both numbers are small, this is a high chance.
 * 3) If _years is greater than or equal to _population, and both numbers are small, this is a very high chance.
 * 4) If _years is small, this is a fairly high chance.
 * 5) If _years is large, even if it's much greater than _population, this is an extremely low chance.