Assessment the Quality of Bottled Drinking Water Through Mamdani Fuzzy Water Quality Index

In this investigation, an innovative index was developed based on the fuzzy inference system for assessing the quality of bottled drinking waters. A method was developed to aggregate the values obtained from the defuzzification step. A total number of 24 quality parameters revealing the characteristics of bottled were in terms of physiochemical, dietary, toxic, and pathogenic aspects were selected as the input parameters. 30 samples were taken from the independent brands found in the Hamadan province retail market to evaluate the bottled water quality index (BWQI). Results show that the values obtained from measuring the parameters are in the range of the standard levels set by national regulations. The BWQI scores obtained from samples were in the range of 61.2-73.8 attributing to the marginal and fair descriptive classes. The drinking bottled water samples had better scores because of low contents of NO3, NO2, Fe, Mn, Cu, and Zn that are subjugated public distribution systems having the severe standards on urban water treatment plants for in case safe water. The mineral bottled water samples examination indicated that they are generally affected by the mineral contents of sedimentary rocks and NO3 leaks from fertilizers used in the agricultural doings and also they do not elaborate the rigorous scrutiny system alike those donned in the public water distribution systems. Sensitivity analysis using the Monte Carlo algorithm reveals that the parameters NO3, Na, hardness, and NO2 have the most impact on the BWQI scores.


Introduction
The worldwide increasingly consumption of bottled waters during current years is mainly due to the reasons such as low-price, availability, supposed better quality than piped water, consumer higher social status indication (mainly in high price brands), and the prevalent idea that the bottled waters contain fewer contaminants (Felipe-Sotelo et al. 2015;Ahmed et al. 2016). Accordingly, the global bottled water market is viewed as the quickest expanding section of the non-alcoholic beverage sector (Rahman et al. 2017).
Although, bottled water consumption has increased, so far the water quality index not specified for bottled water (Espejo-Herrera et al. 2013a, b). Water quality indices (WQIs) are now widely used to support decision-makers in terms of water quality management (Hounslow 2018). WQIs comprise different water quality parameters into one output indicator representing the easily and quickly recognized scores (UNEP 2007;Council 2012).
As denoted above, most WQIs have served as tools to monitor the quality of surface water, groundwater, and piped drinking water sources. Only a few studies are taking into account appropriate technical approaches to introduce a quality index for bottled waters (Toma et al. 2013;Tsakiris et al. 2017). The prominent studies among the former attempts to develop a water quality index are the works of Horton (Horton 1965) and Walski (Walski and Parker 1974). They developed indices to evaluate surface water sources, mainly rivers, using the input parameters temperature, nutrients, suspended solids, turbidity, coliform bacteria, dissolved oxygen, color, pH, grease, odor, and toxic. The Walski's index was based on a geometric mean of transformed values regarding the input parameters through a range of zero to one (Uusitalo et al. 2015). The most common WQI was developed by the National Sanitation Foundation (NSF) (Ott 1978). Afterward, numerous modified water quality indices have been developed according to the NSF approach (Mukhopadhay et al. 2009;Khazaei et al. 2013;Fard et al. 2014;Nabizadeh et al. 2018).
However, some problems arise when these traditional indices are used. The main problem is reflecting the same effects on the output index score from the input values having different distances from a borderline (Icaga 2007). Consequently, in terms of making decisions about boundary values, the uncertain distinction between each mode of the index can occur that involved a vagueness nature in the output index (Chang et al. 2001). Furthermore, the uncertainty characteristics of environmental issues cannot be considered in the traditional WQIs (Gharibi et al. 2012a).
The computational methods according to artificial intelligence (AI) have been applied increasingly in the environmental issues during the recent decade, mainly because of the tremendous development in the computational techniques and the availability of powerful software tools (Gharibi et al. 2012b;Tiri et al. 2018;Nayak et al. 2020;Oladipo et al. 2021). Fuzzy logic is one of the most effective tools of AI that was first introduced by Zadeh (1965). Indices developed based on fuzzy logic is believed to have the ability to indicate human thoughts and processing the qualitative uncertain values expressed through the linguistic terms (Yekta et al. 2015;Nabizadeh et al. 2018).
In this work, we aim to introduce an innovative index for assessing bottled water quality. The fuzzy inference system based on the Mamdani model is served as a mathematical framework to develop the index. During the study period, all bottled water brands found in the Hamadan province markets were sampled and analyzed to determine the water quality parameters and test the introduced indices.

