I need to understand the Survival Analysis concept of "mean residual life (MRL)" and calculating probabilities for reaching it.
From another discussion:
The MRL at time t is the mean additional time after time t that you expect an entity to survive, given that it has survived until time t. It does not include the time from time 0 to time t that the entity has already lived through, so it is possible for it to be less than the mean lifetime if t>0. It must equal the mean lifetime if t=0.
I've worked up a Manipulate model to illustrate some of this:
MRL[variable_, distribution_] :=
NExpectation[X \[Conditioned] X > variable,
X \[Distributed] distribution] - variable;
mrlPlot = Plot[
MRL[x, LogNormalDistribution[1.75, 0.65]], {x, 0, 40},
ImageSize -> 400,
PlotRange -> All,
AxesLabel -> {"Time", None}, ImagePadding -> {{20, 40}, {10, 0}}];
Manipulate[
Module[{mrl, dist, mean, cdf, cdfMean, cdfMRL, pdf, pdfMRL,
pdfMean},
dist = LogNormalDistribution[1.75, 0.65];
mrl = MRL[t , dist] + t;
mean = Mean[dist];
cdf = N[CDF[dist, t], 3];
cdfMRL = N[CDF[dist, mrl], 3];
cdfMean = N[CDF[dist, mean], 3];
pdf = N[PDF[dist, t ], 3];
pdfMRL = N[PDF[dist, mrl], 3];
pdfMean = N[PDF[dist, mean], 3];
Column[{
"PDF",
Show[
{
Plot[PDF[dist, x], {x, 0, 40},
ImageSize -> 400,
PlotRange -> All,
AxesLabel -> {"Time", None},
ImagePadding -> {{20, 40}, {10, 0}},
Prolog -> {Text["Expectation", {mean + 3.5, .01}],
Text["t", {t + 1, pdf - .003}],
Text["MRL+t", {mrl + 3, pdfMRL - .003}]}],
Plot[PDF[dist, x], {x, t, mean}, PlotRange -> All,
AxesOrigin -> {Automatic, 0}, Filling -> Axis],
ListPlot[{{t, pdf}, {mean, pdfMRL}}, PlotRange -> All,
PlotStyle -> PointSize[0.015]],
ListPlot[{{mrl, pdfMRL}}, PlotRange -> All,
PlotStyle -> {Red, PointSize[0.015]}]
},
GridLines -> {{{t, {Dashed}}, {mean, {Dashed,
LightGray}}, {mrl, {Dashed, Red}}}, {{pdfMean, LightGray},
pdf, pdfMRL}}],
"", "CDF",
Show[{
Plot[CDF[dist, x], {x, 0, 40},
ImageSize -> 400,
PlotRange -> All,
AxesLabel -> {"Times", None},
ImagePadding -> {{20, 40}, {10, 0}},
Prolog -> {Text["Expectation", {mean + 3.5, .075}],
Text["t", {t + 1, cdf - .03}],
Text["MRL+t", {mrl + 3, cdfMRL - .03}]}],
ListPlot[{{t, cdf}, {mean, cdfMean}}, PlotRange -> All,
PlotStyle -> PointSize[0.015]],
ListPlot[{{mrl, cdfMRL}}, PlotRange -> All,
PlotStyle -> {Red, PointSize[0.015]}]},
GridLines -> {{{t, {Dashed}}, {mean, {Dashed,
LightGray}}, {mrl, {Dashed, Red}}}, {{cdfMean, LightGray},
cdf, cdfMRL}}],
"", "MEAN RESIDUAL LIFE",
mrlPlot
}]],
{{t, 0, "t"}, 0, 40, .01, Appearance -> "Labeled"},
TrackedSymbols :> {t},
FrameLabel -> {None, None,
"SURVIVAL ANALYSIS & MEAN RESIDUAL LIFE"},
LabelStyle -> Medium]
Snapshot of the Manipulate follows:

The last of the plots in the Manipulate[] shows a static plot of mean residual life. You can see how at time, t = 0 its value is just over 7 which equals the mean lifetime (expectation). It shows how MRL drops then rises as t varies from 0 to 40.
The PDF and CDF plots show something else, t + MRL, or how much the person has lived until now (t) plus the mean of the lifetime remaining to it.
Given the timeframe shown (0 to 40) t + MRL will vary its distance as t increases, but will always remain beyond t. I think this makes sense, given that someone or something has survived to some point, t, and has no absolute limit of life, they have some additional time to live.
1st question: Does this make sense so far? Just working my way through these ideas, so I may not have them all right just yet.
2nd question: I now need to calculate the probability of someone reaching t + MRL given that they have already reached t.
This seems like it should be straight forward, but I don't have a good intuition for the answer. I've thought I could do one of these:
MRL[variable_, distribution_] := NExpectation[X \[Conditioned] X > variable, X \[Distributed] distribution] - variable;
t = 5;
expectedLife = MRL[t, LogNormalDistribution[1.75, 0.65]] + t
p1 = NProbability[x >= t && x <= expectedLife, x \[Distributed] LogNormalDistribution[1.75, 0.65]]
p2 = NProbability[x <= expectedLife, x \[Distributed] LogNormalDistribution[1.75, 0.65]]
Does either p1 or p2 makes sense? Have I missed something fundamental here? How should I go about this?
Any help and explanation much appreciated.


