# Model Comparison and Hypothesis Testing

## How many types of bacteria are there?

We observe a baterial colony for 20 minutes (from t=1 to t=20), and we measure the times at which we observe individual bacterium to mutate. Given the data (which will be customized for each one of you):

• Do you think there is one or two types of bacteria?

• What can you say about the mutation time constant(s)?

• (extra credit) How about the ratio of each bacteria controlled by the mix parameter $$\eta$$? You can answer this theoretically. (If you want to produce actual estimates for your problem, and you suspect your colony has only one type, and still want to answer this question, please let us know).

• Tecnical note: to do the discrete sums in the computer you may want to consider doing it in log space as

\begin{aligned} P(D\mid H_1) &= \frac{1}{\sigma}\int_{\lambda} {\prod_i \left[\frac{e^{-t_i/\lambda}}{Z(\lambda)} \right]\ d\lambda}\\ &= \frac{1}{\sigma}\int_{\lambda} e^{\sum_i \left[ -\frac{t_i}{\lambda} - \log{Z(\lambda)} \right]}\, d\lambda\\ \end{aligned} \begin{aligned} P(D\mid H_2) &= \frac{1}{\sigma_{1}\sigma_{2}}\int_{\lambda_1}\int_{\lambda_2} {\prod_i \left[\eta \frac{e^{-t_i/\lambda_1}}{Z(\lambda_1)} + (1-\eta) \frac{e^{- t_i/\lambda_2}}{Z(\lambda_2)} \right]\ d\lambda_1 d\lambda_2}\\ &= \frac{1}{\sigma_{1}\sigma_{2}}\int_{\lambda_1}\int_{\lambda_2} e^{\sum_i \log{ \left[\eta \frac{e^{-t_i/\lambda_1}}{Z(\lambda_2)} + (1-\eta) \frac{e^{- t_i/\lambda_2}}{Z(\lambda_2)} \right]} }\, d\lambda_1 d\lambda_2\\ \end{aligned}