{'fraction_non_alphanumeric': 0.03658198614318707, 'fraction_numerical': 0.012009237875288684, 'mean_word_length': 4.615145228215767, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Continuous-Time Markov Chain Model for the Spread of COVID-19

Since late 2019 the novel coronavirus, also known as COVID-19, has caused a pandemic that persists. This paper shows how a continuous-time Markov chain model for the spread of COVID-19 can be used to explain, and justify to undergraduate students, strategies now being used in attempts to control the virus. The material in the paper is written at the level of students who are taking an introductory course on the theory and applications of stochastic processes.


Introduction
Since late 2019, the novel coronavirus, also known as COVID-19, has caused a pandemic that shows little sign of abating. National and international health organizations are now searching intensely for ways to control the spread of the virus in order to protect educational institutions, health organizations, and the broader societies and economies.
In teaching introductory courses on the theory and applications of stochastic processes, we have shown students the wide applicability of these processes for modelling the spread of COVID-19; indeed we believe that the time remains opportune for teaching such applications. In this paper, we provide an expanded classroom discussion on modelling the spread of the virus. The exposition in the paper is at the level of an introductory course on the theory and applications of stochastic processes, and the material is accessible to students who have taken an introductory, calculus-based course in probability theory. There are N individuals in a population, some of whom have a certain infection that spreads as follows. Contacts between two members of this population occur in accordance with a Poisson process having rate λ. When a contact occurs, it is equally likely to involve any of the N pairs of individuals in the population. If a contact involves an infected and a non-infected individual, then with probability p the non-infected individual becomes infected. Once infected, an individual remains infected throughout. Let X(t) denote the number of infected members of the population at time t.
Students are asked to derive the expected waiting time, starting with a single infected individual, until all N individuals have been infected. In discussing this exercise with students we observe that the process {X(t), t ≥ 0} is a continuous-time Markov chain because contacts between individuals occur according to a Poisson process with constant rate, λ. Also, each future state of the process {X(t), t ≥ 0} depends only on the current number of infected individuals and not on past numbers of infected individuals. In addition, the process {X(t), t ≥ 0} is a pure-birth process since infected individuals remain in the "previously infected" category.
Suppose that at time t there are k infected individuals. To calculate λ k , the rate at which new infections now occur, suppose that two randomly chosen individuals come in contact. Clearly, there are k 1 ways to choose one individual at random from the group of k infected individuals; and there are N −k 1 ways to choose one individual at random from the group of N − k non-infected individuals. Also, there are N 2 ways to choose a pair of individuals at random from the population of N individuals. Therefore, the probability that the chosen pair consists of one infected and one non-infected individual is This calculation can also be obtained by applying the hypergeometric probability distribution, which students will have studied in prior courses on probability theory. On multiplying the above result by p, we find that the probability that a contact between two randomly chosen individuals results in a newly infected individual is Since contacts between individuals occur according to a Poisson process then Next, we recall for students the relationship between the exponential distribution and the Poisson process with rate λ k : The waiting time for the next observation in a Poisson process has an exponential distribution with expected value λ −1 k [9, Subsection 5.3.3]. Therefore, the waiting time until all N individuals are infected is the sum of the waiting times between successive infections.
Denote by T the waiting time until all N − 1 remaining uninfected individuals are infected. Then where the last equality follows from the trivial identity,

Application to the spread of COVID-19
Consider a "population" whose N "residents" intermingle rapidly during the ongoing COVID-19 pandemic. We model the residents' behavior using the scenario of the textbook problem stated in Section 2; the underlying assumptions are plausible if N, the size of the population, is large, say, in the thousands. Examples of the scenario are 2, 000 frenzied fans attending a weekend-long, multi-team, tournament held in a highschool basketball arena; or 6,700 passengers who have set sail on a 10-day jaunt on a fully-packed cruise ship. In particular, once such a fan or passenger becomes infected then the observed behavior of COVID-19 indicates that the person is likely to remain infected and infectious for the duration of the tournament or cruise, respectively.
Denoting by X(t) the number of infected individuals at time t, we model X(t) as a continuous-time Markov chain process. Then the expected waiting-time until all N residents are infected is given by (2.2).
There are several variations on the above model for the spread of an infection. We refer to Durrett [4, p. 151] or Ross [9, p. 360] for a similar model, called the Yule process, such that the rate of contact between two randomly chosen members of the population is λ = Nµ, where µ > 0. Then by (2.2), it follows that For large values of N, we apply the well-known approximation for the harmonic series, and also apply (N − 1)/N ≃ 1 to obtain the large-population approximation, In mathematical terminology, we have shown that E(T ) = O(ln N). The results (3.1) and (3.2) enable students to insert values of N, p, and µ to compute the expected time when all members of a population will be infected. For example, let N = 2, 000, the number of fans attending a weekend-long, multi-team, high-school basketball tournament. We set p = 0.31, a value which we choose due to data from Lyngse, et al. [7] on the COVID-19 Omicron variant's secondary attack rate, i.e., the rate with which infections occur among contacts within the incubation period following exposure to a primary case. Also, we set µ = 1 per hour, meaning that each randomly chosen pair of fans is assumed to make contact, on average, once per hour. Then we obtain E(T ) ≃ 24.52 hours.
As another example, suppose that N = 6, 700, the number of people on a fullypacked cruise ship now sailing on a 10-day trip. We again set p = 0.31, a value which is highly conservative for sea-going vessels [6]. Also, we set µ = 3 per day, meaning that each randomly chosen pair of passengers is assumed to make contact, on average, thrice daily; this reflects the fact that passengers are likely to come in close contact at mealtimes. Then we obtain E(T ) ≃ 9.47 days. Bearing in mind that thousands of cruise ships have sailed during the pandemic, it is natural to expect that many ships will return with large numbers of COVID infections.
We also observe from (3.1) and (3.2) that E(T ) is inversely proportional to µ and p. Hence, the larger the value of µ or p, the smaller the expected waiting-time until all N individuals are infected, and vice versa. This result will justify to students the importance of social-distancing as a tool for decreasing µ; cf., Oraby, et al. [8].
Further, students will also deduce from (3.2) that vaccination and masking programs that lower the value of p, the probability that a new infection occurs, also will lead to larger values of E(T ). Therefore, (3.1) and (3.2) underscore the importance of socialdistancing and vaccination strategies in efforts to end the pandemic.

Conclusions
The model described in this paper is based on introductory methods in the theory of stochastic processes. And yet it is worthy of note that the O(ln N) phenomenon appears in more complex stochastic models for the spread of epidemics; cf., Barbour [2], Isham [5]. Although policy-makers will base their decisions on more sophisticated models for the spread of COVID-19, it will be thought-provoking for students to observe that their classroom models are able to deduce results consistent with deeper analyses.
The analysis provided in Section 3 also enables students to begin their own research on the subject. By considering the Kolmogorov forward equations, students can verify well-known formulas (Ross [9, p. 367]) for the transition probabilities for the process {X(t), t ≥ 0} and simulate numerically the corresponding sample paths (Allen [1]). These results can be used to demonstrate that even if p and µ are small, the process can exhibit repeated outbreaks for very long periods of time (Isham [5]).
The preceding discussion pertains to the case in which λ k = ck where c is a constant; see (2.1). Similar analyses will enable students to study the consequences for the population of other cases. For example, suppose that individuals intermingle so rapidly that the rate of contact at state k changes to λ k = ck 2 . Students will discover that which remains finite as N → ∞. By further probabilistic analysis, students can determine that T itself remains finite, almost surely. Computer simulations can then be used to supplement classroom discussions of the practical consequences of these results and to show visually the dramatic implications of T being finite, almost surely. As a practical matter, students will deduce that rapid intermingling can cause an entire country, regardless of the population size, to be completely overrun with COVID-19 infections in a finite time.
On the other hand, suppose that policies that reduce the rate of community spread were to result in new-infection rates of the form λ k = c/k 2 . Then E(T ) = This indicates that large populations especially are likely to benefit enormously from such spread-reduction measures, for the expected time-to-overrun will far exceed the population size.
In conclusion, the model considered here is a good pedagogical starting point for students to apply their coursework to COVID-19 data. Further, the present time is opportune for motivating students and faculty to read ongoing research on modelling the spread of COVID-19 and other infectious diseases; cf., Calleri, et al. [3], Oraby, et al. [8].
Disclosure statement. No financial support was received to underwrite the preparation of this manuscript, and the authors have no relevant financial or non-financial interests to disclose.
Data Availability Statement: Data sharing is not applicable to this article as no datasets were generated or analysed during the current study.