1 Introduction

Since 2013, the Earthquake Network (EQN) citizen science initiative has implemented the first earthquake early warning (EEW) system based on smartphone networks (Finazzi 2016). EQN uses accelerometers on board smartphones to measure ground shaking, detect earthquakes in real-time, and send alerts to people not yet reached by the damaging seismic wave. Citizens must install the EQN smartphone app to enable seismic monitoring and to receive alerts. The earthquake detection logic is implemented on a central server that gathers data from smartphones. Through the use of a statistical algorithm (Finazzi and Fassò 2017), it can determine whether an earthquake is happening. Bossu et al. (2022) demonstrated that EQN has comparable detection abilities to more costly EEW systems that use scientific-grade equipment (Kohler et al. 2018). Meanwhile, Fallou et al. (2022b) studied in detail the reaction of EQN users under different scenarios such as a warning for a felt earthquake, a missed warning and a false warning.

EQN’s smartphone network geometry is extremely dynamic. Individuals can opt-in or opt-out of the initiative at any given time, and the number of monitoring smartphones demonstrates intra-day variability due to individuals predominantly charging their smartphones at night. Finazzi et al. (2022) demonstrated that the number of monitoring smartphones affects the likelihood of earthquake detection and the duration of detection delays. These factors, in turn, impact the warning time for individuals exposed to a particular shaking intensity.

In this study, a simulation framework based on the Monte Carlo method is adopted to investigate how network geometry affects the expected warning time for citizens facing a life-threatening earthquake. Inputs of the simulation framework are the spatial distribution of the monitoring smartphones, the population spatial distribution and the spatial distribution of the earthquake intensity. The primary result comprises the distributions of warning time for individuals exposed to different levels of ground shaking intensity. To enable statistical inference, all outputs are provided with measures of uncertainty.

The simulation study examines Haiti, a country that has experienced two devastating earthquakes in its recent history. The first occurred on January 12, 2010 and resulted in over 100,000 fatalities, while the second took place on August 14, 2021 and resulted in 2248 casualties. The EQN initiative is just one of several earthquake-related citizen science projects already underway in Haiti (Calais et al. 2020, 2022; Fallou et al. 2022a), and the results of this study are expected to inform both existing and future projects.

2 Simulation framework

The simulation framework is based on the Monte Carlo method (Rubinstein and Kroese 2016). This choice is due to the non-trivial nature of the links between smartphone network geometry, detection delay, detection location, and warning time that are difficult to formalise in equations.

Considering a major earthquake, the framework aims to:

  1. 1.

    Estimate the distribution of EQN detection delays with respect to the origin time

  2. 2.

    Estimate the distribution of EQN detection separation relative to the epicentre

  3. 3.

    Determine the distribution of warning times for individuals who have been exposed to significant and life-threatening levels of shaking.

Simulation inputs taken into account by the framework include:

  1. 1.

    The population spatial distribution

  2. 2.

    The spatial distribution of the modified Mercalli intensity (MMI)

  3. 3.

    The smartphone network geometry.

Inputs 1 and 2 are assumed to be deterministic while 3 is stochastic. The network can be described as stochastic since smartphones become active at random locations and times, and the duration of the monitoring is also random.

Under the Monte Carlo method, earthquake detection is simulated multiple times using the detection algorithm outlined in Finazzi and Fassò (2017), based on a network geometry that varies during each Monte Carlo simulation. This process produces distributions of relevant quantities such as detection delay, detection distance and warning time. The variability of the distribution can be interpreted as uncertainty on the above quantities if the same earthquake strikes again.

3 Case study

The simulation framework described in the preceding section is implemented in Haiti, where EQN functions as a public EEW system, with approximately 10,000 daily active users. Subsequent sections will elucidate each simulation input, along with the EQN detection algorithm.

3.1 Population spatial distribution

