FormalPara Highlights
  • Group sizes in pool testing strategies currently being used in practice assume that test results across patients are independent of each other, i.e. knowing that a patient tested positive does not change our belief about other patient’s status. For many high-risk groups, such as people living in long-term care facilities (LTCFs), such assumption might prove to be too strong, as significant correlation is observed in practice.

  • We develop a model for pool testing that incorporates correlation among test results into the computation of group sizes, in the context of two-stage pool testing strategies. Our model shows that as correlation grows, optimal group sizes grow as well, but so does the risk of false negatives.

  • Using data from COVID-19 testing results performed at LTCFs in Chile, we show that correlation is significant, and hence the group sizes being used are suboptimal. In our experience, authorities recommend using group sizes smaller than those prescribed by the literature, so as to account for sudden increases in prevalence. Our results call for the use of larger group sizes.

1 Introduction

Motivation and background

SARS-CoV-2, the virus that causes COVID-19, has put virtually all of the world’s health systems under stress. While multiple strategies have been adopted by different governments to contain the spread of the virus, contact tracing appears as a common factor among them. In this context, the containment policies proposed to date typically consider tracing and testing all close contacts of confirmed or suspected COVID-19 patients [5]. Close contact refers to people who have been “within 6 feet of an infected person for at least 15 minutes starting from 2 days before illness onset (or, for asymptomatic patients, 2 days prior to specimen collection) until the time the patient is isolated” [5]. In Chile, tracing policies require identifying all people who have been in close contact with a confirmed COVID-19 patient, from two days before the onset of the patient’s symptoms to 14 days after the onset of symptoms. For asymptomatic patients, the tracing period extends to 14 days after testing positive for COVID-19 [7].Footnote 1 The close contact definition naturally includes people living under the same roof on a daily basis, which is the case of those living in LTCFs.

Because infectiousness in patients arises before the onset of symptoms and because of the large fraction of asymptomatic cases, when following contact tracing guidelines, it is reasonable to expect a high degree of correlation of test results within certain populations (such as LTCFs) at the moment of sample collection.

Another common factor among the strategies adopted by various governments is the need to manage scarce resources. In particular, many countries either have struggled or continue to struggle to ramp up testing capacity, and many patients in need of testing have to wait days to be diagnosed. In these situations, where test availability is limited, pool testing arises as a strategy to significantly increase testing capacity. In a pool testing strategy, individual samples are pooled into a single sample, which is tested as if it belongs to a single patient: if the test result is negative, it is assumed that all patients in the pool would have obtained a negative result when tested individually; on the other hand, if the test result is positive, it is concluded that at least one of the patients would have obtained a positive result when tested individually. If the goal of the testing strategy is to diagnose every patient, then only a positive pool result requires additional tests in order attain such goal. To illustrate this approach, consider a pool of 10 patients whose samples are combined into a single sample: a negative result implies a saving of 90% of tests (relative to individual testing), including savings in associated reagents and process times. To the extent that negative results are frequent (we provide a characterization in Section 3), pool testing appears as an effective method to expand testing capacity. The technique has in fact been used in the implementation of massive testing initiatives in several countries [25] and has been widely adopted by Chile’s Ministry of Health [16].

The question of how to pool samples to diagnose a population has been addressed extensively in the last 80 years, with works differing mainly in the degree of sophistication allowed to the pooling strategy. In general, optimal strategies often involve multiple adaptive stages, which are very difficult to find (its calculation is extremely expensive in terms of computational resources) and extremely complex to implement due to their adaptive nature. As a result, simple two-stage schemes have been widely adopted in practice; see Section 2.

Implementing pool testing strategies for fighting the pandemic requires considering a series of practical issues. First, collecting nasopharyngeal samples (necessary for conducting the most commonly used PCR testing technique) involves a rather unpleasant procedure that requires qualified health personnel, so repeated sampling should be avoided. Samples provide enough material for two tests, hence the importance of narrowing down to two-stage pool testing strategies.

