In a deterministic model, individuals in the population are assigned to different subgroups or compartments, each representing a specific stage of the epidemic. When dealing with large populations, as in the case of tuberculosis, deterministic or compartmental mathematical models are often used. Statistical agent-level disease dissemination in small or large populations can be determined by stochastic methods. Stochastic models depend on the chance variations in risk of exposure, disease and other illness dynamics. A stochastic model is a tool for estimating probability distributions of potential outcomes by allowing for random variation in one or more inputs over time. "Stochastic" means being or having a random variable. However, homogeneous mixing is a standard assumption to make the mathematics tractable. Further, within London then there are smaller subgroups, such as the Turkish community or teenagers (just to give two examples), who mix with each other more than people outside their group. For example, most people in London only make contact with other Londoners. This assumption is rarely justified because social structure is widespread. Homogeneous mixing of the population, i.e., individuals of the population under scrutiny assort and make contact at random and do not mix mostly in a smaller subgroup.This is often well-justified for developed countries where there is a low infant mortality and much of the population lives to the life expectancy. Rectangular and stationary age distribution, i.e., everybody in the population lives to age L and then dies, and for each age (up to L) there is the same number of people in the population.If a model makes predictions that are out of line with observed results and the mathematics is correct, the initial assumptions must change to make the model useful. Models are only as good as the assumptions on which they are based. Still, they can be useful in informing decisions regarding mitigation and suppression measures in cases when ABMs are accurately calibrated. Epidemiological ABMs, in spite of their complexity and requiring high computational power, have been criticized for simplifying and unrealistic assumptions. For example, epidemiological ABMs have been used to inform public health (nonpharmaceutical) interventions against the spread of SARS-CoV-2. Recently, agent-based models (ABMs) have been used in exchange for simpler compartmental models. The Kermack–McKendrick epidemic model was successful in predicting the behavior of outbreaks very similar to that observed in many recorded epidemics. The Kermack–McKendrick epidemic model (1927) and the Reed–Frost epidemic model (1928) both describe the relationship between susceptible, infected and immune individuals in a population. The 1920s saw the emergence of compartmental models. In the early 20th century, William Hamer and Ronald Ross applied the law of mass action to explain epidemic behaviour. Daniel Bernoulli's work preceded the modern understanding of germ theory. The calculations from this model showed that universal inoculation against smallpox would increase the life expectancy from 26 years 7 months to 29 years 9 months. Trained as a physician, Bernoulli created a mathematical model to defend the practice of inoculating against smallpox. The earliest account of mathematical modelling of spread of disease was carried out in 1760 by Daniel Bernoulli. Graunt's analysis of causes of death is considered the beginning of the "theory of competing risks" which according to Daley and Gani is "a theory that is now well established among modern epidemiologists". The bills he studied were listings of numbers and causes of deaths published weekly. The first scientist who systematically tried to quantify causes of death was John Graunt in his book Natural and Political Observations made upon the Bills of Mortality, in 1662. The modeling of infectious diseases is a tool that has been used to study the mechanisms by which diseases spread, to predict the future course of an outbreak and to evaluate strategies to control an epidemic. 8.2 When mass vaccination exceeds the herd immunity.8.1 When mass vaccination cannot exceed the herd immunity.