Population distribution in Haiti is required in order to evaluate the population’s exposure to any particular value of MMI and to analyse the statistical distribution of warning time for those exposed to such MMI value. For this study, the Gridded Population of the World collection (CIESIN 2018), specifically the Population Count product for the year 2020 at a 30 arc-second (approximately 1 km) spatial resolution, is employed. The 2020 population distribution is used as a proxy for the present-day population.

3.2 Earthquakes and MMI spatial distribution

Major earthquakes are characterised by finite fault ruptures (Böse et al. 2012; Goda 2019) and complex focal mechanisms (Kagan 2017), which result in intensity fields that are spatially anisotropic. These fields are difficult to predict and are generally assessed a-posteriori.

Our analysis is based on two destructive past earthquakes that occurred in Haiti, for which intensity fields are available. To ensure realistic EQN performance during a major earthquake, we use this data.

The first event occurred on January 12, 2010 with a magnitude of 7.0, and the latter event on August 14, 2021 with a magnitude of 7.2. Figure 1 showcases the spatial distribution of the MMI (USGS 2010, 2021) for both events, whereas Fig. 2 illustrates the MMI population exposure when assuming the population distribution of 2020. Despite the lower magnitude, the earthquake that occurred in 2010 had an epicentre much closer to the metropolitan area of Port-au-Prince. Therefore, if the same event were to happen today, a high number of people would be exposed to high values of MMI.

Fig. 1
figure 1

Source: United States Geological Survey

Modified Mercalli Intensity maps for the M7.2 event on August 14, 2021 (left) and for the M7.0 event on January 12, 2010 (right).

Fig. 2
figure 2

Histograms of the MMI population exposure for the M7.2 event on August 14, 2021 (left) and for the M7.0 event on January 12, 2010 (right) assuming the population distribution in 2020. Red curves give, for each MMI value, the percentage of the population that was exposed to an intensity equal or higher than the MMI value

3.3 Network simulation

Simulating the smartphone network at the time of the earthquake is a critical aspect of this work since the network’s geometry impacts directly on the EQN’s detection capabilities and performance.

To create realistic network geometries, we depend on the spatial coordinates of N = 6202 EQN users living in Haiti, who possess a functioning EQN smartphone app (specifically, the app has monitored earthquake activity at least once since installation).

The N coordinates denote smartphone locations that we utilise to model network geometry. However, the number of smartphones monitoring is significantly less than N due to the EQN app’s operational constraints; it only functions when the smartphone is stationary and charging. The trend of smartphone monitoring in Haiti during a day is depicted in Fig. 3. The intra-day variation is roughly 50% positive and negative with respect to the daily average number of monitoring smartphones.

Fig. 3
figure 3

Daily trend of the number of EQN smartphones monitoring for earthquakes in Haiti from January 31, 18:30 to February 1, 18:00, 2022, Haiti local time

For this reason, the simulation of network geometry is conditioned on the number of active smartphones, which is fixed to one of the following values: n = (300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000).

For a specified value of n, the network geometry is generated through random sampling (without replacement) of n spatial coordinates from N. For small values of n, the network is sparse and exhibits high variability across different simulations. Conversely, for large values of n, the network is dense and slightly variable. Figure 4 displays two simulated network geometries with n values of 200 and 3000 respectively.

Fig. 4
figure 4

Simulated EQN network geometry with 300 smartphones (left panel) and with 3000 smartphones (right panel). Each dot represents the simulated location of a monitoring smartphone

3.4 Earthquake detection simulation

The simulation of an earthquake detection by EQN involves two stages. Firstly, based on the simulated smartphone network (as detailed in the preceding section), the detection of the earthquake by each individual smartphone is simulated. The following assumptions are taken into account:

  1. 1.

    Smartphones detect the P wave

  2. 2.

    Smartphones have a random detection delay described by a uniform distribution with support [0.5, 3.5] s

  3. 3.

    Smartphones have a 0.7 probability to detect the earthquake and send the information to the EQN server.

