## 5 Methods and Models
### Mine Warning Index (MWI) and Ambient Intelligence  
The MWI is dependent on gas concentrations, temperature and humidity. Generally, the combined effect of temperature and humidity on the human body is given by the _Heat Index (HI)_, as in Equation (1) [35]. \[ \begin{array}{l}HI=-42.379+(2.04901523\times T)+(10.14333127\times rh)-(0.22 475541\times T\times rh)-\\ (6.83783\times 10^{-3}\times T^{2})-(5.481717\times 10^{-2}\times rh^{2})+(1.22 874\times 10^{-3}\times T^{2}\times rh)+\\ (8.5282\times 10^{-4}\times T\times rh^{2})-(1.99\times 10^{-6}\times T^{2} \times rh^{2})\end{array}  \tag{1}\]  
Here, \(T\) is the temperature in \({}^{\circ}F\) and \(rh\) is the relative humidity. _HI_ has four categorical stages of \"caution, extreme caution, danger and extreme danger\" with values of <90, 90\(-\)103, 103\(-\)124, and 124\(-\)137, respectively. In this study, we ignored the extreme -danger condition to match three stages of _HI_ with the three states of the proposed system. As _HI_ is mainly associated with a worker's comfort, we assumed that workers would evacuate the mine before the system approaches the second threshold limit. Moreover, a single parameter of _MWI_ was introduced based on the combined effect of gas concentration and _HI_ on the human body. _MWI_ is helpful for the pre-evaluation of mine conditions and enables easy information sharing. This system for the determination of _MWI_ utilizes aggregated data from all the sensors nodes. _MWI_ is given as  
\[MWI=\frac{\sqrt[n]{(G_{1}\times G_{2}\ldots\times G_{n})}\times HI}{1000} \tag{2}\]  
where \(n\) is the number of toxic gases being monitored by a particular system and _G\({}_{1}\)_, _G\({}_{2}\)_ and _G\({}_{n}\)_ are the gas concentrations. The nominator is to define the in-scale limits of _MWI_, it can vary from case to case depending upon the number of gases to be monitored by the system. Previous knowledge, experience, and established standards are always of extreme importance for developing intelligent systems because they provide threshold limit values. The normal and threshold limit values of gases and _HI_ in the _MWI_ for warning (yellow) and alarming (red) conditions are summarized in Table 3. These threshold limit values have been chosen from [6; 36]. As the mining industry of Pakistan follows the Mine Act of 1923 revised in 1926. These threshold limit values are under the limits defined by the Mine Act, 1926 Section 121 in the Ref. [37]. Statistical models of the average, mode, median, skewness, and standard deviation enable the intelligent detection of suspect data and provide easy scalability of multidimensional data. Also, these models are compared at different locations in the mine to determine the correlations of various parameters and their dependencies. The statistical models used in our method are given in Equations (3)-(6). \[Average(\overline{x}_{t})=(1/n)\sum_{i=1}^{n}x_{i} \tag{3}\]  
\[SD_{t}=\sqrt{(1/n-1)\times\sum_{i=1}^{n}(x-\overline{x})^{2}} \tag{4}\]  
\[S_{t}=(\sum_{i=1}^{n}(x-\overline{x}))^{3}/(n-1)s^{3} \tag{5}\]  
The generalized form of the normal distribution is given by  
\[f\Big{(}x|u,\;\sigma^{2}\Big{)}=\bigg{(}\frac{1}{\sqrt{2\pi\sigma^{2}}}\bigg{)} e^{-\frac{(x-u)^{2}}{2\sigma^{2}}} \tag{6}\]  
While monitoring is in progress, the change in concentration of gases alters the statistical model values. The disturbed symmetry around the mean value (normal distribution) can be easily observed as a result of a change in the value of a statistical model [38]. A disturbance in the symmetry is associated with the skewness of the model. If the skewness is >0 or <0, the distribution is on both sides,