## Abstract

A common non-pharmaceutical intervention (NPI) during the Covid-19 pandemic has been group size limits. Further, educational settings of schools and universities have either fully closed or reduced their class sizes. As countries begin to reopen classrooms, a key question will be how large classes can be while still preventing local outbreaks of disease. Here we develop and analyse a simple, stochastic epidemiological model where individuals (considered as students) live in fixed households and are assigned to a fixed class for daily lessons. We compare key measures of the epidemic - the peak infected, the total infected by day 180 and the calculated *R*_{0} - as the size of class is varied. We find that class sizes of 10 could largely restrict outbreaks and often had overlapping inter-quartile ranges with our most cautious case of classes of 5. However, class sizes of 30 or more often result in large epdiemics. Reducing the class size from 40 to 10 can reduce *R*_{0} by as much as 30%, as well as signficantly reducing the numbers infected. Intermediate class sizes show considerable variation, with the total infected varying as much as from 20% to 80% for the same class size. We show that additional in-class NPIs can limit the epidemic still further, but that reducing class sizes appears to have a larger effect on the epidemic. We do not specifically tailor our model for Covid-19, but our results stress the importance of small class sizes for preventing large outbreaks of infectious disease.

## 1. Introduction

The classic Susceptible-Infected-Recovered (SIR) epidemiological model has long been used to model the spread of infectious disease in human, animal and plant populations (Kermack and McKendrick, 1927; Anderson and May, 1979). More recently, its extended SEIR (Susceptible-Exposed-Infected-Recovered) framework has formed a central pillar of much of the modelling of the Covid-19 pandemic, often including highly realistic movement and contact networks (Ferguson et al, 2020; Kucharski et al, 2020; Firth et al, 2020; Kain et al, 2021). A key non-pharamceutical intervention (NPI) for populations across the world during the Covid-19 pandemic has been restricting population mixing through ‘lockdowns’, with people encouraged to stay at home and avoid mixing with individuals outside their household unless essential. This has often included closing educational settings of universities and schools, with 31 countries enacting full school closures and reduced schooling in a further 48 countries (UNESCO, 2020). As countries move to reopen these settings, an important question is how classes can be organised to minimise further disruption to students’ education whilst limiting epidemic spread. There have been some excellent, in-depth modelling studies of infection spread in educational settings, especially universities, with a range of NPIs included, often with a focus on testing and isolation strategies (Bahl et al, 2020; Brook et al, 2020; Cashore et al, 2020; Lopman et al, 2020). Here we focus on the question of how class sizes may impact an epidemic.

An important measure of infectious disease growth and severity is the basic reproductive ratio, *R*_{0} (Anderson and May, 1982; Heesterbeek, 2002). This well-known term defines the average number of new infections from one infected individual in an otherwise disease-free population. In mathematical definitions, *R*_{0} is broadly the product of three quantities: the potential (or probability) of infection upon an infectious contact, the infectious period and the number of disease-free individuals contacted per unit time (Dietz, 1993). An important consequence of this is that the larger the population that can be contacted by an infectious individual - the effective population size - the greater the potential spread of the epidemic. Thus, if a population can be partitioned in to smaller sub-groups with minimal mixing between them, the spread of disease can be significantly limited. This is a reality populations all over the world have experienced during the Covid-19 pandemic, with ‘lockdown’ measures aimed at limiting mixing of households or groups. Data suggests that such NPIs - such as closing businesses, closing schools and, of relevance to our study, limiting group gathering sizes - have reduced the *R*_{0} of Covid-19 by as much as 60% (Brauner et al, 2020). Moreover, Kain et al (2021) found that ‘chopping off the tail’ of individual infection distributions - in effect preventing large gatherings - could effectively restrict an epidemic in their Covid-19 parameterised model. As we seek to reopen universities and schools, some mixing between households will be essential. An important consideration, then, is the degree to which we could allow some mixing whilst still limiting the extent of the epidemic.

Ultimately, our study investigates what happens to an epidemic when a population partitioned into households is mixed for a short time period each day into fixed groups. The situation loosely in our minds is of a university cohort living in accommodation who attend a class each day. Similarly, we might consider a school population attending classes, or a local community forming interaction bubbles. However, we stress that our study is a relatively simple, theoretical study of the impact of mixing, and we make no strong claims about the precise values or predictions our model makes. We do not attempt to parameterise or structure our model specifically for Covid-19. Rather, we seek to identify the general patterns that result from mixing partititioned populations into different sized groups.