Assumption 1 is derived from Bossu et al. (2022) study, indicating that the P wave is detected by EQN for earthquakes with a magnitude greater than 5. Assumption 2 is contingent upon the detection algorithm employed on the smartphone and the latency of the Internet connection, while Assumption 3 recognises that smartphones may fail to sense an earthquake or transmit data to the server during an earthquake.

The output of the first stage comprises the list of smartphones that detected the earthquake. Each list entry includes the smartphone coordinates (latitude and longitude) and the smartphone detection time.

At the second stage, the EQN detection algorithm (Finazzi and Fassò, 2017) is executed on the output of the first stage. The outcome of the second stage provides the location of the detection (which is a preliminary estimate of the epicentre of the earthquake) and the time at which the detection occurred.

Detection location and detection time directly depends on the network geometry at the time of the earthquake. By simulating a large number of random network geometries, we are able to study how location and time change, to estimate the expected location and time, and to provide confidence intervals on both estimates.

4 Simulation results

Simulation results presented in this section are based on a Monte Carlo simulation with 1000 replicas (of random network geometry) for each network size n and each of the two seismic events.

The first simulation result discussed here is the EQN detection delay and detection distance with respect to the number of monitoring smartphones (Figs. 5 and 6). In general, the higher the number of smartphones the lower the detection delay and detection distance. Nonetheless, after around 1200 monitoring smartphones the gain is little. Note that 1200 monitoring smartphones is three times the minimum value of the graph of Fig. 3, meaning that, on February 1, 2022, the EQN app penetration in Haiti was three times lower than an ideal penetration that would have guaranteed a nearly stable EQN performance over the 24 h of the day.

Fig. 5
figure 5

EQN detection distance and detection delay vs number of monitoring smartphones assuming the earthquake epicentre of the August 14, 2021 event. Solid lines are the Monte Carlo averages while the coloured areas depict the Monte Carlo 95% confidence bands

Fig. 6
figure 6

EQN detection distance and detection delay versus number of monitoring smartphones assuming the earthquake epicentre of the January 12, 2010 event. Solid lines are the Monte Carlo averages while the coloured areas depict the Monte Carlo 95% confidence bands

Figures 7 and 8 illustrate the results of the Monte Carlo simulations in relation to the spatial variation of the detection location, assuming the epicentres of the August 14, 2021 and January 12, 2010 seismic events, respectively. Given a network geometry comprising 300 and 3000 monitoring smartphones, the 1000 detection locations obtained from the Monte Carlo replicas were employed to estimate the spatial density function, which characterises the likelihood of an EQN detection taking place in a specific area. The density function occupies less space in the event that smartphones are large in number, and there is little variability in network geometry. This infers that when smartphones are many, the EQN network operates in a more predictable manner.

Fig. 7
figure 7

Spatial density functions of the EQN detection location assuming a network geometry with 300 monitoring smartphones (left panel) and with 3000 monitoring smartphones (right panel) assuming the epicentre (red star) of the August 14, 2021 event

Fig. 8
figure 8

Spatial density functions of the EQN detection location assuming a network geometry with 300 monitoring smartphones (left panel) and with 3000 monitoring smartphones (right panel) assuming the epicentre (red star) of the January 12, 2010 event

Figures 9 and 10 show, for different ranges of MMI, the histograms of the warning time distribution among the Haitian population if the two earthquake events are detected by EQN at the expected detection locations (namely the modes of the spatial density functions shown in Figs. 7 and 8). Note that the warning time in the histograms of Figs. 9 and 10 varies significantly. This is mainly due to the MMI spatial distribution being highly anisotropic. Individuals who are subjected to the same MMI are not necessarily at the same distance from the epicentre. Specifically, for a particular MMI, those residing in the direction of the fault rupture have a higher advantage in terms of receiving a greater warning time.

Fig. 9
figure 9

Warning time distribution over the Haitian population assuming the MMI spatial distribution of the August 14, 2021 event and an EQN detection at the expected detection location when the number of monitoring smartphones is 3000

Fig. 10
figure 10

