Problem 1

Consider the following remission times in weeks(t) for 10 patients 4,5,6,8,8,8,10,10,11,12.

  1. Estimate the survival function \(\hat{S}(t)\).
  2. Draw the estimated survival curve.
  3. What will be your comment about short survival time or longer survival from the shape of the survival curve?
  4. Also estimate median survival time using linear interpolation and compare the result with (iv).
# Time points - t
# s - No. of survivors , d - No. of deaths
# S_t - estimated survival functions at time t
data =   data.frame(t = c(0,4,5,6,8,9,11,12) , d= c(0,1,1,1,3,2,1,1) , s = c(10,9,8,7,4,2,1,0) ) 
data$S_t = data$s/10
# Survival Curve
plot(data$t,data$S_t,xlab="Time (t)",ylab="S(t)",main="Estimated Survival Curve",ylim=c(0,1))
segments(0,1,4,1)
segments(4,1,4,0.9,lty=2)
for(i in 2:7){
  segments(data$t[i],data$S_t[i],data$t[i+1],data$S_t[i])
  segments(data$t[i+1],data$S_t[i],data$t[i+1],data$S_t[i+1],lty=2)
}
  segments(-1,0.5,14,0.5,col="red")

It is quite visibe that the median survival time is 8.

Assuming linear interpolation we have,

\[S(t) = a + b*t\] ;where a and b are constants.

Noting that the survival median time would be that value of t for which S(t)=0.5, we have from the table that for S(8)=0.4 and S(6)=0.7.

Using this result, we have,

\[b = \frac{S(6)-S(8)}{6-8} = -0.15 ; a = 0.4+0.15*8=1.6\] Thus, \[S(t) = 1.6 - 0.15* t\]

Putting S(t)=0.5 in the above equation we have, t = 7.3333. Thus assuming linear interpolation the median survival time is 7.3333.

Problem 2

Consider an experiment with 10 electric bulbs of a particular brand. The experimenter decides to continue the study until the failure of the first 5 bulbs and then the experiment is terminated. The survival time of the first 5 bulbs are 4,5,8,9 and 10 weeks.

Assuming that the failure of these bulbs follow exponential distribution with parameter \(\lambda\).

  1. Identify the type of censoring and justify.
  2. Estimate the survival rate and mean survival time.
  3. Estimate the probability that a bulb will survive longer than 8 weeks.
  4. If the survival times for bulbs are 4,5,8,9,10,10,10,10,10 estimate the survival rate for this case.

Since, the number of exact observations in the experiment is already fixed to be 5, it is a case of Type-II Censoring. Also as the first 5 failures are recorded, it is also a case of Right Censoring.

Under the assumption that the failure of the bulbs follow exponentia distribution with parameter \(\lambda\) and the experiment is a classic case of Type-II Censoring, the maximum likelihood estimator of \(\lambda\) may be found out to be:

\[\hat{\lambda} = \frac{5}{\sum_{i=1}^5 t_{(i)}+50}\] ;where \(t_{(i)}'s\) are the ordered exact observations.

Estimate of Survival Rate :

\[\hat{\lambda} = \frac{5}{86} = 0.05813953\]

\[\hat{S} (t) = e^{-\hat{\lambda}t}\]

Estimating the probability that a bulb will survive longer than 8 weeks

hat.lambda = 0.05813953 ; 
est.S = function(x,lambda) exp(-lambda*x)
c.s  = function(x) est.S(x,lambda=hat.lambda)

No Censoring

obs = c(4,5,8,9,10,10,10,10,10,10)
est.l = 10/sum(obs)
n.s =function(x) est.S(x,lambda=est.l)
curve(n.s,xlim=c(0,50),col="red",main="Estimated Survival Curve")
curve(c.s,xlim=c(0,50),add=TRUE)
legend("topright",c("Censored","Uncensored"),lty=1,col=c("black","red"))