Study Area
Hamadan province is located in the western part of Iran, having a population of over 1.7 million (Gitau et al. 2016) and an area of 20200 km 2 (Fig. 1). Over 96.64% of drinking water consumption is provided using a public water distribution system (Abtahi et al. 2016).
Besides the piped drinking water, the population is also served by the bottled water distribution system. Based on the information obtained from the national bottled water association (NBWA), there are 110 active bottled water production companies in Iran (IBWA 2018). Among them, 30 different bottled water brands were distributed in the Hamadan province market during the study period from September 2018 through March 2019. As represented in Tables 1 and 3 brands are produced in the province and 27 others are imported from the other provinces. Furthermore, 12 brands from mineral and the remaining 18 brands are drinking grade. According to the privacy considerations, the name of brands was not mentioned in the results, instead, the samples were denoted by numbers. Figure 1 also shows the approximate locations of the bottled water manufacturers all around the country.

Parameters Measuring and Instrumentation
Samples were collected from retails of Hamadan province. Two 0.5 L bottles were purchased per each brand. Samples then were transferred to the laboratory and the values of nitrate, pH, fluoride, hardness, calcium, magnesium, sodium, chloride, sulfate, nitrite, turbidity, coliforms, and toxic metals were measured according to the Standard Methods (American Public Health Association 1995). Metals, including iron, manganese, lead, mercury, cadmium, arsenic, barium, potassium zinc, and cobalt were measured using a Spectro Arcos ICP-optical emission spectrometer (SPEC-TRO Analytical Instruments, Kleve, Germany) based on radial plasma observation (Shakerkhatibi et al. 2019). The values of pH, turbidity, and the concentration of anions were determined according to their instruction mentioned in the Standard Methods (American Public Health Association 1995). Total and fecal coliforms were determined using multiple tube technique based on approaches developed by Standard Methods (American Public Health Association 1995).

Determining Bottled Water Indices
Water quality indices usually have five components consist of 1) Input parameters, 2) Weights of parameters, 3) A normalization method, 4) A framework to determine the index, and 5) A protocol for the index judgment.
Here, a brief approach to develop a bottled water quality index is presented.

Bottled Water Quality Index (BWQI)
Based on the following steps, in this work, the bottled water quality index (BWQI) is introduced:  (Khazaei et al. 2013;Fard et al. 2014;Abtahi et al. 2016). Therefore, parameters were classified into five categories as represented in Table 2. Accordingly, the minerals such as calcium, magnesium, and fluoride were added in the input parameters in terms of their dietary values recommended by national and international agencies (Organization 2005;Katz et al. 2009;Abtahi et al. 2016;Selvaraj et al. 2016;Khazaei et al. 2019). Physicochemical properties, pH, and turbidity are selected because of their role in the treatment processes, mainly in the disinfection process. Mercury, cadmium, lead, chromium, and arsenic were considered as toxic elements according to their carcinogenic and toxic risks (Bahmani and Palangi 2018). 2. A team comprising 10 multi-disciplinary decision-makers (DMs) determined the weights of parameters based on Analytical hierarchy process (AHP) weighting techniques. Then, weights obtained from the decision-makers were aggregated as follows where W p is the aggregated weight assigned to pth parameter, V l represents the weight determined for the lth decision-maker, and W pl is the weight proposed by lth DM for pth parameter. Table 3 presents the acquired weights assigned to each parameter.
3. Parameters have their scales for the report of their values such as mg/L, NTU, and MPN/100 mL so that the difference in the scale (or units) hinders them to be integrated and form a unique value. Accordingly, to develop an index representing all various input parameters, the values of parameters should primarily be developed into the unit free values. This process involves a mathematical basis and known as the normalization. The result of normalization is unit-less values obtained from the source values laid between 0 and 1. In this work, the fuzzy membership functions were applied to normalize the input values through the fuzzification process which receives the input variables considering the linguistic terms as represents in Table 3. Accordingly, Table 3 represents the categories of parameters according to those that have a desirable range and those without a desirable range. Furthermore, the linguistic terms, the fuzzy sets, and the original form of the parameters can be found in Table 3. Figure 2 shows triangular ( FS = (a 1 , a 2 , a 3 ) ) and trapezoidal ( FS = (a 1 , a 2 , a 3 , a 4 ) ) fuzzy sets (FS) used for the normalization process. (1)