Warning time distribution over the Haitian population assuming the MMI spatial distribution of the January 12, 2010 event and an EQN detection at the expected detection location when the number of monitoring smartphones is 3000

The warning time distributions depicted in Figs. 9 and 10 relate to the detection of an EQN at the designated detection location and pertain to a smartphone network comprising of 3000 monitoring smartphones. Our aim is to comprehend alterations in these distributions when changes are made to the number of smartphones and the detection location. To summarize the time distributions for warnings in an easily interpretable way, we examine, for each distribution (histogram), the 2.5th percentile, the average, and the 97.5th percentile of the distribution. The average for each MMI range represents the average amount of warning time for individuals exposed to a MMI in that range. The 2.5th percentile denotes the warning time for individuals who are subjected to high MMI with low (or negative) warning times, whilst the 97.5th percentile represents the warning time for people who experience high MMI but also high warning times. Figures 11 and 12 depict how these variables evolve with the number of monitoring smartphones for certain MMI ranges and their variability due to changes in detection location.

Fig. 11
figure 11

2.5th percentile (left panel), average (centre panel) and 97.5th percentile (right panel) of the warning time for people exposed to a MMI in the range (8.5, 9], (8, 8.5] and (7.5, 8] for different numbers of monitoring smartphones assuming the MMI spatial distribution of the August 14, 2021 event. Solid lines are the Monte Carlo averages while the shaded areas depict the 95% confidence bands

Fig. 12
figure 12

2.5th percentile (left panel), average (centre panel) and 97.5th percentile (right panel) of the warning time for people exposed to a MMI in the range (8.5, 9], (8, 8.5] and (7.5, 8] for different numbers of monitoring smartphones assuming the MMI spatial distribution of the January 12, 2010 event. Solid lines are the Monte Carlo averages while the shaded areas depict the 95% confidence bands

5 Discussion and conclusions

Smartphone-based EEW systems are characterized by a dynamic network in terms of the number of smartphones and their spatial distribution. This impacts the capacity of the system to detect and provide adequate warning time. To analyse the impact of network geometry on the warning time distribution for individuals exposed to high ground shaking, this study developed a simulation framework within the context of inferential statistics.

The framework was applied to Haiti, considering two previous destructive earthquakes as a reference point, for which the known intensity spatial distribution was utilised. It was found that:

  1. 1.

    If comparable seismic events with the same magnitude and epicentre were to occur in present times, EQN would be capable of generating alerts that offer people exposed to dangerous shaking levels (e.g. exceeding intensity 7.5) a warning time of up to 12 s

  2. 2.

    EQN performance stabilises when the number of monitored smartphones in Haiti exceeds approximately 1200, which is equivalent to around 1/10,000 of the Haitian population

  3. 3.

    Within any particular intensity category (e.g. 7.5 ≤ MMI < 8.0), the warning time distribution varies considerably. This is due to the anisotropy of the intensity distribution in space combined with the distribution of the population

  4. 4.

    For a given number of monitored smartphones, the actual spatial distribution of them does not largely affect the uncertainty on the warning time (confidence intervals in Figs. 11 and 12 are in fact relatively small).

These findings suggest that, in Haiti, robust low-cost smartphone-based EEW can be established even with low adoption rates of the EQN smartphone application by the general public. On the other hand, the effectiveness of an EEW system is maximised only if the alert covers all or most of the population. The EQN initiative does not have this objective and the alert dissemination should ideally be coordinated with local authorities using multiple channels including smartphones, radio, TV and possibly warning sirens in major cities.

Finally, the statistical framework developed in this study can be easily applied to any country covered by the EQN EEW system or where a smartphone-based system is expected to be implemented. For example, the EQN system detected in real time (Aiello et al. 2023) the destructive Turkish-Syrian earthquake of February 6, 2023, which killed nearly 60,000 people (Dal Zilio and Ampuero 2023). Preliminary analysis (not reported here) on the detection delay and the warning time offered to EQN app users are consistent with the simulation results of this work.