Due date: Wednesday, February 14

  1. (2 points) Let \(T\) be a positive continuous random variable, show \[E(T)=\int_0^\infty S(t) \,dt.\]

##Answer to Question 1##

Let \(T\) be a positive continuous random variable. Because \(T\) is assumed to be positive, its support is from \(0\) to \(\infty\) (as seen in integral below). We can write \(f(t)\), the probability density function, as:

\[\begin{align*} P(0 \leq T \leq \infty)&=\int_{0}^{\infty} f(t)dt \\ &=\int_{0}^{\infty}dF(t) \end{align*}\]

We know that \(F(t)=1-S(t)\). Therefore: \[\begin{align*} dF(t)&=d(1-S(t)) \\ &=d1-dS(t) \\ &=0-dS(t) \\ &=-dS(t) \end{align*}\] \[\therefore f(t)dt=-dS(t) \] Using substitution, we find that: \[ \int_{0}^{\infty}dF(t)=\int_{0}^{\infty}-dS(t) \] Now, we find the expected value of \(f(t)\) by multiplying the density by t: \[\begin{align*} E(T)&=\int_{0}^{\infty}tf(t)dt \\ &=\int_{0}^{\infty}-tdS(t) \end{align*}\]

We will now use integration by parts. Let \(u=-t\) and \(v=S(t)\). \[\begin{align*} \therefore E(T)&=\left[-tS(t)\right]_0^\infty - \int_{0}^{\infty}S(t)d(-t)\\ &=0+\int_{0}^{\infty}S(t)dt \end{align*}\] \[\therefore E[T]=\int_{0}^{\infty}S(t)dt\]

  1. Question 1 suggests that the area under the survival curve can be interpreted as the expected survival time. Consider the following hypothetical data set with 10 death times (no censoring).

    > dat <- c(43, 110, 113, 28, 73, 31, 89, 65, 66, 76)
    1. (1 point) Plot the empirical survival curve.
    2. (1 point) Find the expected survival time for the hypothetical data set.

##Answer to Question 2## ##Part a##

##Part b##

We can simply add the area of the rectangles under the survival curve to find the expected survival time for the hypothetical data set is 69.4 time units.

  1. Consider a survival time random variable with hazard \[\lambda(t) = \frac{1}{10 - x} \mbox{ in } [0, 10).\]
    1. (1 point) Plot the hazard function.
    2. (1 point) Plot the survival function.

##Part a##

##Part B##

We first must derive the survivor function, as shown below:

\[ \begin{aligned} S(t) & =\exp \{-H(t)\} \\ & =\exp \left\{-\int_0^t h(t) d t\right\} \\ & =\exp \left\{-\int_0^t \frac{1}{10-x} d x\right\} \\ & =\exp \{-[-\ln (|x-10|)] \\ & =\exp \left\{\int_0^t[\ln (x-10 \mid)]\right. \\ & =\exp \{\ln (t-10 \mid)-\ln |0-10|\} \\ & =\exp \{\ln |t-10|-\ln 10\} \\ & =\exp \left\{\ln (10-t)-\ln 10\right\} \\ & =\exp \left\{\ln \left(\frac{10-t}{10}\right)\right\} \\ & =\frac{10-t}{10} \end{aligned} \] We now plot the survival function:

  1. Consider a survival time random variable with constant hazard \(\lambda = 0.1\) in \([0, 5)\), and \(\lambda = 0.2\) in \([5, \infty)\). This is known as the piece-wise constant hazard.
    1. (1 point) Plot the hazard function.
    2. (1 point) Plot the survival function.

##Part A. Plot Hazard Function##

##Part B. Plot Survival Function##

  1. Consider the setting in the exponential example presented in note 2 (pages 11 – 15). Instead of assuming \(T\) follows an exponential distribution, let’s assume \(\Delta_i\) follows a Poisson distribution with mean \(\lambda T_i\), for \(i = 1, \ldots, n\).
    1. (1 point) Derive the log-likelihood under this Poisson assumption.
    2. (1 point) Find the MLE for \(\lambda\) based on your likelihood derived in #\(\ref{poisson}\) for the simulated censored data pair (obs, delta):
    > n <- 500
    > set.seed(1); Time <- rexp(n, .15)
    > summary(Time) ## Should coincide with the summary results on page 11
        Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
     0.01134  2.09635  4.76495  6.36739  8.61652 42.20856 
    > Cen <- runif(n, 0, 10)
    > mean(Time > Cen) ## censoring rate (this should be 0.526)
    [1] 0.526
    > obs <- pmin(Time, Cen)
    > delta <- 1 * (Time < Cen)