Table 3
Description of the input variables according to nature (desirable, undesirable) and the assigned fuzzy sets Equations (2) and (3) are the algebraic forms of Fig. 2a, b, respectively.
where x is an input value of parameter j, (x) is a membership function of x, and a 1 through a 4 values are the components of the triangular or trapezoidal fuzzy set (FS). Figure 3a reveals how the fuzzification process works. As shown, each input value, x p produces two membership functions x p,i and x p,j , be owned by two adjacent fuzzy sets FS i and FS j , laid between 0 and 1.
4. The normalized values x p,i and x p,j are then mirrored on the Y-axis of the coordination system, representing in Fig. 3b, which were arranged for the defuzzification process.
(2) Mapping the values belonged to the input fuzzy sets FS i and FS j on the output fuzzy sets F S i andFS j can be achieved using the fuzzy inference rules. The fuzzy inference rules decide the belongingness of an input FS to a predetermined output F S . Fuzzy inference rules are the logic if-then instructions enacted by the multi-disciplinary decision-makers (DMs). The set of fuzzy inference rules applied to manage the logic relationships between input and output fuzzy numbers is known as the inference engine (IE). The inset of Fig. 3 presents the general forms of fuzzy inference rules. For instance, considering the parameter, turbidity, a logic inference rule is: if the turbidity is very low (VL), then, the turbidity sub-index is very good (VG). Here, the VL and VG are the linguistic terms to describe the input (FS) and output ( F S ) fuzzy sets, respectively.
Consequently, each input crisp parameter value, x p (e.g. x p can be a measured amount of turbidity as NTU in a bottled water sample) will produce two values y p,i and y p,j belonged to the adjacent fuzzy sets F S i andFS j , respectively, as illustrated in Fig. 3. Accordingly, a set of 972 rules were produced and applied based on the Mamdani inference method.
The values y p,i or y p,j can be defined as the mapped quantities on the X-axis of the defuzzification coordination system, which is attributed to the input x p after applying the inference rules. For triangular fuzzy sets, y p,i and y p,j can be obtained using the Eq. (4), respectively. Furthermore, y p,i and y p,j can be determined by applying Eq. (5), respectively in the case of trapezoidal fuzzy sets. where the a 1,i through a 4,i and the a 1,j through a 4,j are the values of triangular or trapezoidal fuzzy sets, FS i and FS j , respectively. (x p,i ) and (x p,j ) , as mentioned in step (3), are the membership functions produced from the input parameter value, xp.
To obtain the parameter sub-index, SI p , at first, the y p,i and y p,j should be integrated to form the resultant value, y p,r . The resultant value, y p,r can be obtained using several approaches known as defuzzification methods (Silvert 2000;Ross 2004;Ocampo-Duque et al. 2013). Here, we obtain a new approach to find y p,r from values y p,i and y p,j by using Eq. (6).
As observed, the magnitudes of y p,i and y p,j are adjusted by the amounts of (x p,i ) and (x p,j ) , respectively.
Then, regarding the nature of each parameter, the SI q p (sub-index of the parameter, p in BWQI) can be obtained as follows.
1. For the parameters comprise undesirable amounts at all levels, so that the zero value is the best (toxic metals, turbidity, nitrate, nitrite, coliforms), the SI q p is determined using Eq. (7).
2. For those have the desired values in a range of levels in such a way that lower than and above the range be considered as unacceptable values (pH, Fluoride, Calcium, Magnesium, Iron, Manganese, Zinc, Cobalt, Copper, and Hardness) the SI p is determined by applying Eq. (8).
The bottled water quality index (BWQI) can be determined using Eq. (9).
5. To introduce a facile and precise judgment on the water quality of bottled water samples, a straightforward protocol was designed according to the literature (UNEP 2007;DOE 2010;Mohebbi et al. 2013a) and comprises the descriptive terms and color chart as shown in Table 4.

