Developing THMs’ Predictive Models in Two Water Supply Systems in Greece

: Disinfection is a very signiﬁcant water treatment process for drinking water safety, as it inactivates pathogens from drinking water. However, disinfection-by-products (DBPs) are formed which are accused of contributing to cancer and reproductive / developmental e ﬀ ects. Research has provided many predictive models for the formation of DBPs based on various water quality parameters and following di ﬀ erent methodologies. The present study aims at developing predictive models for the formation of DBPs in two drinking water supply systems in Greece. Data from the water supply systems are used. A statistical analysis took place to identify the predictive models for the formation of Total trihalomethanes (TTHMs). The results showed that some of the developed models are more reliable than others. However, further study is necessary in order to obtain more data on variables that are a ﬀ ecting trihalomethanes (THMs) formation. Such models can be used mainly locally.


Introduction
Water is essential for life and therefore its safety is of paramount importance. Drinking water distribution networks (WDNs) supplying water to the consumers are extremely complex systems, comprised of hundreds of kilometers of pipes, storage tanks, pumps, valves, and other important assets for the operation of the WDN. It is well known that water quality deteriorates as water travels within the WDN, from the water intake to the tanks, the distribution systems and finally the consumers' taps. Physical, chemical, and biological risks are identified in WDNs. Several outbreaks connected to water quality have been recorded all over the world due to biological and chemical factors. Microbial load exists in natural water coming from surface or groundwater sources, but it can also be present under normal operating conditions, natural disasters, and malicious threats [1]. Natural disasters such as extreme weather phenomena (floods) or earthquakes might cause several kinds of damage to WDNs and may result in the entrance of micro-organisms at several parts of the network. Malicious threats might include terrorism attacks using biological or chemical compounds that may cause adverse effects to the health of water consumers. Even under normal operating conditions it is possible that contaminants might enter the network, after a scheduled or non-scheduled maintenance or even during normal operations (e.g., due to leaking pipes allowing substances from the ground to enter the network) [1]. As sometimes sewerage networks are located above water supply pipes, possible leakages in both systems might be the cause of water contamination. Trying to manage and reduce water losses in WDNs, pressure management among other measures is used. In these cases, as water pressure is reduced within the network, the water age (being the time water remains within the network) increases, especially at dead-ends of the network. Increased water age means that water quality deteriorates [1].
An important measure taken to reduce the risk of contaminated drinking water by micro-organisms is disinfection. Disinfection is a crucial water treatment method as it ensures that water is free of control DBPs and minimize consumers' exposure. The maximum acceptable contaminant level set by U.S. EPA for total THMs (that is total concentration of all four THMs) is 0.08 mg/L, while this level set by WHO is 0.2 mg/L for chloroform, 0.1 mg/L for each dibromochloromethane and bromoform and 0.06 mg/L for bromodichloromethane. European Union guidelines set acceptable total THM concentration to 0.1 mg/L. The new updated European Directive for drinking water did not change the maximum acceptable THM concentration but encourage water utilities to pursue lower concentrations without affecting disinfection. In Greece, the maximum acceptable level of total THMs is set by the Joint Ministerial Decision (Y2/2600/2001) to 0.1 mg/L, complying with the EU Drinking Water Directive 98/83/EC.