Second, correlation of test results has been observed when testing populations such as LTCFs (which have exhibited a large number of deadly outbreaks of COVID-19, particularly in Spain and Italy as stated in [13]). However, traditional pool-testing models typically assume independence of test results and often ignore the risk of false negatives [24]. The effect of correlation of test results in such recommendations is not well understood, nor is it its effect on the variance of false negatives when testing is conducted using two-stage pool testing strategies.

Objectives

In this work we explore the implications of correlation of test results for the implementation of pool testing strategies in the context of active testing of populations. For this purpose, we propose a probabilistic model for the prevalenceFootnote 2 of COVID-19 in a closed population that allows for correlation of the test results among individuals. The model includes as input the operating parameters (specificity and the sensitivity) of the testing technique (see Section 3 for definitions).

In this regard, the proposed model builds upon traditional models, which assume independence of test results between individuals in the population (leading to a binomial distribution for the total number of infections), and introduces a correlation structure by incorporating randomness in the patients’ probability of testing positive. The resulting model allows to study, for example, the effect of correlation in optimal pool sizes and in the variance of false negatives.

Complementing the above, we develop a simulation model for the contagion dynamics within a closed population. The model is capable of incorporating different interaction dynamics between subgroups of the population (for example, residents and staff of an LTCF) as well as replicating different policies of care and quarantine. The simulation model allows us to produce correlation estimates under different care/testing strategies, thus making it possible to quantify the degree of correlation in practical settings so that optimal pool sizes can be computed.

Contributions

Our first contribution lies in extending the traditional model of prevalence within a population to settings with correlation of test results, thus enabling the computation of optimal pool sizes in practical settings as well as other analyses not covered by the literature in pool testing. This is the case, for example, of the risk of false negatives, an analysis that is of interest even under the independence assumption of traditional models. In this regard, we show the existence of a trade-off between the pool size used and the variance in the number of false negatives, a relationship that is exacerbated with higher degrees of correlation in test results. Our analysis indicates that setting the pool size to minimize the expected number of tests used might lead to undesirable outcomes: depending on the sensitivity of the test, the “optimality” of the pool size might rely too strongly on an initial false negative result. This is undoubtedly a factor to consider when deciding on a pool testing strategy, making the analysis that we present not only novel and sensitive but also of quite relevant to decision makers.

In addition to the above, our work contributes to showing that it is plausible, in practice, to find scenarios with high correlation of test results when testing relatively closed populations, as in the case of LTCFs. In particular, our analysis shows how the prevalence and correlation observed at the time of testing LTCFs depend on the risky interactions between members of the community, quarantine and testing policies. In a prescriptive way, our analysis can be used to design/enable active testing campaigns, aimed to prevent outbreaks while using scarce resources efficiently.

Article structure

The rest of the paper is organized as follows. In Section 2, we review the relevant literature. Then, in Section 3, we present the probabilistic model for the prevalence, which we use to compute performance measures associated with different pool sizes under a two-stage pool testing strategy. Section 4 presents our results, including potential savings in the number of tests and the risk in the number of false negatives. Section 5 illustrates the application of our model in the context of the LTCFs managed by SENAMA, and Section 6 presents our conclusions. The details of our analytical results are relegated to Appendix A.

2 Literature review

The work on pool testing can be classified according to its treatment of the prevalence, which can be probabilistic or combinatorial: in the probabilistic case, an underlying probabilistic model on the number of positive test results is set; and in the combinatorial case, it is assumed that there is a (possibly unknown) set of individuals that would test positive. Considering the application area at hand, in this section, we review the literature on the probabilistic model. See [14] and the references therein for a guide on the combinatorial case.

The seminal work by [8] presents the original two-stage strategy for detecting syphilis-infected blood samples in the US military. The underlying (probabilistic) model there considers independence of the test results across individuals and perfect sensitivity of the test, so false negatives do not exist. The analysis of such a model provides theoretical support for the technique by showing that the expected number of tests necessary to diagnose a population is much lower than that associated with individual testing when the prevalence is low.

