Hey everyone, in this video I'm going to do this example survival analysis problem. It
says that we are given a hazard function h of x that has the following equation and then we're
also given a value for a survival function. S of 0.4 is equal to a value of 0.5. And there's
an unknown variable A in the hazard function and given these two pieces of information,
we're asked to find and solve for the value of A. This is just one example of a problem that I would
see a lot when I would take survival analysis as a class, which is we would basically be given
some type of probability distribution in a certain form, in a certain equation. Sometimes that would
be a PDF or a CDF or hazard function, etc., and then would be asked to convert it to a different
form. Sometimes we would be given, for example, a PDF and then asked what is the survival equation,
or survival function given a certain PDF. And basically we just had to convert several
times probability distributions from one form to another. And because I saw this type of question
several times in exams and in homework problems, I basically came up with a table that would give me
the relationships between the different forms of writing out the probability distributions.
I wanted to share in this video basically how I solve this type of problem and also do this
example using the method that I came up with. This is a table that I created and that I would use to
solve these types of problems. It's basically a lookup table for the equations for converting
probability distributions from one type of equation to another. For the different rows,
you have what you are given, or what you have. You might be given in a problem the PDF, the survival
function, or a hazard ratio and then you might be asked to convert to a PDF, survival function,
or hazard ratio. And then basically based on what you're given and what you want, you would look up
the equation using this table. For example, if you were given a PDF and you were asked in the problem
that you want the equation as a survival function, you would look up f, S here and then use this
equation in this cell to solve that type of problem. Or for example you might be given a
survival curve and asked what is the hazard ratio, then you could use the equations in this cell. And
that's basically how I would look things up and it would help me solve these types of problems really
quickly. I'm going to use this table to solve this example. And so for this example, we are
given a hazard ratio and we're given a value for S. Basically we want to be able to convert from
a hazard ratio to a survival function. In this case, we're given h, we want to solve for S,
so we're going to use this equation here. Let me go ahead and solve this problem and find A
using this equation. That's going to be S of x is equal to e to the negative integral from negative
infinity to x of h of t dt. We are given the hazard ratio in the problem, so I'm going to plug
in h of x for h of t here. That's going to give me e to the negative integral from 0 to x because
the hazard ratio only exists for x greater than or equal to 0 and then I'm going to plug in A plus
e to the 2x dx. This integral is equal to Ax plus e to the 2x times 1/2 for 0 to x. And then when I
plug that into the entire equation, that's going to be e to the negative Ax plus 1/2 e to the 2x
minus 1/2. From here, I went ahead and plugged in x, which we know is 0.4 and we also know that S of
0.4 is equal to 0.5. If we plug in x, then we have everything to solve for A. That's going to be S of
0.4 is equal to e to the negative A times 0.4 plus 1/2 e to the 2 times 0.4 minus 1/2. In the
next step, I'm going to plug in S of 0.4, which we're given is equal to 0.5 and I'm also going
to take the log of both sides to get rid of e. Ln of 0.5 is equal to -0.4 A plus 1/2 e to the 0.8
minus 1/2. And then solving for A, that's going to be equal to -ln 0.5 plus 1/2 minus
1/2 e to the 0.8 divided by 0.4 and this is our final answer. If we solve for that, that
means that A is approximately equal to 0.2009. And so you can either write it like that or if
you plug in everything, it's going to be 0.200, basically. And we are done with this problem.
*chiptune music*