Nearby cells are more likely to have a recent common ancestor, so they're also more likely to be the same color. How likely, exactly? We can use the coalescence time distribution from the previous slide to figure it out.

Take two cells at distance \(r\) whose lineages meet time \(t\) ago. You can get from one cell to the other by climbing up to their common ancestor along one lineage and climbing back down along the other. The cells are the same color when this path goes through an even number of mutations. The path is \(2t\) time units long, so its probability of including an even number of mutations is \[\begin{align} F(r \mid t) = \left[1 + \frac{(\lambda\,2t)^2}{2!} + \frac{(\lambda\,2t)^4}{4!} + \frac{(\lambda\,2t)^6}{6!} + \ldots\right] e^{-\lambda\,2t} & = \cosh(2\lambda t)\,e^{-2\lambda t} \\ & = \frac{1}{2}\left(1 + e^{-4\lambda t}\right), \end{align}\] where \(\lambda\) is the mutation rate per unit time.

If we don’t know how long ago our cells’ lineages meet, we can average over all possible coalescence times to get the probability \[ F(r) = \int_0^\infty F(r \mid t)\,\rho^\text{hit}_r(t)\;dt \] that they're the same color. Surprisingly, this average has a simple closed-form expression. \[ F(r) = \frac{1}{2}\left(1 + e^{-4r\sqrt{\lambda}}\right). \]

We find our formula for \(F(r)\) by writing the integrand as \[ \frac{C}{\sqrt{\pi}} e^{-C^2 u^2}\;du + \frac{C}{\sqrt{\pi}} e^{-C^2(u^2 + u^{-2})}\;du, \] with \(C^2 = 2r\sqrt{\lambda}\) and \(C^2 u^2 = r^2/t\). The first term is a normal distribution, which integrates to 1/2. The second term has a surprising closed-form antiderivative, \[ e^{-2C^2} \operatorname{erf}\bigl[C(u^{-1} - u)\bigr] - e^{2C^2} \operatorname{erf}\bigl[C(u^{-1} + u)\bigr], \] which gives the exponential term in the probability formula.