Consequences of population size in prevalence of infectious diseases