Supplementary Material A: Matrix-analytic approach for the birthdeath model Whilst explicit results for the probability of response (illness) and the distribution of time until response are provided in (1) and (2), these are asymptotic approximations (which assume a very large threshold compared to initial dose) and also assume that birth rate is greater than death rate. An alternative approach that does not rely on such assumptions is detailed as follows (this will provide the foundation for the solution to the birth-death-survival model, detailed in Supplementary Material B). Time until absorption (response or resolution) is considered by representing the Markov chain as a continuous phase-type distribution (Figure A1) with probability density and distribution function given by r (t ; S , ) exp tS S M eqn. (A.1) R t ; S , 1 exp tS 1 S where Q 0 SM and 1 , 2 ,...., M 1 are the transition rate matrix and initial 0 probability vector respectively. The M 1 dimension square matrix S is tridiagonal and contains the transition rates between the transient states with non-zero elements given by si ,i i i 1, M 1 si 1,i i 1 si ,i 1 i i 1, M 2 i 1, M 2 The M 1 length vector S M S 1 0 contains the transition rates T from the transient states to the absorbing state, M . Given an initial dose of k 1, M 1 then k 1 and i 0 for i 1, M 1 , i k . The mean time until absorption and the associated variance are standard results given by S 1 1 2 S 2 1 S 1 1 2 eqn. (A.2) Thus, the vector of length M 1 containing mean absorption times with fixed initial dose k 1, M 1 is S 1 1 . < Figure A1 > However, the results given by eqns. (A.1) and (A.2) are relevant only to absorption and do not distinguish between response and resolution. Such a distinction is made in (3). Here, the M 1 dimension transition rate matrix is defined as 0 Q S0 0 0 S S M where S is as before, S0 0 0 0 0 S M S M S0 , S S 0 S 1 0 0 and T 0 . The distribution function of time until T response is written R t ; S0 , S T1 R* t ; S0 , S eqn. (A.3) where R* t; S0 , S S 1 I exp tS S M , R* t S 1SM and I is the M 1 dimension identity matrix. This result (eqn. (A.3)) is a vector of length M 1 that gives the cumulative probability density up to time t given an initial dose of k 1, M 1 . The range, k50' , k50' 1 , which contains the median infectious dose is calculated by finding k50' 1, M 1 such that k ' 0.5 and k ' 50 50 1 0.5 . In extending the approach of (3) to consider an initial probability vector the following results are obtained: R t; SM , S , S 1 I exp tS SM eqn. (A.4) Letting t gives the ultimate probability of response, P S M , S , S 1S M eqn. (A.5) Thus the dose-response relation is given by P S M , S S 1S M eqn. (A.6) Supplementary Material B: Matrix-analytic approach for the birthdeath –survival model The matrix-analytic approach detailed in Supplementary Material A is now modified. The formulae for the density functions for time until response and resolution in this model are equivalent to those of eqn. (A.4). However, adjustments are required to the transition rate matrix, S , the vectors S 0 and S M and the initial probability vector, . Derivation of S The matrix S is a block matrix of size M 1 M 1 . Each block s i , j contains the transition rates for movements from states in which T i 1, M 1 to states in which T j 1, M 1 (see Figure 1B), where T is the total number of extracellular bacteria, B, and bacteria-containing phagocytes, P. Thus, s1,1 s 2,1 S sM 1,1 s1, M 1 s2, M 1 where each si , j is of dimension i 1 j 1 and sM 1, M 1 s1,2 s2,2 sM 1,2 the constituent elements si , j i' , j ' represent the transition rate from state X i, i ' 1 to state X j , j ' 1 with i ' 1, i 1 , j ' 1, j 1 . Thus the state space of S , X | T 1, M 1 , is lexicographically ordered with cardinality M 1 M 1 1 2 i 1 i 1 eqn. (B.1) That is, there are number of transient states. The population of the non-null blocks are described next. Death (i.e. killing of bacteria) reduces the number of extracellular bacteria in the lungspace, B , and hence T , by one and thus concerns the sub-diagonal blocks si 1,i for i 1, M 2 . Non-zero elements form the diagonal of these blocks and are populated by the formula si 1,i i ' ,i ' i i ' 2 for i ' 1, i 1 . For example, i 1 yields 2 0 s2,1 0 . Survival (i.e. phagocytosis not resulting in death) too reduces the 0 0 number of extracellular bacteria but has no effect on the value of T , and thus concerns the diagonal blocks si ,i for i 1, M 1 . Non-zero elements form the superdiagonal of these blocks, which are populated by the formula si ,i i' ,i' 1 i i ' 1 for i ' 1, i . Birth (i.e. release of bacteria from phagocyte) increases B by G 2 and decreases P by one, hence increasing T by G 1 . If G 2 then the matrix S is block tri-diagonal. Moreover, birth relates to the blocks si ,i G 1 for i 1, M G (since i G 1 M 1 ). Non-zero elements form the sub-diagonal of these blocks and are populated by the formula si ,i G 1 elements of S (i.e. each si ,i i ' ,i ' i' 1,i' i ' for i ' 1, i . Finally, the diagonal for i 1, M 1 , i ' 1, i 1 ) must be populated. Rather than specifying a formula for this, it is noted that each row of the transition M 1 rate matrix Q must sum to zero, and so, qi ,i qi , j for i, j 1, 1 . i j 2 Since S0 q2,1 q3,1 qM ,1 and SM q2, M 1 q3, M 1 T qM , M 1 then such T calculation is dependent on these vectors. Derivation of S 0 Entry into the lower absorbing state can only be achieved through bacterial death from state 1,0 (see Figure 1B) which occurs with rate . Therefore, S0 0 M 1 T 0 where S 0 is of length 1. 2 Derivation of S M As can be seen from Figure 1B, the state M can be reached from a number of transient states through birth (i.e. release of bacteria from phagocyte). This represents scenarios in which the number of bacteria released results in the threshold being met or exceeded. The threshold is met from states X | T M G 1; P 0 and exceeded from states X | M G 1 T M 1; P 0 . Defining S M s1 s2 sM 1 T where si are vectors of length i 1 for i 1, M 1 , the non-zero elements of the non-null vectors are populated by the formula si i' 1 i ' for M G 1 i M 1 and i ' 1, i . Derivation of Let 1 2 M 1 where i are vectors of length i 1 for i 1, M 1 . Clearly at the time of challenge there has been no interaction between the inhaled bacteria and the cells of the immune system; and thus there has been no phagocytosis. Therefore, the only states that are initially accessible are X | P 0 , and thus the (only) non-zero element of is populated by k 1 1. References 1. Saaty TL. Some stochastic processes with absorbing barriers. Journal of the Royal Statistical Society Series B (Methodological). 1961;319–34. 2. Shortley G. A stochastic model for distributions of biological response times. Biometrics. 1965;21(3):562–82. 3. Tan WY. On the absorption probabilities and absorption times of finite homogeneous birth-death processes. Biometrics. 1976;745–52. Figure captions Figure A1 Phase type representation of the standard birth-death process. The probability of the process starting in phase i 1, 2,..., M 1 is i . The birth and death rates are 0 and 0 respectively. Absorption of the process occurs through either resolution (of the infection) or response (illness).