DBP Predictive Models-A Review
The development of statistical models for DBPs is increasingly recognized as a methodological basis to predict the formation of DBPs. Such models are helpful to the water utility managers during decision making, for example, setting disinfectant dose, contact time, adjustment of pH, etc., in order to reduce the formation of DBPs and at the same time maintain the required disinfectant residual [5]. These models can also be used to identify the optimal locations for boosters in order to maintain the required levels of disinfectant residuals and reducing the DBPs' formation. Optimal water sampling points can be identified for water quality control using such models.
The levels of THMs in chlorinated water are associated with chlorine demand, pH, temperature and seasonal variability, chlorine contact time and organic materials or chemical elements [11][12][13][14][15] ( Table 1). It is found in the literature that pH and temperature are proportional to THMs formation, but pH effects vary for different DBPs [8]. As micro-organisms increase as temperatures increases, higher disinfectant dose is applied during the summer period, resulting in high DBP concentrations. The conditions affecting the disinfection efficiency and the requirements to maintain disinfectant residuals simultaneously affect DBP formation (vicious cycle). Several studies [16] showed that THM concentrations are higher within the WDN compared to the storage tank. This is also due to the existence of organic matter in the biofilms located in the water pipes' walls. Organic matter in water is another parameter affecting proportionally DBP formation (Table 1). Table 1. Disinfection-by-products (DBPs) predictive models' parameters (based on [8] The first models for chlorinated DBPs appeared in 1983 [17] predicting the formation of total THMs, while the first models for other DBPs appeared in 1994 [18]. DBP predictive models are data-driven statistical models or process-based ones. The first models are based on empirical relationships between dependent and independent variables [19]. On the other hand, process-based models are mainly based on the assumed knowledge of the actual processes taking place in the water supply system [19]. Many studies are elaborated using data-driven statistical models as there are cases where parameter estimation within a process-based model is imprecise or difficult to obtain [20] or where the data required for the development of process-based models are not available [19]. Using such models, the researchers do not have to know the laws of chemistry and mathematics for the formation of DBPs in advance [19,21]. However, the factors affecting formation of chlorine decay should be known in advance. As data availability becomes stronger, statistical techniques are used more and more, using as much as possible the data already available. Many researchers have proposed several empirical models for DBP formation [8,[22][23][24][25]. Most of these models are functions of many parameters derived from linear and non-linear multi-regression analysis. The parameters taken into consideration in these models include: total organic carbon (TOC), ultraviolet light absorbance at 254 nm (UV254), temperature, chlorine dosage, bromide concentration, reaction time, and chlorination pH [8,22,[26][27][28][29]. Most of the models developed in various studies are site-specific and cannot be used widely, as conditions vary. Models have been developed based on laboratory studies or real field data or both. Field studies compared to laboratory ones take into consideration the effects of the distribution system on residual disinfectant concentration and DBP formation as they measure or observe human exposure [8]. Another difference is that contact time, which can be easily estimated in laboratory studies, needs tracer studies or hydraulic simulation models in field studies. Prediction models are based on empirical relationships or kinetics involved during chlorination.
A few studies have been elaborated in Greece for the water supply network of Athens [30], for water from water treatment plants in Athens [31,32] and for river waters on the island of Lesvos [29,33].

Case Studies-THM Formation Models
This paper presents predictive models developed for WDNs of two cities in Greece. The water utility in city A supplies about 150,000 people, while the water utility in city B supplies about 55,000 people. The data are gathered from samplings that the water utilities elaborated, as this is their obligation according to the institutional framework. Depending on the water volume produced, the water utility has the obligation to elaborate water samplings and analysis of chemical and biological parameters. The water utilities investigate check monitoring and audit monitoring for the water they abstract and supply to the consumers. The sampling frequency depends on the water volume taken from the water source and the number of consumers supplied with water. For both cities, the data provided include both check and audit monitoring parameters (THM concentration is measured in audit monitoring). However, audit monitoring is done less frequently. In city A, samplings are taken from all over the water supply network including consumers' taps, while in city B only from the tanks after water intake. Both cities use groundwater sources to supply their consumers. Chlorination is performed in water tanks in both cases.

General Data
The data gathered and used in the analysis from the WDN of city A include pH, temperature (T), residual chlorine (mg/L Cl 2 ), conductivity (µS/cm), turbidity (NTU) and Total THMs (TTHMs in µg/L). The data refer to a period of six years (2013-2018) and samples are taken from various points of the networks including tanks and final consumers. Temperature values range from 13 to 30 • C and TTHMs values range from 0.39 to 22.84 µg/L, lower than the maximum allowable level.
For city B, the data gathered from the WDN include pH, total organic carbon concentration (TOC) (mg/L), conductivity (µS/cm), residual chlorine (mg/L), turbidity (NTU), total THMs (µg/L) and the concentrations of the four THMs (chloroform-CM, bromoform-BM, bromodichloromethane-DCBM and dibromochloromethane-DBCM) in µg/L. Data are gathered from 27 different water boreholes for a period of five years (2014)(2015)(2016)(2017)(2018). TOC values range from 0.01 to 39.5 mg/L and TTHMs range from 0.48 to 68.35 µg/L, lower than the threshold. Both cities are supplied with water abstracted from boreholes and this is why organic substances are not present in high concentrations in water. Table 2 presents the total number of values (N), average (AV), standard deviation (SD), minimum (MIN) and maximum (MAX) values of the parameters studied.

Statistical Analysis
The dependent variables (TTHM concentrations) were tested for normality using the Kolmogorov-Smirnov (K-S) test to check the goodness-of-fit to the normal distribution [34]. The results of the K-S tests for the estimation of goodness-of-fit of the dependent variables of the model to the normal distribution showed that all dependent variables followed the normal distribution at significance level 0.05 except for after ln-transformation steps [33] (Table 3). Independent variables were also tested for normality using K-S test. For city A, pH, turbidity and conductivity follow normal distribution at significance level 0.01 (Table 3). For city B, turbidity and TOC do not follow normal distribution at 0.05 significance level. Thus, log-transformation for turbidity took place (Table 3). Regarding TOC another transformation took place using the tool available from Minitab software. It was found that (TOC) −0.1 follows normal distribution at significance level 0.05. The relationships between the variables were examined by Pearson correlation matrix. For city A, the results of Pearson correlation matrix (Table 4) show a moderate negative correlation between TTHMs and conductivity (r = −0.406) and a moderate correlation between TTHMs and residual chlorine (r = 0.266). The results for city B show a moderate positive correlation between TTHMs and turbidity (r = 0.553) and a moderate correlation between TTHMs and water pH (r = 0.465). Several studies have reported a linear relationship between TTHMs and pH [8]. Other variables show a low correlation to TTHMs (Table 4).

Multiple Regression Analysis
To perform a linear regression, the TTHM concentration (Y) is assumed to be a linear function of the inputs, X. The unknown parameters to be determined, a i, are the coefficients, as given in (1): where n is the number of inputs used. The coefficients are chosen to minimize the sum of the squared differences between the predicted and actual values of Y. Multiple regression analysis is used to evaluate the statistically significant variables at a level of significance α.

Model Development
Based on the data, multiple regression analysis was applied at significance level α, which was 0.1 for WDN A and 0.05 for WDN B. Throughout the process of model development, several linear and non-linear regression analyses were performed. The inclusion of each variable in the proposed model was based on the t-criterion [29,35]. Methodological details about the model development are extensively discussed in past studies [25,29,31,36,37]. Multiple regression analysis tool from Minitab was used.
For the WDN A, all variables are initially used as independent variables (inputs). As the independent variables are not statistically significant (p > 0.1), they are excluded one-by-one from the model development process. Finally, only residual chlorine (RedChl) is found to be statistically significant (p < 0.1) (Table 5). Finally, the developed model is:  Table 5.
As the above model is not very effective at predicting TTHMs, another attempt was made for the model development. In this attempt the independent variable residual chlorine is log-transformed. Again, this is the only independent variable found to be statistically significant (p < 0.1) after eliminating the other variables one-by-one from the model ( Table 5). The new model is: For this model, all statistical analysis data are given in Table 5. The value of R 2 is 9.13% which is still very low but is slightly higher than the model's (3) R 2 value.
The same methodology is used for the WDN B. Several linear and non-linear regression analyses were performed. All variables are found not to be statistically significant (p > 0.05) except for pH and (TOC) −0.1 . After eliminating the other independent variables one-by-one, pH and (TOC) −0.1 are found to be statistically significant (p < 0.05). The model developed for WDN B is: The value of R 2 for this model is 46.90% which is moderate and shows that the model can be used ( Table 5).
Instead of ln-transformation, log-transformation is used alternatively for TTHMs as normality hypothesis is valid. In this attempt logTTHMs is used as dependent variable and logpH and (TOC) −0.1 as independent variables, as they are found to be statistically significant (p < 0.05) ( Table 5). The predictive model for TTHMs is the following: For this model R 2 value is 46.34% which is moderate and slightly lower than that of model (4) ( Table 5).
For the models developed, Durbin Watson estimate, provided in Table 5, is used in order to check autocorrelation. The values of the Durbin-Watson statistic were found to be 1.19478 and 1.23129 for models 2 and 3, respectively, and 2.14728 and 2.14778 for models 4 and 5, respectively. The analysis showed that there is no autocorrelation.
ANOVA tests are elaborated. Statistical examination showed that the residuals of the models follow the normal distribution [38], and the mean value of the residuals should be zero. The residuals should be evenly attributed above and below zero, otherwise a calculation error should be suspected or an additional variable should be added to the regression model [34]. Figures 1-4 are provided for all four models. In all cases the analysis showed that the residuals are approaching normal distribution and the models are deemed valid to describe the experimental data.

Predicted and Observed Values Comparison
The developed models are used for the validation of the results. A comparison between predicted and observed values for all proposed models is presented in Figure 5a,b and Figure 6a,b. For WDN A, it can be observed that the models do not provide a satisfactory estimation of the THM concentrations formed. For the model (2), only 17% of the predicted values range in the ±20% of observed values, while for model (3), the percentage of the predicted values ranging in the ±20% of observed values is 14.6%. The regression coefficients (R 2 ) range from 0.0525 to 0.0774 (Figure 5a,b), which is not a satisfactory level of explanation of the observed variability. ANOVA tests are elaborated. Statistical examination showed that the residuals of the models follow the normal distribution [38], and the mean value of the residuals should be zero. The residuals should be evenly attributed above and below zero, otherwise a calculation error should be suspected or an additional variable should be added to the regression model [34]. Figures 1-4 are provided for all four models. In all cases the analysis showed that the residuals are approaching normal distribution and the models are deemed valid to describe the experimental data.

Predicted and Observed Values Comparison
The developed models are used for the validation of the results. A comparison between predicted and observed values for all proposed models is presented in Figures 5a and b, and Figure  6a   5a and b), which is not a satisfactory level of explanation of the observed variability.
For the WDN B, the models provide a more satisfactory estimation of the TTHM concentrations formed. The percentage of observed values laying within ±20% of predicted values is 20.3% for both models (4) and (5). The regression coefficients (R 2 ) range from 0.5673 to 0.5809 (Figures 6a and b), which is a satisfactory level of explanation of the observed variability and can be compared to results reported in previous studies [29,31]. However, in other studies the regression coefficients are found to be much higher [25]. Performance evaluation was then used to test the accuracy of each calibrated model, which included the Mean Absolute Error (MAE), the Mean Square Error of Prediction (MSEP) and the maximum absolute error (MAX) produced by a prediction from the model. MAE is a measure of error expressed as the average of the absolute errors (difference between predicted and observed values). MSEP is defined as the average square difference between independent observation and prediction from the fitted equation for the corresponding values of the independent variable [38]. MAX is the maximum absolute value of error and it is used as it gives an indication of the worst-case prediction made by the model. MAE values for models (2) and (3)  For the WDN B, the models provide a more satisfactory estimation of the TTHM concentrations formed. The percentage of observed values laying within ±20% of predicted values is 20.3% for both models (4) and (5). The regression coefficients (R 2 ) range from 0.5673 to 0.5809 (Figure 6a,b), which is a satisfactory level of explanation of the observed variability and can be compared to results reported in previous studies [29,31]. However, in other studies the regression coefficients are found to be much higher [25].
Performance evaluation was then used to test the accuracy of each calibrated model, which included the Mean Absolute Error (MAE), the Mean Square Error of Prediction (MSEP) and the maximum absolute error (MAX) produced by a prediction from the model. MAE is a measure of error expressed as the average of the absolute errors (difference between predicted and observed values). MSEP is defined as the average square difference between independent observation and prediction from the fitted equation for the corresponding values of the independent variable [38]. MAX is the maximum absolute value of error and it is used as it gives an indication of the worst-case prediction made by the model. MAE values for models (2) and (3) (Figure 7b). The error indicators show slightly better (lower) values for model 4, but the difference is small. According to Gibbs et al. [19], when comparing the prediction accuracy between two models the MSEP was considered the best indicator, as this error measurement penalizes larger prediction errors more harshly than the MAE.  (4) and (5).
Performance evaluation was then used to test the accuracy of each calibrated model, which included the Mean Absolute Error (MAE), the Mean Square Error of Prediction (MSEP) and the maximum absolute error (MAX) produced by a prediction from the model. MAE is a measure of error expressed as the average of the absolute errors (difference between predicted and observed values). MSEP is defined as the average square difference between independent observation and prediction from the fitted equation for the corresponding values of the independent variable [38]. MAX is the maximum absolute value of error and it is used as it gives an indication of the worst-case prediction made by the model. MAE values for models (2) and (3) [19], when comparing the prediction accuracy between two models the MSEP was considered the best indicator, as this error measurement penalizes larger prediction errors more harshly than the MAE.
Based on the analysis elaborated in this paper, the models developed for the WDN of city A are not reliable, as they fail to predict TTHM values accurately and cannot be used for the prediction of TTHMs in the network. A reason for this is that a full set of data with frequent measurements was not available from the water utility, as the water sampling frequency to detect TTHMs is very low. Another reason is that not all variables affecting the formation of TTHMs are measured and thus used in the model. As the variables monitored are set by legislation, the water utilities do not monitor other  (4) and (5).
Based on the analysis elaborated in this paper, the models developed for the WDN of city A are not reliable, as they fail to predict TTHM values accurately and cannot be used for the prediction of TTHMs in the network. A reason for this is that a full set of data with frequent measurements was not available from the water utility, as the water sampling frequency to detect TTHMs is very low. Another reason is that not all variables affecting the formation of TTHMs are measured and thus used in the model. As the variables monitored are set by legislation, the water utilities do not monitor other water quality variables. So, in order to develop reliable models for the prediction of TTHMs, enough data from the variables affecting TTHM formation is necessary.
The models developed for city B are more reliable as more data are available compared to city A. In this case also, the variables used are not all those affecting the formation of TTHMs and used in other models, as their measurements are not available from the water utility. It can be concluded from the analysis elaborated that the model (4) is more reliable and it can be used to predict the formation of TTHMs in the WDN of city B, if the variables' values are within the limits shown in Table 2. The models developed in these cases refer to water utilities using groundwater where, usually, organic matter is not present compared to surface water. Although organic matter needs to be present to form THMs, there are indications showing that THMs are formed even when groundwater is used. In the present cases, both WDNs use groundwater sources. However, from the data and the analysis, it is obvious that THMs are formed in low concentrations, probably because of the existence of organic matter which is present in this case. It is known that other factors such as the biofilm in the pipes' walls react with chlorine forming THMs. Comparing the models developed in this study with the models developed in other studies, it can be concluded that as pH values increase TTHM concentrations increase. However, there are models in the literature where pH effects on TTHM formation vary [8]. TOC increase results in increased TTHM concentrations in the present study, which is the case in other studies too [8]. However, other explanatory variables such as disinfectant dose, reaction time and others are not available in this study. The availability of reliable data is indicated by many studies as the factor motivating the choice of the explanatory variables. In the present study it must be noted that the model is site-specific and cannot be used extensively.

Conclusions
The paper presents an attempt to develop TTHM prediction models in two different WDNs in Greece. The paper aims at: (a) Investigating the formation of THMs during chlorination of groundwaters taking into consideration the available variables. The effect of pH, and TOC was studied.
(b) Developing predictive models for the concentrations of total THMs formed during chlorination of these groundwaters. Modeling of THM formation can be helpful for the minimization of their formation during water treatment, and therefore to comply with legislative measures and to protect human health.
(c) Statistically evaluating the developed models (correlation coefficient, Durbin-Watson estimate), in comparison to the models developed during previous studies for THMs [25,29,31,36] using the same modeling technique (multiple regression).
The study's results showed that the first two models developed for WDN A are not reliable and cannot be used for the prediction of TTHMs. Reasons for this include the lack of sufficient data and lack of data for explanatory variables affecting the formation of TTHMs. As groundwater is used, it is possible that the formation of TTHMs is affected by other factors, such as the pipes' biofilms existing in the water distribution pipes' network. The results showed that the models developed for WDN of city B can be used for the prediction of TTHMs, and more specifically model (4). However, as the models are not very reliable, further study should be conducted, including a larger dataset of the variables studied in this study and also explanatory variables such as disinfectant dose, retention time, temperature and variables indicating organic matter presence (such as chlorophyll a, dissolved organic carbon, etc.). Finally, as all samplings were done in autumn, it is suggested that seasonal variation should be taken into consideration elaborating more samplings all over the year, to study the effect of the season on the formation of TTHMs, which is found to be related in other studies [31].
Finally, it must be noted that the complexity of DBP formation reactions makes it difficult to develop universally applicable models. However, the existence of such models in regions and WDNs with the same characteristics could be useful, as they provide sufficient estimations of DBP concentrations that could minimize the need for complicated and expensive analysis of such compounds. DBP statistical models' development is a useful methodological basis to predict the formation of DBPs. Such models are helpful to the water utility managers during decision making, for example, setting disinfectant dose, the contact time, adjustment of pH, etc., in order to reduce DBP formation and at the same time maintain the required disinfectant residual. Prediction models can be used as a tool to select location for boosting chlorination residual levels to ensure complete removal of microbes and as well as minimization of DBP formation. The combination of DBP models with residual disinfectant models allow water utility managers to select the sampling points for water quality control within the distribution system [8]. Such models are used as the basis for epidemiological studies and health risk assessment [8].