Survival time of heart patients
Question
Suppose you're given the following dataset showing survival information for a group of patients with heart disease. A preview of the data is below:
survival | censors | age | |
---|---|---|---|
0 | 15.0 | 1.0 | 54.3 |
1 | 3.0 | 1.0 | 40.4 |
2 | 624.0 | 1.0 | 51.0 |
3 | 46.0 | 1.0 | 42.5 |
4 | 127.0 | 1.0 | 48.0 |
As shown, the dataset contains the following attributes:
- survival - how long the patient survived (in days)
- censors - whether or not the patient is still alive (0 indicates they are alive, 1 indicates they have passed away
- age - the age of the patient (in years)
Using this data, visualize the survival time (for patients who have passed away) and try fitting the data against an exponential probability distribution using the Maximum Likelihood Method. Assess the goodness of fit of the distribution.
This is of course an example of a more open-ended question, so note that while there isn't a single correct approach, interviewers would be most interested in your thought process/reasoning here.