This section provides a brief background on the necessary terminology and methods used in this paper. Initially, some standard statistical terminology will be described; this initial section can be skipped over by readers with a grounding in statistics. This is followed by an overview of “bootstrapping” with some worked examples (Sect. 2.1). Finally, a summary of functional analysis, used to compare egress curves, is given (Sect. 2.2).
A sample statistic is the value of an estimator based on a sample from the population of results. A population parameter can be considered as the value of an estimator based on the entire population of results. Examples of estimators include the mean TET (MT) (Eq. 1), the 95th percentile TET, and the standard deviation (SD) of TET. Ideally, one would want to know the parameter but practically it is (generally) only possible to obtain the statistic of a sample of results and a range of potential values for the parameter. The sample statistic would display variability depending on the nature of the sample obtained although the sample statistic tends to the value of the parameter as the size of the sample increases (Law of Large Numbers [22]).
$$MT = \frac{{\mathop \sum \nolimits_{i = 1}^{n} TET_{i} }}{n}$$
(1)
The “expected value” of a sample statistic is the mean value of a series of infinitely repeated independent instances of that sample statistic with the same sample size [22]. This will equate to the corresponding population parameter if the estimator is unbiased. This is the case for many estimators although the sample SD is slightly biased. Whilst the standard variance bias correction has been applied (Eq. 2), i.e. dividing by (n − 1) rather than n, there is still some residual bias. It is reasonable to neglect this bias given the large scale of the variability associated with the SD compared to the small size of the bias and the complexity of calculating that bias. The small bias that does exist also diminishes as the sample size increases.
$$SD = \sqrt {\frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {TET_{i} - MT} \right)^{2} }}{{\left( {n - 1} \right)}}}$$
(2)
Although it is generally impossible to exactly know the population parameter it is possible to estimate a range of possible values for the population parameter based on the sample of results. This is a CI, which will differ between different samples but will frequently include the parameter of interest. Ideally, this frequency is determined by the confidence level (CL). However, the actual frequency, known as the coverage probability, may differ in practice. A set of CIs for 50 different samples is depicted in Fig. 1. This is illustrated for a 95% CL in Fig. 2 where the vast majority, 47 (~ 95%), of the sample CIs contain MT(∞) but 3 (~ 5%) of the sample CIs do not. The superscript brackets indicate the number of samples used to calculate the statistic, when the number is ∞ the statistic is equivalent to the population parameter. In general, only a single sample of results will be generated, although that single sample could contain hundreds of simulations, so only one CI will be generated per statistic of interest.
The calculation of the CI for certain parameters is straightforward due to the availability of standard expressions. For the MT, the CI with a 100(1 − α)% CL can be calculated using Eq. 3 where T−1(p, df) is the inverse t-distribution for percentile p with df degrees of freedom [22]. This expression assumes that the population SD of the TETs is unknown, which is generally the case in egress models/experiments, and is estimated with the sample SD. If the original data is normally distributed, then the expression is valid for n > 1. For non-normally distributed data, the expression is generally valid due to the central limit theorem for a larger n but is dependent on the nature of the original data distribution. Some sources advocate a minimum n of 30 although for skewed data a minimum n of 40 [31] has been suggested. It is further assumed that the data is independent and identically distributed.
$$100\left( {1 - \alpha } \right)\% CI = \left[ {\left( {MT^{\left( n \right)} + \text{T}^{ - 1} \left( {\frac{\alpha }{2},n - 1} \right) \times \frac{{SD^{\left( n \right)} }}{\sqrt n }} \right),\left( {MT^{\left( n \right)} + \text{T}^{ - 1} \left( {1 - \frac{\alpha }{2},n - 1} \right) \times \frac{{SD^{\left( n \right)} }}{\sqrt n }} \right)} \right]$$
(3)
In Eq. 3, the CI is quoted as a lower limit and an upper limit of the population parameter value, e.g. 150.0 with a 95% CI [135.0, 165.0]. The CI could also be quoted as the difference between the limits and the sample statistic, e.g. 150.0 with a 95% CI [− 15.0, + 15.0]. Those differences could also be quoted as percentages, e.g. 150.0 with a 95% CI [− 10%, + 10%]. If the CI is symmetric then it can be expressed in shortened form with a plus-minus limit, e.g. 150 ± 10% (95% CI).
A CI is a trade-off between its width, which should ideally be as narrow as possible, and its CL, which should ideally be as high as possible. Ideally, one would want a 100% confidence, but this leads to an infinitely wide CI which is not very useful. For a statistic calculated from a fixed number of data points, the CI width will increase with increasing CL. Having a very high CL will result in a very wide CI whilst a “low” CL with a correspondingly narrow CI is also unhelpful as there is little confidence that the CI contains the parameter of interest. A 95% CL is typically chosen as it is very likely to contain the population parameter whilst maintaining a relatively narrow width. When calculating the CIMT (Eq. 3) with varying CLs (see Table 1), a 99% CL gains an extra 4% in confidence but requires a 33% increase in CI width compared to a 95% CL. A higher 99.9% CL gains an extra 4.9% in confidence but requires a 71% increase in CI width compared to a 95% CL. Using a lower 68% CL (equivalent to 2 × standard error widths) reduces the CI width by 49% but there is a reduction in confidence of 27% compared to a 95% CL. From Eq. 3, the width (WMT) of the CIMT with a fixed CL will also tend to narrow with increasing n (see Eq. 4).
Table 1 Calculation of the Relative Widths of CIs for the Mean Value (Eq. 3) with Increasing CL for a Sample Size of 100 $$W_{\text{MT}} \left( n \right) \propto \frac{1}{\sqrt n }$$
(4)
In order to further discuss CIs, it is necessary to describe sampling distributions. A sampling distribution is the probability distribution of a statistic for a fixed sample size for all the possible samples that could be selected [22]. For example, a set of five TETs are obtained from repeated trials and the statistic of interest is the mean of those TETs. If this set of five trials is repeated, a further set of TETs can be obtained, and another mean of those values is calculated. Each time the process is repeated a different estimate for the mean value will be obtained, see Table 2.
Table 2 An Example Set of Samples Taken from a Distribution. Each Sample Consists of Five Values If this could be repeated a very large number of times, then it would be possible to produce a distribution of the sample mean values, i.e. the sampling distribution. Assuming the TETs are normally distributed with an unknown population SD then it has been shown theoretically that the sampling distribution for the example can be represented by a t-distribution [22]. The mean of the sampling distribution is equal to the expected value and the population mean of the original TET distribution. From the central limit theorem, the standard deviation of the sampling distribution, also known as the standard error, is the standard deviation of the original TET distribution divided by √n.
From this sampling distribution, the interval that contains the innermost 100(1 − α)% of sample means can be described by Eq. 5 (see Fig. 2).
$$P\left( {\left\{ {MT^{\left( \infty \right)} + \text{T}^{ - 1} \left( {\frac{\alpha }{2},n - 1} \right) \times \frac{SD}{\sqrt n }} \right\} < MT^{\left( n \right)} < \left\{ {MT^{\left( \infty \right)} + \text{T}^{ - 1} \left( {1 - \frac{\alpha }{2},n - 1} \right) \times \frac{SD}{\sqrt n }} \right\}} \right) = 1 - \alpha$$
(5)
Equation 5 is not particularly useful as in general the value of the MT(n) is known and the MT(∞) is unknown. However, Eq. 5 can be algebraically recast [22] to make the MT(∞) the subject of the inequality leading to the probability that the MT(∞) lies within a CI with a CL of 100(1 − α)% (Eq. 6). This is a probabilistic statement of the CI given in Eq. 3.
$$P\left( {\left\{ {MT^{\left( n \right)} +\text{T}^{ - 1} \left( {\frac{\alpha }{2},n - 1} \right) \times \frac{SD}{\sqrt n }} \right\} < MT^{\left( \infty \right)} < \left\{ {MT^{\left( n \right)} + \text{T}^{ - 1} \left( {1 - \frac{\alpha }{2},n - 1} \right) \times \frac{SD}{\sqrt n }} \right\}} \right) = 1 - \alpha$$
(6)
For some statistics, such as the mean value (Eq. 3) and the 95th percentile value [13], a theoretical solution exists for determining the CI. However, for many statistics a theoretical solution may not exist or is difficult to derive. For those cases, it may be possible to use bootstrapping to approximate the sampling distribution and hence derive the CI.
Bootstrapping Concepts
Bootstrapping [32,33,34,35,36] is a widely used computational statistical technique. The premise of bootstrapping is that inference about a population from sample data can be modelled by resampling the sample data and performing inference about a sample from resampled data. Generally, the population distribution is unknown and only the sample of data is known. Bootstrapping uses this sample of data as an approximation to the true population distribution. The bootstrapping technique is applicable to many estimators although there are known difficulties associated with the modal value [37]. Care is also required when applying the technique to heavy-tailed distributions particularly those with infinite variance [38, 39]; this is not anticipated to be a major issue in the egress modelling context.
A simple worked example, to determine the CI of the mean, follows. In practice, bootstrapping is not generally used to determine the CI of a mean value due to the wide applicability of Eq. 3. The primary intent of this example is to demonstrate the methodology. A set of n values are sampled from some unknown distribution and leads to the set of values in the “Original” row of Table 3. In this example, n is set to five. This data could be expensive to obtain, e.g. these could be TETs from a set of egress trials. The mean of the original sample is 139.5. The original sample is now resampled to create a bootstrap sample, which is a very inexpensive process. Each value in the original sample has the same, 1/n, chance of being selected. Values are randomly copied from the original sample n times to create a bootstrap sample (see Table 3). This implies that a particular value from the original sample may be represented once, more than once, or not at all in a bootstrap sample. Furthermore, only values from the original sample can be represented in the bootstrap sample. For example, it can be seen for bootstrap 1 that 99.7 is represented twice and 188.5 is not represented at all and the other values are represented once each. When n values have been selected, the mean value of the bootstrap sample is calculated. This process is repeated B times, where B ≫ n, to create a bootstrap sampling distribution of the mean (cf. Table 2). In this example B is set to 19. This is a far lower number of bootstrap samples than would be used in practice but is used here for demonstration purposes.
Table 3 A Worked Example of Bootstrap Samples Based on an Original Sample of Five TETs The CI, with a 90% CL (the maximum CL that can be represented with 19 bootstraps), is obtained by taking the percentile values that bound the innermost 90% of the sampling distribution which are the 5th and 95th percentile values. The bth bootstrap index, of the vector of ascending ordered bootstrap means, representing the (100p)th percentile is given by Eq. 7.
$$b = \left( {B + 1} \right)p$$
(7)
This equates to the 1st and 19th values of the ordered bootstrap sampling distribution of the mean (see Table 4). The bootstrap 90% CI of the mean is [117.1, 176.0]. Using the conventional calculation (Eq. 3) the 90% CI is [108.3, 170.8]. The bootstrap CI is not particularly close to the standard approach although is not unreasonable given the limited sample size and small number of bootstraps. The accuracy of the method significantly improves as n and B increase, and as more sophisticated methods are used to select the required percentiles from the bootstrap sampling distribution.
Table 4 The Lower and Upper Ends of the Ordered Bootstrap Sampling Distribution of the Mean for the Worked Example The above worked example was repeated using a sample size of 100 values and 1999 bootstraps. In this case the mean of the sample was 156.5. The bootstrap 90% CI, [151.1, 161.5], gives a good approximation to the conventionally determined 90% CI (Eq. 3), [151.4, 161.6], in this instance. The bootstrap sampling distribution of the mean for this case is presented as a histogram in Fig. 3. The bootstrap mean sampling distribution is similar in shape to a normal distribution and approximates the true sampling distribution.
The simplest approach for selecting a centred CI with a 100(1 − α)% confidence level is to assume it is bounded by the 100(α/2)th and 100(1 − α/2)th percentile bootstrap samples. This is the approach used for the worked example above. However, this simple percentile approach has two notable problems. Firstly, it tends to give narrower CIs than expected when “small” sample sizes were used. Secondly, it does not account for skew and bias that may exist in the samples.
For the first problem, Hesterberg proposed a correction based on the normal distribution and the t-distribution [40]. This is based on correcting the percentile limits of the bootstrap sampling distribution of the mean. The “corrected” (100\(\acute{p}\))th percentile based on the original (100p)th percentile of sample size n is given by Eq. 8, where Φ(z) is the CDF of the standard normal distribution function. This correction always tends to make the CI more conservative but could result in an over-correction or insufficient correction of the required percentile dependent on the actual, but unknown, form of the sampling distribution. In the event of an over-correction, the CI will be wider than it should be but represents a more conservative estimate. If the CI is insufficiently corrected, then at least some correction is applied compared to no correction thus bringing the coverage probability of the CI closer to the nominal confidence level.
$$\acute{p} \left({p, n} \right) = {\Phi}\left({\sqrt {\frac{n}{n - 1}} {\text{T}}^{- 1} \left({p,n - 1} \right)} \right)$$
(8)
Table 5 illustrates the correction (Eq. 8) applied to the 5th percentile for various sample sizes. The effect of the correction is significant for small n but diminishes as n increases.
Table 5 The Value of the Corrected 5th Percentile (Eq. 8) Based on Sample Size n For the second problem associated with possible skew and bias in the samples, there are a number of advanced bootstrapping methods for determining appropriate limits for the CI, including the Bias Corrected and accelerated (BCa) method [32, 33], ABC, studentized, and double bootstrap [35]. The BCa bootstrap was selected due to its wide range of applicability [41], its relatively straightforward implementation, and its comparatively low computational requirements.
The BCa corrected 100(α/2)th percentile bootstrap index bl and 100(1 − α/2)th percentile bootstrap index bu, incorporating the small sample size correction (Eq. 8), are given by Eqs. 9 and 10 respectively, where \(\lfloor{x}\rfloor\) is the integer floor and \(\lceil{x}\rceil\) is the integer ceiling of x. Equation 11 is the bias correction factor where Φ−1 is the inverse CDF of the normal distribution, θ is the calculated statistic, and \(\theta_{j}^{*}\) is the jth bootstrap of the distribution of θ*. Equation 13 is the acceleration factor derived from the original sample data. The CIθ is [\(\theta_{{b_{l} }}^{*,o}\), \(\theta_{{b_{u} }}^{*,o}\)] where \(\theta_{b}^{*,o}\) is the bth bootstrap of the ordered distribution of θ*.
$$b_{\text{l}} = \left \lfloor{\left({B + 1} \right)\acute{p}\left({{\Phi}\left({z_{0} + \frac{{z_{0} +\Phi^{- 1}\left({\frac{\alpha}{2}} \right)}}{{1 - acc \times \left({z_{0} +\Phi^{- 1}\left({\frac{\alpha}{2}} \right)} \right)}}} \right),n} \right)}\right \rfloor$$
(9)
$$b_{\text{u}} = \left \lceil{\left({B + 1} \right)\acute{p}\left({{\Phi}\left({z_{0} + \frac{{z_{0} +\Phi^{- 1}\left(1-{\frac{\alpha}{2}} \right)}}{{1 - acc \times \left({z_{0} +\Phi^{- 1}\left(1-{\frac{\alpha}{2}} \right)} \right)}}} \right),n} \right)}\right \rceil$$
(10)
$$z_{0} = \Phi^{ - 1} \left( {\mathop \sum \limits_{j = 1}^{B} f\left( {\theta_{j}^{*} ,\theta } \right)/B} \right)$$
(11)
$$f\left( {\theta_{j}^{*} ,\theta } \right) = \left\{ {\begin{array}{*{20}c} {1 \,if\, \theta_{j}^{*} < \theta } \\ {\frac{1}{2}\, if\, \theta_{j}^{*} = \theta } \\ { 0 \,if\, \theta_{j}^{*} > \theta } \\ \end{array} } \right.$$
(12)
$$acc = \frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {\bar{\theta }_{\left( \cdot \right)} - \theta_{ - i} } \right)^{3} }}{{6\left[ {\mathop \sum \nolimits_{i = 1}^{n} \left( {\bar{\theta }_{\left( \cdot \right)} - \theta_{ - i} } \right)^{2} } \right]^{1.5} }}$$
(13)
\(\theta_{ - i}\) is \(\theta\) calculated using the original n simulations performed barring the ith simulation.
$$\bar{\theta }_{\left( \cdot \right)} = \frac{{\mathop \sum \nolimits_{i = 1}^{n} \theta_{ - i} }}{n}$$
(14)
Bootstrapping the CI for the SD
If the TETs are normally distributed, the CISD can be determined using a Chi squared distribution with n − 1 degrees of freedom [22]. However, in general the TETs will not be normally distributed and those theoretically derived CIs could be inappropriate. The CISD is therefore determined using bootstrapping.
For n simulations there are n TETs that are used to compute SD(n). A single bootstrap SD* can be derived by randomly resampling, with replacement, those n TETs n times and calculating the SD of that bootstrap sample. This process is repeated B times, where B ≫ n, and leads to a bootstrap sampling distribution of the SD*. The CI of this ordered bootstrap sampling distribution of SD*,o approximates the CI for the true sampling distribution of SD(n). The BCa method is used to obtain the upper and lower limits of the CI.
The specific equations for calculating the BCa limits for the SD are obtained by substituting SD into Eqs. 9–14 leading to Eqs. 15–21.
$$z_{{0,{\text{SD}}}} = \Phi^{ - 1} \left( {\mathop \sum \limits_{j = 1}^{B} f\left( {SD_{j}^{*} ,SD^{\left( n \right)} } \right)/B} \right)$$
(15)
$$acc_{\text{SD}} = \frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {\overline{SD}_{\left( \cdot \right)} - SD_{ - i} } \right)^{3} }}{{6\left[ {\mathop \sum \nolimits_{i = 1}^{n} \left( {\overline{SD}_{\left( \cdot \right)} - SD_{ - i} } \right)^{2} } \right]^{1.5} }}$$
(16)
$$SD_{ - i} = \sqrt {\frac{{\mathop \sum \nolimits_{k = 1}^{i - 1} \left( {TET_{k} - MT_{ - i} } \right)^{2} + \mathop \sum \nolimits_{k = i + 1}^{n} \left( {TET_{k} - MT_{ - i} } \right)^{2} }}{n - 2}}$$
(17)
$$MT_{ - i} = \frac{{\mathop \sum \nolimits_{l = 1}^{i - 1} TET_{l} + \mathop \sum \nolimits_{l = i + 1}^{n} TET_{l} }}{n - 1}$$
(18)
$$\overline{SD}_{\left( \cdot \right)} = \frac{{\mathop \sum \nolimits_{i = 1}^{n} SD_{ - i} }}{n}$$
(19)
$$b_{{{\text{l}},{\text{SD}}}} = \left \lfloor {\left({B + 1} \right)\acute{p} \left({{\Phi}\left({z_{{0,{\text{SD}}}} + \frac{{z_{{0,{\text{SD}}}} +\Phi^{- 1} \left({\frac{\alpha}{2}} \right)}}{{1 - acc_{\text{SD}} \times \left({z_{0,SD} +\Phi^{- 1} \left({\frac{\alpha}{2}} \right)} \right)}}} \right),n} \right)}\right \rfloor$$
(20)
$$b_{{{\text{u}},{\text{SD}}}} = \left \lceil {\left({B + 1} \right)\acute{p} \left({{\Phi}\left({z_{{0,{\text{SD}}}} + \frac{{z_{{0,{\text{SD}}}} +\Phi^{- 1} \left(1-{\frac{\alpha}{2}} \right)}}{{1 - acc_{\text{SD}} \times \left({z_{0,SD} +\Phi^{- 1} \left(1-{\frac{\alpha}{2}} \right)} \right)}}} \right),n} \right)}\right \rceil$$
(21)
The CISD is [\(SD_{{b_{{{\text{l}},{\text{SD}}}} }}^{*,o}\), \(SD_{{b_{{{\text{u}},{\text{SD}}}} }}^{*,o}\)] where the bootstrap index bl,SD is given by Eq. 20 and bu,SD is given by Eq. 21.
Functional Analysis
The final area of mathematics used in this paper to define CIs for the AC is functional analysis, a branch of mathematics used to compare vectors or times series data. An egress curve is a vector of agent egress times. Unlike a scalar quantity such as the TET where the difference between two TETs is merely a difference in magnitude, it is less obvious how to express the difference between vectors. The difference between the curves can be expressed using a set of FAMs.
The FAMs compare one curve (a) against another curve (b), using different criteria, that returns a scaler value that meaningfully represents the similarity (or difference) between the two curves. The egress curve a = {a1, ak,…., am}, where ak is the time of the kth agent to exit and am is the exit time of the last (mth) agent to exit; egress curve b is similarly defined. The three FAMs used here are the Euclidean Relative Distance (ERD), the Euclidean Projection Coefficient (EPC), and the Secant Cosine (SC). These FAMs have been previously described in fire [30] and evacuation contexts [16, 17, 19, 29] so only concise details, suitable for egress curves, are given here.
The ERD (Eq. 22) represents the “relative distance” between two curves and will be zero when the curves are identical and greater than zero if the curves are different. ERD varies between zero and infinity with values nearer to zero implying a closer “distance” between the curves. In the appendix it is shown that the ERD of two egress curves can be compared to normalised absolute difference (NAD), i.e. |TETa − TETb| ÷ TETb, between two TETs of those egress curves. If the ERD is greater than the NAD, then it indicates there is more relative difference in the egress curves compared to the TETs; this suggests there may be more variability in an earlier phase of the evacuation. If the ERD is less than the NAD, then there is less relative difference in the curve compared to the TETs; this suggests that there may be more variability at the end of the evacuation.
$$ERD\left( {{\mathbf{\text{a}}},{\mathbf{\text{b}}}} \right) = \sqrt {\frac{{\mathop \sum \nolimits_{k = 1}^{m} \left( {a_{k} - b_{k} } \right)^{2} }}{{\mathop \sum \nolimits_{k = 1}^{m} b_{k}^{2} }}}$$
(22)
The EPC (Eq. 23) is the value needed to project one curve onto another curve. This would be one when the curves can be exactly “projected” on each other, which will be the case when the curves are the same and varies about one when not exactly projected. EPC varies between zero and infinity, assuming ak ≥ 0 and bk ≥ 0 \(\forall k\), with values nearer to one implying a closer “projection” similarity between the curves.
$$EPC\left( {\mathbf{{\text{a}}},\mathbf{{\text{b}}}} \right) = \frac{{\mathop \sum \nolimits_{k = 1}^{m} a_{k} b_{k} }}{{\mathop \sum \nolimits_{k = 1}^{m} b_{k}^{2} }}$$
(23)
The SC (Eq. 24, where Δxk−s= xk− xk−s and s is the step-size ≥ 1) compares the “shape” of two curves. The step-size s is used to vary the smoothing of the curve, where a step size of one implies no smoothing and the smoothing effect increases as s increases. SC equates to one when the curves have the same “shape”, which will be the case when the curves are the same. SC varies between zero and one when the egress curves have different “shapes” with values nearer to one implying a closer similarity in shape. Egress curves monotonically increase, thus Δak−s ≥ 0 and Δbk−s ≥ 0 \(\forall k\), implying that SC(a, b) ≥ 0. The Cauchy–Schwarz [42] inequality (Eq. 25) implies that SC(a, b) ≤ 1.
$$SC\left( {{\mathbf{\text{a}}},\mathbf{{\text{b}}}} \right) = \frac{{\mathop \sum \nolimits_{k = 1 + s}^{m} \Delta a_{k - s} \Delta b_{k - s} }}{{\sqrt {\mathop \sum \nolimits_{k = 1 + s}^{m} \left( {\Delta a_{i - s} } \right)^{2} \mathop \sum \nolimits_{k = 1 + s}^{m} \left( {\Delta b_{k - s} } \right)^{2} } }}$$
(24)
$$\left( {\mathop \sum \limits_{k = 1 + s}^{m} \Delta a_{k - s} \Delta b_{k - s} } \right)^{2} \le \mathop \sum \limits_{k = 1 + s}^{m} \left( {\Delta a_{k - s} } \right)^{2} \mathop \sum \limits_{k = 1 + s}^{m} \left( {\Delta b_{k - s} } \right)^{2}$$
(25)