Building upon [8], numerous works have explored alternative multiple-stage strategies. For example, [22] and [10] propose using additional stages where subpools are formed and tested whenever a pool tests positive. Generally, pool testing strategies differ on how the pool tested in each stage is formed, and in that regard, they can be classified as adaptive or nonadaptive. In the adaptive strategies, successive pools are dependent on the results of previously performed tests (thus, the strategy proposed by [8] is adaptive, with two stages). As a problem of sequential decision-making under uncertainty, finding the best adaptive strategy can be achieve, theoretically, using dynamic programming; see, for example, [23]. In the nonadaptive strategies, the series of pools to be tested in each stage is defined prior to knowing any intermediate test results. In this context, [12] considers settings with heterogeneous population. Recently, [1] extend the latter work to settings with imperfect test parameters, while [3] analyze such a setting with emphasis on the implementation of a strategy. For a more detailed literature review on nonadaptive strategies see [4] and [2].

The novel coronavirus pandemic has drawn significant attention to the analysis of pool testing strategies, as authorities struggle to increase testing capacity. For example, the work by [15] revisits the analysis of multistage pool strategies for diagnosing COVID-19 patients, and [18] propose a Bayesian inference scheme to estimate optimal pool sizes. Closer to our analysis, [6] uses simulation to evaluate the efficiency of the method, using the model by [8] but incorporating the test operating parameters; however, neither correlation of test results nor the risk of false negatives are quantified. More recently [17] present a non-adaptive testing scheme, and put special attention to dilution effects.

Because the work on the subject is dynamic and growing, we do not attempt to provide a comprehensive summary here.

Regarding the evidence of the validity of using pool testing for diagnosing COVID-19 patients, to the best of our knowledge, [26] is the first study to validate the procedure using PCR-based testing: they showed that it is possible to pool up to 32 samples without modifying the testing protocol. In Chile, the method has been validated for sizes of up to 10 samples by [9], whose results were independently replicated by various laboratories. Currently, Chile’s Ministry of Health guidelines call for using pool testing broadly.

3 Mathematical model

Consider the problem of diagnosing a population of N patients using a two-stage pool testing strategy. Most literature on pool testing assumes that each patient tests positive independently with probability p ∈ (0, 1) (which also denotes the prevalence in the population) and use a binomial distribution to model the total number of individual positive test results. Instead, we assume that there is correlation in the test results of any two individuals, which we denote by ρ ∈ [0,1).

Note that we restrict our attention to nonnegative correlation under the logic that in the applications of interest, a positive test for one individual increases the possibility of testing positive for the other individuals.

Formally, we define the results from testing the population using the vector \(X := \left\{X_{1},\hdots ,X_{N}\right\}\), where we define

