Choose an individual uniformly from the population. The law of total probability gives the population density and survivor function as mixtures:
A hazard function is a ratio of density to survival, so averaging the densities does not average those ratios. Instead,
These are the proportions of the original individual types among those still event-free at , rather than their equal starting proportions. For example, a mixture of different exponential distributions progressively favours the lower-rate individuals. This population hazard of a survival mixture generally differs from .
For a nonnegative continuous event time , the survivor function is , and its probability density function is
The hazard function is the instantaneous event rate conditional on being event-free at that time:
If the event is certain to occur in finite time, the density is proper: , so . Since and , the cumulative hazard function is . Therefore a certain eventual event requires unbounded integrated hazard:
If the lifetime has a finite upper endpoint, the same divergence occurs as that endpoint is approached, and is interpreted as infinite beyond it.
Put and , so and . Its expectation is not generally one and depends on censoring. Under independent censoring, condition on : the exponential distribution gives
Writing for the observed event indicator, it follows that . The exponential mean imputation under independent censoring therefore gives a modified Cox–Snell residual with known mean:
On censoring, the added one is the expected remaining transformed lifetime, by memorylessness of the exponential distribution. This gives a mean-one variable, not necessarily another exponential variable. Equivalently, is a martingale residual with mean zero. Independent censoring, or its appropriate conditional version, is essential for these identities; arbitrary informative censoring does not justify the correction.
Fit a model using the relevant covariates, calculate , and plot these martingale residuals against a candidate explanatory variable or against an included variable's value. A smooth systematic trend away from zero can indicate an omitted effect or an unsuitable functional form, such as a nonlinear age effect. After fitting an appropriate effect, the residual trend should diminish. The equivalent plot of has mean-one reference rather than zero.
The transformed event time is unit exponential, and the transformed censoring time remains a censoring time because is increasing. Under independent censoring and a correctly fitted model, the Kaplan–Meier estimator of the survivor function for the Cox–Snell residuals should approximate .
Thus a logarithmic survivor plot should follow a straight line through the origin with slope minus one:
The empirical plot is a step function around that line. Systematic curvature suggests model misspecification; the late part is less stable when the risk set is small. The retained event indicators must be used rather than treating censored residuals as complete event times.
Assign the seventh individual's event weights , the conditional probabilities obtained from the original Kaplan–Meier estimator. The last three fractional counts are
Their conditional event fractions are , , and , exactly as in the original censored-data calculation. Hence the fractional allocation reproduces the original estimate:
This illustrates self-consistency of Kaplan–Meier estimation: distributing the unobserved event according to the current conditional fitted event distribution leaves the fitted distribution unchanged. The first imputation in part (b) was not such a self-consistent allocation.
For fractional event imputation, let be the fractional event weight assigned to the seventh individual at . Its event contribution at is . It belongs to the risk set at that time precisely for allocations at or later, so its fractional risk set contribution is . This justifies both parts of the hint.
For , the fractional counts at the last three times are
Earlier Kaplan–Meier estimator factors still give survival immediately before . Consequently
The three values are , , and , in strictly increasing order. Spreading the censored individual's mass beyond raises the survivor estimate from the immediate-event imputation and moves it toward the original Kaplan–Meier estimator.
Now treat the seventh observation as an actual event at , not as a censoring at that time. The risk sets are and the event counts are . The Kaplan–Meier estimator therefore gives
Conditional on reaching , the two events at that time have total probability . Surviving them has probability , which is then divided equally between the remaining two event times. Thus
The risk sets at the six event times are , each with one event: the censoring between and removes the seventh individual before the fourth event. Thus the survivor estimate after the fifth event is
Conditional on reaching , the event mass at is , that at is , and that at is . Hence the conditional event probabilities are
Write . If the first event is recovery, the epidemic has ended and a second event is impossible. If the first event is infection at time , its density is , and the new state is . The total next-event rate is
Thus, by the Markov property, the two-event probability in a stochastic SIR model by time one is
Evaluate the first term as . For the second, , so
Therefore
For and , the denominator is positive. Event times are continuous, so inclusion or exclusion of the endpoint one makes no difference.
The first event causes extinction precisely when it is recovery of the sole initially infectious individual. An infection would instead give two infectious individuals. The competing exponential clocks calculation therefore gives the first-event extinction probability
Initially, the infection and recovery transition intensities are and . By competing exponential clocks, the first-event waiting time has distribution
For the stochastic SIR model, the state is a continuous-time Markov chain on nonnegative integer triples summing to , initially . Its only transitions are
Rates vanish when a proposed transition would leave the state space. Equivalently, with independent unit-rate Poisson processes , the Poisson time-change representation of a Markov chain is
The left limits describe the state immediately before each jump. In the Gillespie algorithm, wait an exponential distribution time with rate , then choose infection or recovery in proportion to these two rates.
At time zero the chain-binomial epidemic model has and , independently. The update gives . Since and , extinction at day one is equivalent to and . Hence the one-day extinction probability is
This is the exact probability for the printed discrete-time approximation, which requires wherever used. It should not be substituted for the distinct continuous-time extinction calculation.
The infectious count in the SIR model obeys . At the initial state, , so initial epidemic growth requires the epidemic threshold for the closed SIR model
Here is the basic reproduction number in this mass-action infection convention. Necessity also follows globally: is nonincreasing, so if , then for all time and never increases. When , growth is impossible.
Whenever , divide the first SIR model equation by the recovery equation:
The SIR susceptible-recovered identity follows by integrating from , giving susceptibles as a function of recovered individuals:
Population conservation then gives the infectious count:
These identities extend continuously to the limiting state where the infectious count vanishes.
The deterministic SIR model follows the ordinary differential equations
Use and . The state space is , ; summing the three equations proves conservation of this population. Infection is supported only where and , and recovery only where . The rates vanish at the corresponding boundaries, preventing negative compartment sizes.
This convention has an unnormalized population infection rate , as required by the printed threshold. A convention with infection rate would use a differently scaled parameter.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact