69 Simulating distributions MT catastrophe in a two-step model
In ?exr-two-step-mt-model, you worked out the PDF for a model where two biochemical processes have to happen in succession to trigger microtubule catastrophe. The result was
\[\begin{align} &f(t;\beta_1, \beta_2) = \frac{\beta_1 \beta_2}{\beta_2 - \beta_1}\left(\mathrm{e}^{-\beta_1 t} - \mathrm{e}^{-\beta_2 t}\right), \\[1em] &F(t; \beta_1, \beta_2) = \frac{\beta_1 \beta_2}{\beta_2-\beta_1}\left[ \frac{1}{\beta_1}\left(1-\mathrm{e}^{- \beta_1 t}\right)- \frac{1}{\beta_2}\left(1-\mathrm{e}^{-\beta_2 t}\right) \right]. \end{align} \]
In a typical experiment, Gardner and Zanic measured about 150 catastrophe events. Use random number generation to simulate one of these experiments with this successive Poisson process model and plot the ECDF of times to catastrophe. That is, generate 150 random numbers that are distributed according to the story of the model. You can plot the time axis of the ECDF in units of \(\beta_1^{-1}\). Do this for several values of \(\beta_2/\beta_1\). Overlay the analytical CDF with an ECDF from your simulation to verify that they match.