observation (event occurrence or right-censored), and the time to event (or time to censoring). If the survival functions between two or more groups are to be compared, then a third piece of data is required: the group assignment of each subject. Problem definition Let be a random variable, which we think of as the time until an event of interest takes place. As indicated above, the goal is to estimate the survival function underlying . Recall that this function is defined as , where is the time. Let be independent, identically distributed random variables, whose common distribution is that of : is the random time when some event happened. The data available for estimating is not , but the list of pairs where for , is a fixed, deterministic integer, the censoring time of event and . In particular, the information available about the timing of event is whether the event happened before the fixed time and if so, then the actual time of the event is also available. The challenge is to estimate given this data. Derivation of the Kaplan–Meier estimator Here, we show two derivations of the Kaplan–Meier estimator. Both are based on rewriting the survival function in terms of what is sometimes called hazard, or mortality rates. However, before doing this it is worthwhile to consider a naive estimator. A naive estimator To understand the power of the Kaplan–Meier estimator, it is worthwhile to first describe a naive estimator of the survival function. Fix and let . A basic argument shows that the following proposition holds: Proposition 1: If the censoring time of event exceeds (), then if and only if . Let be such that . It follows from the above proposition that Let and consider only those , i.e. the events for which the outcome was not censored before time . Let be the number of elements in . Note that the set is not random and so neither is . Furthermore, is a sequence of independent, identically distributed Bernoulli random variables with common parameter . Assuming that , this suggests to estimate using where the second equality follows because implies , while the last equality is simply a change of notation. The quality of this estimate is governed by the size of . This can be problematic when is small, which happens, by definition, when a lot of the events are censored. A particularly