## 2. Methods

We develop and run stochastic simulations of an epidemiological model using python (code is available from GitHub, https://github.com/abestshef/classsizeSEIR). The underlying epidemiological model is an SEIR (Susceptible-Exposed-Infected-Recovered) framework where, within a setting (‘home’ or ‘class’), the dynamics would be given by the following ordinary differential equations,
where *β* is the transmission coefficient (with *βI* the ‘force of infection’), *ω* is the rate of progression from exposed to fully infected and *γ* is the recovery rate. The stochastic simulations use a Gillespie algorithm (Gillespie, 1977) to calculate waiting times between events. The possible events are initial infection (*S* → *E*), progression to full infection (*E* → *I*) and recovery (*I* → *R*). Which event occurs at a chosen time point depends on their relative probabilities at that point and in the relevant setting. Each day is divided in to fixed time periods where all students are in each setting, either home or class. We assume immediate movement between settings, with classes occuring during *t* ∈ [day + 0.4, day + 0.5], roughly equivalent to a 2.5 hour period. The event probabilities will be different in each setting; thus when a transition time is reached, the waiting time is stopped and recalculated from the transition point.

The total population size is *N* = 1000 and students are divided in to *n*_{h} houses. We take two household numbers, *n*_{h} = 100 with an average house size of 10 and *n*_{h} = 200 with an average house size of 5 (arguably reasonable averages for university halls and private housing respectively). Students are then also divided randomly in to *n*_{c} classes. Both the house and class composition is fixed in each simulation. We randomly choose 25 individuals to be infected at the beginning of each simulation, and all other individuals are susceptible. Our key investigation will be to vary average class sizes and explore the impact on the epidemic. We also compare results where transmission is high (*β* = 0.5*γ*) and low (*β* = 0.2*γ*). While these values would appear to produce very high values of the basic reproductive ratio, *R*_{0}, in the mean-field model (*β* = 0.5*γ, N* = 1000 ⇒ *R*_{0} = 500), it is well known that the actual *R*_{0} is considerably lower in invididual-based models, especially when interactions networks are small (Keeling and Grenfell, 2000). We directly calculate *R*_{0} from our simulations (see below) and found across all the results presented here the median *R*_{0} fell in the range [0.84,3.82]. We also additionally examine the case where NPIs in the class (e.g. masks, ventilation, distancing) reduce transmission from the high to the low value (a reduction of 60%). We additionally assume *γ* = 1*/*14 and *ω* = 1*/*7 in all simulations, giving a latent period of 7 days and infectious period of 14 days.

Recent work has highlighted the difficulties in representing outcomes from stochastic epidemic models (Juul et al, 2020). First, to visualise the ‘typical’ time courses, we follow the methods of Juul et al (2020) to present the ‘most central’ 50% of simulation runs. 100 simulations are run, discretised and stored. We then repeatedly sample subsets of these stored runs (100 samples of 20 curves) and increase the ‘score’ of any run that falls entirely within the bounds of the sampled curves between time-points 10 and 150. Secondly we present three key measures of the epidemic - the peak number infected, the total number infected by day 180 and the calculated *R*_{0} (see below) - from 100 simulation runs for each class size using box and whisker plots. These highlight the median values, the inter-quartile range (IQR; 25%-75%), the maximum/minimum (or 1.5×IQR if smaller) and any outliers (values greater than 1.5×IQR). Alongside these, we compare the IQR of the class of 5 (the ‘most cautious’ approach) with all other class sizes, noting where the IQRs do and do not overlap using shading of the boxplots. This allows us to explore whether class sizes can be raised above this cautious level without causing large changes to the outcome.

A brief note on the basic reproductive ratio, *R*_{0}; in our simple SEIR structure we would have , which depends on the effective disease-free population size . However, the interpretation of will vary depending on the degree of mixing. Here we make a direct calculation of *R*_{0} in each simulation by recording the number of infections caused by the 25 initially infected individuals, an intuitive measure of *R*_{0} as might be estimated during a real epidemic.

## 3. Results

### 3.1. Large households

Taking an average household size of 10 and comparing the most central 50% of runs for average class sizes of 10 and 40 (figure 1a-c), it is clear that smaller class sizes substantially restrict the epidemic. When infection rates are low (*β* = 0.2*γ*, figure 1a), with a class size of 40 there is considerable variability, with some of the central curves showing minimal spread but others reaching peaks above 15% infected. Reducing the class size to 10 clearly restricts the central epidemics, with few curves peaking above 5% infected and in some cases the epidemic completely finishing by day 90. For greater infection rates (*β* = 0.5*γ*, figure 1b) there is a clear epidemic in all of the central runs for any class size, but is clearly more severe with the larger groups, with the peak of the central runs increasing from never more than 24% for a class size of 10 to always more than 27% for a class size of 40. Finally we investigate the impact of having simple NPIs in place in classes such that the infection is reduced (from *β* = 0.5*γ* to *β* = 0.2*γ*) while in class but not at home. Compared to the previous case we do see reductions in the epidemic, with the peaks lowered by around 10%. Noticeably, however, solely reducing the class size from 40 to 10 (figure 1b blue v red) causes a greater reduction in the epidemic than solely instituting the in-class NPIs in a class of 40 (figure 1b red v figure 1c blue).

Looking in more detail for varying class sizes using the boxplots, with low infection rates (figure 2a-c) we again clearly see that greater class sizes lead to larger epidemics in terms of all three measures. The colouring highlights that only a class size of 10 has an overlapping IQR for both peak and total infections, while a class size of 15 has an overlapping IQR for peak infections only, meaning sizes of 20 or above have clearly different outcomes to a class of 5. Moreover, for a class size of 10 the top of the inter-quartile range (IQR) is 28% total infecteds, but for a class size of 35 the bottom of the IQR is 72%, emphasising the large effect of different sizes. While all class sizes have overlapping *R*_{0} IQRs with the class of 5, since this is essentially a logarithmic quantity of epidemic growth it is not unexpected, and the median value is reduced from 1.92 for a class size of 40 to 1.6 for a class size of 10.

We see considerable variation for intermediate class sizes, with the minimum and maximum total infected for a class of 25 extending from below 20% to nearly 80%, suggesting different locations could experience very different epidemics purely due to stochastic variation.

When infection rates are larger (figure 2d-f), there are very large epidemics no matter the class size, especially in terms of the total number infected. There are clearly no class sizes where the IQRs overlap with the smallest class for the peak and total infected, while only class sizes of 30 or smaller have overlapping IQRs for *R*_{0}. A class size of 10 or above results in more than 85% of the population infected in every single simulation run. Smaller class sizes do lead to noticeabley lower peaks, however - the top of the IQR for class sizes of 15 is 24% and for a class size of 10 it falls to 19%. Reducing the class size from 40 to 10 also leads to a drop in the median *R*_{0} from 3.66 to 2.90.

In-class NPIs lead to a modest reduction in the severity of the epidemic at all class sizes (figure 2g-i), though the epdiemic remains signficiantly larger for larger class sizes. Interestingly, a class size of 10 with no NPIs (peak IQR 16%-19%, total IQR 93%-96%) generally results in smaller epidemics than a class size of 40 with NPIs (peak IQR 23%-25%, total IQR 97%-99%). Thus group size limits in themselves may lead to better outcomes than many other mitigation measures. The combination of small class sizes and the in-class NPIs can dramatically reduce the severity of the epidemic. Comparing a class size of 40 without NPIs to a class size of 10 with NPIs, the median peak is reduced from 33% to 10%, the median total from 99% to 64% and the median *R*_{0} from 3.66 to 2.62. The class size of 10 has an overlapping IQR with the class of 5 for the peak infected, but no classes overlap for total infected.

### 3.2. Small households

When the average houshold is reduced to 5, comparing figures 1 and 3 shows that the size of the epidemic is reduced in all cases, since there is naturally less mixing between individuals. When transmission is low (*β* = 0.2*γ*, figure 3a, 4a-c) there are no significant outbreaks for any class size. For all class sizes 40 or smaller the median *R*_{0} is less than 1, and even for class sizes of 50 the peak is lower than 10% in every simulation. All class sizes’ peak IQRs overlap with the class of 5’s IQR, and classes of 35 or smaller have overlapping IQRs for total infected.

We see dramatic impacts of reducing the class size when transmission is higher (*β* = 0.5*γ*, figure 3b, 4d-f). Reducing the class size from 40 to 10 reduced the median *R*_{0} from 2.42 to 1.60. Even classes of 20 lead to significant outbreaks with the bottom of the IQR being 79% for the total and 11% for the peak, whereas for a class size of 10 the top of the IQR is 38% for total infected and 6% for the peak. Compared to the class of 5, only a class of 10 has an overlapping IQR for the peak infected and no class sizes overlap for total infected. We again see considerable variation in outcomes for fixed class sizes, with total infected in a class size of 15 stretching from a minimum of below 20% to a maximum of above 80%.

When NPIs are included in the class setting (figure 3c, 4g-i), for a class size of 40 the median peak is reduced from 24% without the NPI to 10% with it, and the median *R*_{0} from 2.48 to 1.78. These figures make it roughly equivalent to a class size of 15 without NPIs. However, for a class size of 40 the bottom of the IQR for total infected is still 57%. We again see that the epidemic is more severe for a class size of 40 with NPIs than for a class size of 10 without (respective median peaks: 10% vs 3%, median totals: 72% vs 28%, median *R*_{0}: 1.78 vs 1.60). Combining both smaller classes and in-class NPIs can have substantial impacts: comparing a class size of 40 without NPIs to a class size of 10 with NPIs, we see the median peak reduced from 25% to 4%, the median total infected from 96% to 14% and median *R*_{0} from 2.42 to 1.56. Compared to the class of 5, class sizes of 25 and below have overlapping IQRs for the peak, but only class sizes of 10 and 15 for the total infected. We also see significant variation in outcomes for intermediate class sizes - when the class size is 35 the IQR for total infected stretches from 29% to 58%.

### 3.3. Time in class

We additionally consider what happens when we alter the time in class to be double (*t* ∈ [day + 0.4, day + 0.6]) or halved (*t* ∈ [day + 0.4, day + 0.45]) compared to above, assuming large housesholds (*n*_{h} = 100) and low infection rates (*β* = 0.2*γ*). Predictably, increasing the class length leads to larger epidemics and decreasing it leads to smaller ones (figure 5). For the shorter classes, all class sizes’ peak IQRs overlap with the class of 5 as do the total IQRs for all classes 35 or smaller. Interestingly *R*_{0} is found to be similar for any class size, the median varying only from 1.54 to 1.7. In contrast, no class sizes have overlapping IQRs for peak or total infected when the class length is doubled.

## 4. Discussion

As might be expected, a clear result from our model is that the smaller the class size, the lesser the severity of the epidemic. For our paramater sets, reducing the class size from 40 to 10 showed reductions in the median *R*_{0} of up to 30%. Within that, our results suggest that ‘optimal’ class sizes across all measures of epidemic severity will rarely exist. Instead, decisions may vary depending on the aim, for example whether to ensure a low peak (to limit pressure on health services) or a low number of total infections (to protect as many individuals as possible from infection). Broadly speaking, small increases in class size from small groups initially lead to only modest increases in the peak of infections but rapid increases in total infections. For example, for high infection rates and small households, increasing the class size just from 10 to 15 led the median peak to increase from 5% to 9% but the median total infected from a modest 27% to a substantial 66%. The average household size and time in class also impacted the severity of outbreak, with larger households and longer classes predictably increasing the potential for large epidemics. In these cases small class sizes were even more essential. Institutional decisions are therefore likely to depend on the desired outcome and specific local conditions, and transparency of decision making will be crucial.

If we were to trust our values here as being representative of a real university (which we would caution should be in the light of the many assumptions underlying the model), we would suggest that to ensure the best chance of a restricted epidemic then classes should be limited to 10. In many cases this would have an overlapping inter-quartile range with - and thus not be clearly different to - the most cautious approach of classes of 5 for the peak and total infected. Slightly larger classes - up to 25 - may prevent the peak from rising too high, but will likely result in large numbers of total infections. We would strongly recommend against larger class sizes than 25 based on our parameters and assumptions as both peak and total infected were then consistently clearly different to the most cautious case of a class of 5. In their more detailed study applied to a specific institution, Brook et al (2020) similarly found that small group size limits were the key NPI to reducing infection, showing that a limit of 6 could reduce the effective reproductive ratio from 1.05 to 0.86, but limits of 50 had almost no impact on disease spread. Similarly, Kain et al (2021) found that ‘chopping off the tail’ of individual transmission distributions - effectively preventing the grouping of large numbers of individuals - could be a key control measure. Moreover, based on data, Brauner et al (2020) found that restricting gatherings in all settings to 10 people or fewer was one of the most succesful measures at reducing *R*_{0} during Covid-19. It thus appears a consistent result that limiting group sizes to around 10 can be a succesful NPI for slowing or even stopping epidemics.

The stochastic simulations reveal considerable variation in the epidemic time courses, particularly for intermediate class sizes. In some cases, the maximum and minimum of total infecteds in the 100 simulations spread from less than 20% to more than 80%. Thus while methods exist for approximating individual-based models with deterministic systems of ordinary differential equations (Matsuda et al, 1992; Keeling, 1999; Sharkey, 2008), we highlight the importance of using stochastic simulations to appreciate the variety of possible outcomes. In practice, this demonstrates that institutions may make the same decisions about class sizes but experience very different epidemic time courses. As such, institutions may need to consider their ‘risk appetite’ for organising logistically easier bigger class sizes at the risk of a large epidemic. Again, though, we emphasise that limiting class sizes to 10 or fewer largely prevented significant epidemics.

We investigated a simple case of employing non-pharmaceutical interventions (NPIs) in the class setting that would reduce the infection rate by 60%. We note that this would be a rather strong effect compared to estimates of NPI impacts from data (Brauner et al, 2020; Chu et al, 2020). This reduction was assumed to be due to simple NPIs such as social distancing but the exact method was not explicitly modelled. We found that, as would be expected, this led to smaller epidemics than if no NPIs were present, reducing *R*_{0} by up to 25% for large class sizes. However, we consistently found that the epidemic was smaller in a class size of 10 without NPIs than a class size of 40 with NPIs. Given that the 60% reduction due to the NPI is already rather strong, this would suggest that reducing the class size may be the most efficient control measure. Both models (Brook et al, 2020) and data analysis (Brauner et al, 2020) have similarly found that group size limitations was one of the most effective NPIs to prevent spread of Covid-19. Of course, both reducing the class size and implementing the NPI could reduce the epidemic considerably, in some cases reducing the median total infected from 96% to just 14% in our model.

As we have stated, we have relatively modest ambitions in this study of exploring how the size of mixing groups (considered as classes here) impact the time course of epidemics in partitioned populations. Other studies have provided highly detailed analyses of models with many realistic assumptions, contact networks and NPIs included (Ferguson et al, 2020; Kucharski et al, 2020; Firth et al, 2020; Kain et al, 2021) including in university settings (Bahl et al, 2020; Brook et al, 2020; Cashore et al, 2020; Lopman et al, 2020). If our study were to be applied to more realistic scenarios or to form the basis of decision making, some key further additions would be necessary. There are three key additions we would highlight. Firstly, we have assumed that all classes occur simultaneously and that transitions are immediate. In reality classes would likely be spread throughout the day and there would be unavoidable mixing during transitions. Spreading the classes out would lower the effective size of the household population for much of the day, potentially reducing infection, while increased mixing during transitions would act oppositely. Secondly we should consider additional NPIs, most importantly isolation of symptomatic (and possibly asymptomatic) individuals, as have been included in other models (Bahl et al, 2020; Brook et al, 2020; Cashore et al, 2020; Lopman et al, 2020). Given that any sort of isolation - whether due to infection or simply imposed - will reduce the degree of mixing and effective population size, such an approach would clearly be expected to further limit the epidemic. Finally, we have assumed a closed population with no mixing outside of households or classes and full adherence by the population. We should account for further external contacts, which we would expect to increase the potential for infection. While these additions would undoubtedly change the quantitative values found here, we would expect the fundamental findings - that smaller class sizes lead to smaller epidemics with less variation and that the patterns will vary according to the target measure - will remain.

## Acknowledgements

Many thanks to Alexander Fletcher for input while developing the stochastic simulation code.