Let

*Y* (

*t*) be a stochastic process with bounded variation, where

*t* is the time after an initial event, usually defined as the time of disease onset. We call

a forward stochastic process since the time index

*t* in

*Y* (

*t*) starts at the initial event and moves forward with calendar time. On the other hand, a backward stochastic process is defined as

, where

*T* is the time from the initial event to a failure event of interest and the time origin for

*V* (

*u*) is the failure event. In the medical cost example,

*Y* (

*t*) is total medical cost within

*t* time units after the initial event, and

*V* (

*u*) is total medical cost during the last

*u* time units of life. shows the trajectories of forward and backward cost processes for 3 uncensored individuals in the SEER–Medicare linked data.

In we can see an increase in medical cost a short period before death. To study this terminal behavior of medical cost processes, it is natural to align the processes to a different time origin, the failure event, as shown in . Since terminal behavior of stochastic processes usually incur during a short time period before death, relevant scientific questions center on a rather short period τ

_{0} before death, say, 6 months or 1 year. τ

_{0} is a prespecified time period related to scientific questions of interest. The backward stochastic processes at τ

_{0} time units before failure events are only meaningfully defined for a subgroup of patients who survive at least τ

_{0} time units, and the estimand of interest is

*E*(

*V* (

*u*)|

*T* ≥ τ

_{0}), for

*u* [0, τ

_{0}]. However, due to limited study duration, only a conditional version μ

_{τ0,τ1} (

*u*) =

*E*(

*V* (

*u*)|τ

_{0} ≤

*T* < τ

_{1}) can be nonparametrically identified, where τ

_{1} depends on study design and data availability. τ

_{1} can be taken as the maximum follow-up period, and the time period of interest τ

_{0} is usually much shorter than τ

_{1}. We will further discuss implications of incident and prevalent sampling on the identifiability constraints in Section 3.2.

To distinguish between processes with time origins at initial events and failure events, throughout this paper *t* denotes a time index counting forward from initial events and *u* denotes a time index counting backward from failure events. The processes *Y* (*t*) and *V* (*u*) address different scientific questions and have different interpretations. Consider the medical cost example, where *Y* (*t*) measures medical cost from an initial event. Note that *Y* (*t*) will not increase after death, so that *Y* (*t*) = *Y* (*T*) for *t* ≥ *T*. The interpretation of forward mean function *E*(*Y* (*t*)) is generally confounded with survival performance. For example, if there are two groups of patients with the same spending per unit time when alive but different survival distributions, the group with longer survival time will have a higher mean forward cumulative cost. There may also be crossovers between mean forward cost curves, because patients with severe disease tend to spend more near disease onset but die in shorter time than patients with less severe disease. We shall see such an example from the SEER–Medicare data set in Section 5.2. On the other hand, the time origin of a backward process *V* (*u*) is defined to be a failure event, and the backward mean function can be interpreted as the mean of stochastic processes before failure events. In the medical cost example, when financial decision is a major concern (e.g., decision made by insurance company), then discounted forward cost may be more relevant. The backward processes essentially answer different types of questions related to end-of-life cost, and there is currently a lot of public health interest in comparing and evaluating palliative care. This work could provide valid statistical methods for public health researchers interested in estimating end-of-life medical cost, together with other applications.