$$ X_{i} := \left\{\begin{array}{ll} 1 & \text{if patient } i \text{ tests positive when tested individually}, \\ 0 & \sim, \end{array}\right. i \leq N. $$

We assume that, given a value q ∈ (0,1), Xi is distributed Bernoulli(q) (that is, \( \mathbb {P} \left \{X_{i} = 1\right \} = q \)) for iN, and that the sequence \( \left \{X_{i}, i \leq N\right \} \) is independent and identically distributed. Note that when ρ = 0, we have that q = p, and the number of positive (individual) results in any group of n patients follows a Binomial(n,p) distribution, which is the model of proposed by [? Dorfman:1943]. In the sequel, when ρ > 0, we assume that q is a random variable distributed Beta(α,β) where

$$ \alpha = p \left( 1/\rho -1\right), \quad \beta = (1-p) \left( 1/\rho -1\right). $$
(1)

(While both α and β depend on the probability p and the correlation ρ, we omit such dependency to streamline the exposition.) Our modeling choice has two important consequences: first, the randomness in q introduces a correlation in the test results of the population; and second, the distribution of the number of positive (individual) results in a group of size n follows a BetaBinomial(n,α,β) distribution. The following lemma formalizes these properties. While these results are well known, we include their proof in Appendix A for sake of completeness.

Lemma 1

Consider a set of patients \( M \subseteq \left \{1, \hdots , N\right \} \) and define \( X (M) := {\sum }_{i \in M} X_{i} \), the number of patients in M that would test positive if tested individually. We have that \( X (M) \sim BetaBinomial ({\left |{M}\right |}, \alpha , \beta ) \), i.e.,

$$ \mathbb{P} \left\{X (M) = k\right\} = \binom{\left|M\right|}{k}\frac {B (k + \alpha, \left|M\right| - k + \beta)} {B (\alpha, \beta)}, \quad k \!\leq\! \left|M\right|, $$

where \( \left |M\right | \) denotes the cardinality of the set M, and B(⋅,⋅) is the Beta function. Additionally, for ij, we have that

$$ \begin{array}{@{}rcl@{}} \text{Corr} (X_{i}, X_{j}) &:=& \rho, \quad \mathbb{E} \left\{X_{i}\right\} = p, \quad \text {and} \\ {\text{Var}} (X_{i}) &=& p (1-p). \end{array} $$

It is worth noticing that if a Beta-Binomial distribution is fitted on uncorrelated data, it will result on low correlation values very close to zero. See Appendix F for more details.

Consider the case ρ > 0, and let n denote the pool size used in a two-stage pool testing strategy. To compute the expected number of tests to be used under this strategy, we consider the specificity and sensitivity of the testing technique. Let Se ∈ [0,1] denote the probability that a sample from an infected patient indeed tests positive (the sensitivity of the test) and let Sp ∈ [0,1] denote the probability that a sample from a patient who is not infected indeed tests negative (the specificity of the test). Like in prior work under the independence assumption, we assume that these operating parameters are not affected by the size of the pool and that each test fails the diagnosis independently, even if the same sample is used (in successive tests).

Remark 1

The assumption above on the specificity of PCR-based tests is rather mild since false positives mostly occur due to problems in the handling of the samples. The assumption on the sensitivity of the test is slightly stronger since false negatives occur when, for example, one of the samples included in the pool is very close to but below the detection thresholdFootnote 3 (in which case the sample, tested individually, tests positive). In this case, sample dilution may occur, which can place the pooled sample slightly above the detection threshold, resulting in the sample being incorrectly labeled as pathogen-free. In practice, however, evidence suggests that it is difficult to find samples close to the detection threshold [9]. \( \square \)

In the sequel, we let T denote the number of tests used to diagnose the entire population and n denote the pool size used. The following Lemma, whose proof is a direct consequence of Lemma 1, provides an expression for the expected value of T.

Lemma 2

Suppose that N is a multiple of n; then,

$$ \mathbb{E} \left\{T\right\} = N \left( \frac {1} {n} + S_{e} + (1-S_{e}-S_{p}) \frac {B (\alpha, n + \beta)} {B (\alpha , \beta)}\right). $$

When there is no correlation (ρ = 0), we recover the result presented in [6], that is based on the work presented by [20], which extends the model in [8] to include the specificity and sensitivity of the test. Note that the expression above is very easy to evaluate (the Beta function is built into most statistical software), thus considering that in practice, pool sizes are bounded by above,Footnote 4 this expression can be used directly to find optimal pool sizes via enumeration.

From Lemma 2 we see that for a given pool size, the operating parameters directly affect the expected number of tests (used to diagnose the population). In particular, we note that the higher the specificity of the test is, the lower the expected number of tests. (The specificity of PCR tests is close to 100%.) On the other hand, the effect of sensitivity is the opposite, and the higher the sensitivity is, the greater the expected number of tests. However, we see below that this occurs at the expense of an increase in the risk of obtaining a false negative on the pooled sample. To the best of our knowledge, the effect of a strategy on the variance of false negatives has been omitted in the analysis presented in the extant literature.

Let F denote the number of false negatives associated with the diagnosis of the population. The following lemma, whose proof follows from Lemma 1 and can be found in Appendix A, characterizes the expected value and variance of F, depending on the operating parameters and the pool size.

Lemma 3

Suppose that N is a multiple of n; then, \( \mathbb {E} \left \{F_{-}\right \} = N (1-S_{e}^ 2) \) and

$$ \begin{array}{@{}rcl@{}} {\text{Var}} (F_{-}) \!&=&\! N (1 - S_{e}^ 2) p - N (1 - S_{e}) (1 + S_{e} - S_{e}^ 2 -n S_{e}^ 3)\\&&\! (p^ 2 + p (1 - p) \rho) + N^ 2 (1 - S_{e}^ 2)^ 2p (1 - p) \rho. \end{array} $$

Note that while the expected number of false negatives is independent of the pool size, the second part of Lemma 3 shows that as the pool size increases, the variance of F also increases. Hence, the larger the pool size is, the greater the risk of false negatives (consider, for example, the extreme case where n = N). We explore these issues in the next section.

Let F+ denote the number of false positive tests in a population of N individuals. The following result gives a closed-form expression for the expectation of F+.

Lemma 4

Suppose that N is a multiple of n; then

$$ \begin{array}{@{}rcl@{}} \mathbb{E} \left\{F_{+}\right\} &=& N(1-S_{p})\\&&\left( S_{e}(1-p)+(1-S_{e}-S_{p})\frac{B(\alpha,\beta+n)}{B(\alpha,\beta)}\right). \end{array} $$

At an intuitive level, at equal prevalence, (positive) correlation in test results should lead to a reduction in the number of tests necessary to diagnose the population, as an individual negative test result is likely to be accompanied by similar negative tests results for other patients in the pool, which is the favorable scenario for pool testing; on the other hand, an (individual) positive result is likely to be accompanied by more positive results in the pool, however having one or more positive test results requires the same number of tests on a potential second stage. The next result formalizes this intuition.

Proposition 1

For any pool-size n and prevalence p fixed, if Se + Sp ≥ (≤)1, then the expected number of tests of a Beta-Binomial model is less (greater) or equal than the one of using a Binomial model.

Note that for most (if not all) testing techniques available for the case of SARS-CoV-2, one has that Se + Sp > 1, thus one expects to have less tests used under the Beta-Binomial model. From this result, one can conclude that the expected number of tests used under the optimal pool-size for the Beta-Binomial model will be lower or equal than that for the Binomial model. The result, however, does not say much about the relative size of the optimal pool sizes under these models. The next result states that, for the case of ideal operating parameters, the optimal pool size is larger under the Beta-Binomial model.

Proposition 2

If Se = Sp = 1, then the optimal pool size under the Beta-Binomial model is greater or equal than the one under the Binomial model.

Note that the operating parameters found in practice, while not perfect, are quite high, thus one would still expect optimal pool sizes when considering correlation in test results to be greater in the case of correlated tests results. We explore this point in our numerical experiments.

4 Results

Table 1 presents the results of using the model in a population of one hundred patients (N = 100) for prevalence that varies from 0.01% to 40%, considering 4 levels of correlation (0.2, 0.4, 0.6, and 0.8). The optimal pool size, the expected number of tests and the savings in the number of tests compared to the individual testing strategy are included. We also include the savings in the number of tests compared to the pool testing strategy using the group size obtained without the correlation. Additionally, in the event that the test is not perfect and may yield false negatives, the expected value of false negatives and their standard deviation are included. To evaluate the impact of pool testing on the risk of false negatives, we consider Se = 0.7, Sp = 1 following the scenarios analyzed in [6]. We present the expected value and standard deviation of false negatives on the right part of Table 1. In order to include practical implementation issues we limit the pool size to be up to 32 samples (n ≤ 32).

Table 1 Optimal pool sizes, expected number of tests and percentage of savings in relation to the individual testing strategy and pool testing strategy without considering the correlation (N = 100, n ≤ 32)

The savings in the number of tests can be as great as 97% compared to performing individual tests and up to 36% compared to performing pool testing when using the pool size calculated from a model that does not consider correlation. Additionally, it is observed that for low prevalence, the pool sizes are large, that is, equal to the size of the population. The optimal pool size decreases for higher prevalence values when Se = 1. In the case of having imperfect tests (Se < 1), the relation between the optimal pool size and the prevalence might not be decreasing; indeed, we can observe that for low correlations (less than or equal to 0.2), the optimal pool size increases by taking the upper limit value for high prevalence.

Figure 1 shows the savings in the number of tests when using the optimal pool size of the model (which explicitly includes the correlation) versus the case where the correlation is ignored—as a function of the correlation for different levels of prevalence.

Fig. 1
figure 1

Savings in the expected number of tests considering the correlation explicitly vs pool testing ignoring the correlation for different levels of prevalence (N = 100, n ≤ 32, Se = 0.7, Sp = 1)

Figure 2 shows the optimal pool size as a function of the prevalence for different levels of correlation. It can be seen that optimal pool testing strategy in high prevalence and low correlation scenarios is using the larger possible pool size (i.e., n = 32) showing a discontinuity. In these scenarios is unlikely not to have a positive sample within the pool, but if the test has a sensitivity lower than one (in this example Se = 0.7), we may have a false negative result that would assign a negative (wrong) status to all the individual samples

Fig. 2
figure 2

Optimal pool size based on prevalence for different correlation levels (N = 100, n ≤ 32, Se = 0.7, Sp = 1)

We also explore the impact of pool testing in the expected false positives and false negatives when using imperfect tests (Sp < 1, Se < 1). Although the expected number of false negatives does not depend on the pool size, its standard deviation is increasing on n (see Lemma 3). Figure 3 shows how the standard deviation of false negatives decreases as the pool size decreases, while the expected number of tests increases. We can see that by using n = 6 instead of the optimal pool size (n = 32), the expected number of tests is increased by 3.7% (from 72.5 to 75.2), but the standard deviation of the false negatives is decreased by 16.5% (from 10.3 to 8.6).

Fig. 3
figure 3

Standard deviation of false negatives and expected number of tests for different pool sizes (N = 100, n ≤ 32, p = 0.3, ρ = 0.1, Se = 0.7, Sp = 0.9)

Figure 4 shows the optimal pool size when considering an alternative optimization model taking into account, in addition to the expected number of tests, the expected number of false positives constraining on the standard deviation of false negatives, using the same setting than in Fig. 3. Namely,

$$ \begin{array}{@{}rcl@{}} &&\min_{n\in\mathbb{Z}_{+}} \lambda \mathbb{E}[T]+(1-\lambda)\mathbb{E}[F_{+}] \end{array} $$
(2)
$$ \begin{array}{@{}rcl@{}} &&\text{s.t.} {\text{Var}} (F_{-})\le u \end{array} $$
(3)

where λ ∈ [0,1] denotes the relative weight in the objective function between the expected number of tests and the expected number of false positives, and u > 0 denotes the upper bound on the variance of false negatives. We can see that considering the expected false positives or the standard deviation of false negatives in the optimization model lead to smaller pool sizes and larger expected number of tests.

Fig. 4
figure 4

Optimal pool size for each parameter λ when minimizing the convex combination of the expected number of tests and the number of false positives, i.e. \(\lambda \mathbb {E}[T]+(1-\lambda )\mathbb {E}[F_{+}]\) subject to constraining by above the standard deviation of false negatives (N = 100, n ≤ 32, p = 0.3, ρ = 0.1, Se = 0.7, Sp = 0.9)

5 Case study: application of pool testing in a LTCF in Chile

The correlation model of infections presented in Section 3 is motivated by the reality of the LTCFs managed by SENAMA. In these facilities, a group of older adults lives under the care of a team of health professionals. We use a dataset that has test results for a set of LTCFs for 3 months. Because people in each facility are tested only a few times during that time lapse, we fit a beta-binomial distribution by aggregating all facilities for each of the three months. This is performed by finding the distribution parameters that maximize the log-likelihood; see Appendix C for more details. Table 2 shows the fitted parameters for each month, the optimal log-likelihood obtained, and the resulting correlations. These results confirm the intuition behind the definition of close contact and the testing recommendations established by the Ministry of Health [16] since relevant levels of correlation in infections are observed.

Table 2 For each month, the fitted beta-binomial parameters α and β, the log-likelihood ll, and the prevalence p and correlation ρ

To compute the optimal pool testing size, it is necessary to know the correlation of the population at the precise time when performing the testing. For this purpose, we developed a tool that allows simulating the evolution of the infection in an LTCF, in which we can track the number of infected patients on each day in every simulated scenario. Appendix D presents the details of the tool.

In the simulation, we consider two groups of individuals: residents and staff. The simulation begins with the entire population of the LTCF (residents and staff) free of the virus, in which the staff potentially introduces the infection into the facility with a probability that depends on the external prevalence.

A matrix of interactions between the population is defined that specifies the probability that two individuals (staff or residents) come into contact during a shift. The greater the probability of interactions is, the faster the expected spread of the infection is. The probability of daily interaction between any two members of the population is assumed to be fixed (simulations are performed with different values for this probability). In this way, residents can only be infected by interactions with the staff or other residents of the LTCF, while the staff can be infected in their interactions at the facility or exogenously outside of work. The probability of infection given an interaction with an infected individual will depend on the intensity of the interaction and the contagion capacity of the infected patient.

In terms of the epidemiological model, the incubation time is supposed to follow a lognormal distribution ([11]), while the infectiousness follows the (scaled) curve of pathogen-detection via PCR testing , which we model after [19]. Specifically, the incubation period tinc follows a lognormal(1.621, 0.418) distribution, the patient’s infectiousness starts at \(t_{inf} = \min \limits (\text {Uniform}[t_{inc}/3, t_{inc}], t_{inc}-1)\) (regardless of the symptoms showed), and the recovery time follows a uniform distribution between 2 and 4 weeks trec = tinc + Uniform[14,28]; a patient is contagious between tinf and trec. The infectiousness, incubation period and whether the patient shows symptoms or not are independent variables across individuals. For the simulation, we considered that 30% of the patients are asymptomatic regardless of the group to which they belong (in line with international evidence [21]).

We assume that every symptomatic patient is isolated in preventive quarantine for 14 days from the second day after the onset of the symptoms and does not have the possibility of infecting others while in quarantine. The latter assumption seeks to replicate the reactive testing strategy that has been applied in general by SENAMA, in which those who present symptoms of the disease are selectively tested.

In our case study, we consider an LTCF with 30 residents and 20 employees in two shifts of 10 people each; thus, N = 50. The external prevalence considered is 0.1%. The total number of simulated scenarios is 1000.

For each day from the start of the simulation, we fit a beta-binomial distribution by maximizing the log-likelihood considering the infected cases in each simulated scenario. Once the parameters are estimated for each day t, namely, αt and βt, we solve (1) to obtain the estimate correlation for each day. This procedure is also performed considering the days with respect to the first symptomatic case for each simulation. In addition to the beta-binomial model, we fitted a binomial distribution by maximizing the log-likelihood function. (Recall that the latter distribution does not allow for correlations.) See Appendix E for more details. The ratio between the log-likelihood values obtained for each day with the beta-binomial model with respect to the binomial model are shown in Fig. 5. It can be seen from Fig. 5 that the likelihood is significantly better in the beta-binomial probability model, i.e., in the case that incorporates correlation.

Fig. 5
figure 5

Log-likelihood ratio between the beta-binomial and binomial models, for probabilities of daily interactions of 3, 5 and 10% (N = 50). Left-panel: days since the first day of the simulation; right-panel: days since the first symptomatic case

Figure 6 presents the evolution of the prevalence and correlation for the total population of the LTCF as a function of the simulation days, while Fig. 7 considers the time horizon with respect to the first day an individual shows symptoms. Both graphs are constructed for three levels in the probability of daily interaction (3, 5 and 10%).

Fig. 6
figure 6

Prevalence and correlation in the population for probabilities of daily interactions of 3, 5 and 10% considering the first day of the simulation (N = 50)

Fig. 7
figure 7

Prevalence and correlation in the population for probabilities of daily interactions of 3, 5 and 10% considering the first day on which there are symptomatic patients (N = 50)

In Fig. 6, both prevalence and correlation increase with time and with the probabilities of daily interaction. However, when shifting the horizon to the first day on which a patient shows symptoms, the prevalence and correlation increase with time and the probability of daily interaction for several days before decreasing, a feature that is exacerbated for the scenario with a probability of daily interaction at 10%, since most of the population will be infected (or recovered from the infection) after 30 days of the first symptomatic case, as shown in Fig. 7.

Given the time evolution of prevalence and correlation, the epidemiological situation of the population under study may be very different from one day to the next. This fact implies that the recommended pool sizes, if a pool testing strategy is used, will be different depending on the stage in which the population is found.

Tables 3 and 4 present the prevalence, correlation and the pool size recommended by the model presented in Section 3 and the pool size recommended by the model that ignores the correlation. The last column includes the savings in the expected number of tests if including the correlation when defining the pool size, for probabilities of daily interactions of 3, 5 and 10%. This analysis assumes that Se = 1, to prevent the undesirable effect of “betting” on a negative result of the whole group due to the sensitivity of the test, as discussed in Section 4. In the case of Table 3, the days refer to the start of the simulation, while in Table 4, the first day is considered to be the day on which we identify the first symptomatic patient.

Table 3 For every simulated day: prevalence, correlation, optimal pool size (n), optimal pool size without considering the correlation (n), and savings in the expected number of tests
Table 4 For every simulated day starting with the first symptomatic case: prevalence, correlation, optimal pool size (n), optimal pool size without considering the correlation (n), and savings in the expected number of tests

It can be seen from Table 3 that the recommended pool size, both considering and not considering correlation, decreases as the days progress. This result is due to the sustained increase in prevalence and correlation. Furthermore, it can be seen that the cases with the highest correlation occur when assuming a higher degree of interaction (10% interaction probability). The consequence of the presented results is that omitting the correlation implies a loss of efficiency in the expected number of tests to be used. For example, it can be seen that after a month of the simulation, using a testing strategy that considers correlation can contribute savings of 28.4% in the number of tests (versus pool testing ignoring the correlation). When performing the same exercise on the results of Table 4, it is observed that the savings in the expected number of tests are of lesser magnitude than in the previous case. Still, these results should be observed with caution, as the specific degree of interaction among individuals of the population under study will imply different correlations and therefore savings.

6 Discussion and conclusions

This work presents a model for two-stage pool testing that explicitly incorporates correlation in test results and can be used to minimize the expected number of tests. The model is inspired by the progression of the COVID-19 infection in (partially) closed communities, such as LTCFs, where correlation in test results is likely.

In the case of tests with sensitivities less than one, an explicit formula is presented to evaluate the risk in false negatives, which increases with the pool size. This highlights the trade-off between minimizing the expected number of tests versus the risk in the number of false negatives.

To estimate the prevalence and the correlation present in an LTCF, we built a simulation model that allows following the evolution of infected patients by using parameters from the literature and from the policies implemented locally in Chile by the SENAMA. Adjusting a beta-binomial distribution, we estimated the prevalence and correlation and obtained the optimal pool size using the presented model. In this way, we can advise an optimal pool size that considers both the number of days since the start of the simulation (the entire population is healthy) and the number of days after the first patient shows symptoms.

Our analysis characterizes the savings in the number of expected tests needed to diagnose the population when using the optimal pool size recommended by the model versus that recommended by the model that ignores correlation. The savings are significantly more pronounced when observing the simulation data from the beginning of the simulation because of the evolution of the correlation. In addition, our results highlight the importance of testing the LTCF promptly once symptomatic cases have been detected, due to the rapid growth in prevalence in the days immediately following, as illustrated in Fig. 7. In the same sense, the timeliness in test results truly makes it possible to manage a preventive quarantine since it is of little utility to test a population that is unable to minimize the risks of contagion while waiting for the results.

These results highlight the importance of having a mechanism that prevents a large outbreak, for example, by frequently performing tests on all members of the population. Indeed, periodic pool testing in closed groups could be recommended every two weeks in our case study: in this way, it would be possible to identify any potential outbreak in time by using a very limited number of tests since this would “restart” the dynamics of the evolution of the infection (as illustrated in Fig. 6). For the simulation, we have considered preventive quarantine of all symptomatic cases from the second day of the beginning of symptoms, showing that not even strict quarantines can prevent large outbreaks from occurring if the incubation period is long and there is a significant proportion of asymptomatic cases.

In terms of future research directions, the natural next step is to validate the dynamics of contagions in our simulation model. Once validated, the model can serve as the basis for the evaluation of testing and preventive quarantine strategies, which could include the frequent pool testing of the entire population under study. On the other hand, our model makes a number of assumptions regarding the temporal evolution of the infection and the dynamics of contagion, based on partial evidence collected to date regarding the pandemic. As the knowledge about the virus improves, new and better models of the infection dynamics can be considered and used in our simulation model.