Sensitivity Analysis
Sensitivity analysis aims to determine the influence of each input parameter, p on the BWQI score. To obtain the sensitivity level of the index regarding the input values, each parameter was withdrawn separately from the BWQI and the consequently reduced indices were compared with the original form. Uncertainty and sensitivity analyses were conducted using Crystal Ball, an Excel add-in by Oracle. Furthermore, triangle distributions were used for all uncertain inputs. Table 5 presents the results of laboratory analyses for samples took from 30 separated brands found in the Hamadan province retail market. As represented in Table 5, the mean values of 24 input parameters are in the safe range of the national standard of bottled water quality (Chang et al. 2001) and Codex bottled water quality suggestions (Alimentarius 2001(Alimentarius , 2008. Consequently, low scores of BWQI were not being expected. Samadi et al.  Figure 4 exhibits the scattering pattern of cations and anions measured in 30 obtained samples through a Piper plot. As shown, the bottled water brands entered into the sample set mainly belong to the magnesium bicarbonate type (Hounslow 2018). As shown, low contents of Cl and SO 4 ions are observed, instead, the main share of the anions comprising HCO 3 . Most of studies conducted in the western part of Iran reported bicarbonate type for bottled water and groundwater sources (Bahmani and Palangi 2018;Soleimani et al. 2018;Shakerkhatibi et al. 2019). Figure 4 also reveals that most of the mineral bottled water samples belong to the calcium type water category that confirming the sources of the mineral bottled water is groundwater that has been created in carbonate sedimentary rocks (Dinelli et al. 2010;Hounslow 2018). Table 6 shows the sub-indices, SI q p which are calculated for parameter p attributing to the brand q. Regarding the weights assigned to each parameter and the fuzzy inference rules, BWQI scores were obtained for each brand, as illustrated in Fig. 5. From Fig. 5, it is also revealed that the BWQI scores are laid between 45 and 79, which is indicated as "marginal" and "fair" quality (red and yellow region, respectively) according to the judgment protocol shown in Table 4.

Results and Discussion
The Shapiro-Wilk test results showed the non-significant P values, 0.78 and 0.12 for the mineral and drinking water samples, respectively, revealing that the values obtained from the measurement of bottled water samples have the normal distribution. Furthermore, Table 4 The judgment protocol used for BWQI and BWLI

Range
Description Color  0  44  Poor  45  64  Marginal  65  79  Fair  80  94  Good  95 100 Excellent Table 5 The values of input parameters measured in bottled water samples Parameter Sample No.     the F-test value of 0.29 represents the equality of variances regarding both the drinking and mineral bottled water samples. However, the results of two independent samples T-test indicated that the difference between BWQI scores obtained from drinking bottled water and mineral drinking water samples was not significant (P value = 0.2). Figure 6 presents the differences between the BWQI scores obtained for mineral and drinking bottled water samples. As shown, the scores acquired for the bottled drinking water samples are slightly higher than those assigned to the mineral drinking water samples. Better scores obtained for the drinking bottled water samples are mainly due to low contents of NO 3 , NO 2 , Fe, Mn, Cu, and Zn in these samples which are exploited from public distribution systems having the rigorous standards on municipal water treatment plants for providing safe water. The mineral bottled water samples mainly obtain from the private springs of provinces denoted in Table 1 located in mountainous areas in the neighboring agricultural regions. They are mainly affected by the mineral contents of sedimentary rocks and NO 3 leaks from fertilizers used in the agricultural activities. Furthermore, the private springs may have not involved the rigorous surveillance system like those enforced in the public water distribution systems (Viscusi et al. 2015).
An innovative method for defuzifing the output values y p,i andy p,j was introduced adopted from an approach used for determining the acting point of the resultant force on a        free-end cantilever beam (Hibbeler 2004). In Fig. 3b, if the X-axis be supposed as a cantilever having a fixed end at zero, so that, the resultant value of y p,r can be obtained using Eq. (6). Four principal methods for defuzzifying fuzzy output functions (membership functions), were suggested during recent years including the max membership principle, centroid method, weighted average method, and mean max membership (Ross 2004). All the abovementioned methods determine a defuzzified representative value regarding the geometric shape of the fuzzy output membership functions like those observed in Fig. 7. For example, the centroid method yields a defuzzified value which is the center of gravity of the confined geometric shape under the curves (Yager and Zadeh 2012). In case of obtaining an index, like those performed in our work, the output membership functions comprise the X-axis graded between 0 and 100. Accordingly, the output index does not merely depend on the value obtained from the area under the confined geometric shape but also relies on the magnitude of assigning membership function. Consequently, the values of membership functions (x p,i ) and (x p,j ) can be considered as the weights of output values y p,i andy p,j , respectively. Comparing with a one-side fixed cantilever, the membership function (x p ) can be assumed as force (F) and the output value y p,j is the distance (D) (Hibbeler 2004). However, significant uncertainty in the score (output) values of water quality indices can exist which would not be considered (Xu et al. 2015;Zheng and Han 2016). Here, we attempt to involve the uncertainty nature of the BWQI input parameters to apply the appropriate distribution regarding the output score. Figure 8 shows the uncertainty analysis of BWQI scores using a Monte Carlo simulation analysis. Output results of the simulation obtained from 10 4 trials, proposed the beta distribution to predict the probability of values versus BWQI scores. As shown, regardless of the type of bottled water (drinking or mineral), the mean score of BWQI obtained from Results also display that the BWQI scores obtained from samples will be laid between 64 and 74 under the certainty of 95%.
The sensitivity analysis of BWQI was conducted applying the Monte Carlo algorithm. BWQI involves 24 input parameters so that only the parameters acquired the sensitivity values more than 2% appeared in Fig. 9 and the other parameters were not shown here. The sensitivity analysis demonstrated that withdrawing each of the input parameters NO 3 , Na, hardness, and NO 2 from BWQI tends to more than 10% change in the BWQI original form, which comprises all input parameters. The BWQI original score has +15% sensitivity to NO 3 whereas it reveals less than -10% sensitivity to the input parameters Na and hardness.

Conclusions
Based on the experimental results of the present work, the resulting conclusions can be drawn: A fuzzy inference system is advanced to evaluate the bottled water quality. BWQI is the first attempt to introduce a bottled water quality index by an innovative fuzzy inference method.
Results indicated that BWQI which is calculated on a fuzzy basis compared to conventional methods more severe results presence of a sophisticated number of factors, all of which are essential for the valuation of bottled water quality. A new method to produce the sub-index values from the fuzzy numbers applied in the inference system was developed. Piper diagram prepared based on 30 measured samples depicted that most of the bottled Fig. 9 Sensitivity analysis of BWQI parameters water in the Iranian retail market is classified in the bicarbonate-calcium category. Uncertainty and sensitivity analyses were developed to indicate the range of BWQI having more than 95% of certainty and to determine the impact of omitting each input parameter on the output index, respectively. Therefore, this data is recommended that it be used as a full tool for valuation of bottled water quality.
Acknowledgments The authors acknowledge the Hamadan University of Medical Sciences for financial funding (Number of Grant: 9705022492) and charge to instruments in this work.

Authors Contributions
All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by Mohammad Khazaei and Ensieh Komijani. Ghorban Asgari and Abdolmotaleb Seid-Mohammadi wrote the first draft of the manuscript, and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Ethical Responsibilities
The manuscript complies with all the ethical requirements; the paper was not summited to any journal at a time. All the sources and contributors were acknowledged properly.
Consent to Participate I am very much to participate in the task for the journal including reviewing similar works.
Consent to Publish I have fully agreed to publish the manuscript "Assessment the quality of bottled drinking water through Mamdani Fuzzy water quality index" after peer review on the journal of water resources management.