# To operate or not to operate?

I've been having some rather morbid thoughts lately, so, naturally, I decided to share:

Suppose I have a deadly disease, which has a chance of killing me every day that it is left uncured. Also, suppose that there's this operation I can go through, but it is not without its risks: If it is successful, I won't have to worry about the disease killing me ever again. If it's a failure, I die there and then.

More formally, let $q : N \rightarrow [0,1]$ be the probability that the disease kills me at any given day $t \in N$. Also, let $p : N \rightarrow [0,1]$ be the probability the that the operation fails if I have it on day $t \in N$. Assume that both $p$ and $q$ are monotonically increasing. The question is: At what day $t_0$ do I have to go through the operation in order to maximise my expected lifespan?

Now, to solve this: It is obvious that at any day that $p(t) \leq q(t)$ you're better off having the operation because if you don't, you'd have the same chance of dying and no chance of being cured.

However, that can't possibly be the whole story. What if $p(t) > q(t)$ for every $t \in N$? You would still have to do the operation at some point, otherwise you'll eventually die because of the accumulated probability of all those days you're left uncured.

In that light, let $f(t) = \prod_{k=0}^{t}(1-q(k))$ be the probability that you survive $t$ days without going through the operation. Then, all you need to do is to solve the inequality $f(t_0) < f(t_0-1) \cdot (1-p(t_0))$. Is that correct? Or am I still missing something?

-

The functions cannot be monotonically increasing because their values should add up to something less or equal to one. (The sum of all values of $q$ would be the probability of dying from the disease provided you're never having the operation.) – Rasmus Nov 20 '10 at 11:19
The computation in your last paragraph is not what you asked for: you wanted to compute expectation values. – Rasmus Nov 20 '10 at 11:24
There is the following problem: if there is a non-zero probability of surviving the operation, then you get an infinite expexted lifespan (provided you decide to take the operation). You could resolve this by assuming that you're dying at a certain age X anyway. – Rasmus Nov 20 '10 at 11:27
About the functions being monotonically increasing: I meant that each day you have an independent chance of dying. The same way that you can throw a die 100 times and still have a 1/6 chance that you get a six each time.  About expectation values: The question is about finding the best day to have the operation, in order to maximise the expected lifespan. In my proposed solution, I didn't think it necessary to go through expected values calculations to achieve that. Why should it be necessary anyway? – Naurgul Nov 20 '10 at 11:32
Well, your question, as I understand it, is: in which case is the expected value greater? So you have to compute these values. – Rasmus Nov 20 '10 at 11:36

## 1 Answer

Elaborating on my comments above, the formula for the expected lifespan in the case of not taking the operation is $$\sum_{t<T}t\bigl(f(t)-f(t-1)\bigr),$$ while the expected lifespan in case of taking the operation is $$\sum_{t<t_0}t\bigl(f(t)-f(t-1)\bigr)+T\cdot f(t_0).$$ Here $T$ should be the age that you will die if you take the operation, survive it, and die a natural death.

Now you just have to plug in and see which number is larger.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 15, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9600375890731812, "perplexity_flag": "head"}