Hydrogeochemical Characteristics of Geothermal Waters from Mesozoic Formations in the Basement of the Central Part of the Carpathian Foredeep and the Carpathians (Poland) Using Multivariate Statistical Methods

: The subject of this study is the chemical composition of potentially geothermal waters of the Mesozoic basement of the central part of the Carpathian Foredeep and the Outer Carpathians regions. The research objectives were: (1) to identify statistically signiﬁcant differences between the chemical composition of waters from the Cretaceous, Jurassic, and Triassic aquifers, and between the waters of both regions; and (2) the discovery of zones indicating active water exchange—attractive due to the operational efﬁciency of wells. Knowledge of the chemical composition of water allows for the preliminary identiﬁcation of areas of interest for the exploitation of water for recreational, healing, and heating purposes. The research methods used were: (1) statistical tests and (2) methods of multivariate data analysis, such as the Kruskal–Wallis test and Principal Component Analysis (PCA). The performed tests and statistical analyses allowed us to draw conclusions about signiﬁcant differences between the chemical composition of waters from the Cretaceous, Jurassic, and Triassic aquifers, and the basement of the Carpathian Foredeep and the Outer Carpathians. They indicated the existence of a zone with symptoms of active water exchange. Before establishing the fact of active exchange of waters in this zone, further research should be undertaken.


Introduction
The chemical composition of geothermal waters and, in a broader sense, groundwater is of interest to hydrogeologists, oil geologists, geothermists, heat engineers, and entrepreneurs for many reasons, including: • Management of groundwater reservoirs for drinking purposes [1]; • Searching in the water the symptoms of neighborhood of hydrocarbon deposits [2]; • Determination of water corrosivity in relation to materials from which the geothermal well infrastructure is made (high concentrations of Cl − , H 2 S) and scalling phenomena [3,4]; • The ability to recover water components (I, Br, Li, Mg, K, and others) [5]; • Determination of the healing nature of waters for use in spas (e.g., the presence of I, F, H 2 SiO 3 ) [6-9]; • Scientific curiosity, and searching for connections between the chemical composition of waters and the environment of their occurrence [10][11][12].
The chemical composition can have a diagnostic role for many phenomena occurring in the rock mass. It can also testify to the conditions of water exchange (active, difficult, and water flow) [13,14]. It can contribute to or impede the optimal exploitation of geothermal water for different purposes, such as recreation and balneotherapy and district heating. Recreational purposes require waters with mineralization of up to 35 g/L, and therapeutic To find zones of interest due to the distinctive chemical composition of the waters, indicating a potentially active water exchange.
These objectives were analyzed using statistical analyses, which gave us answers to the questions presented in Section 2.3.
The author used various statistical tests (tests of normality of distribution, tests of consistency of distribution, tests of homogeneity of variance, tests of independence χ 2 ) and multivariate analyses (Kruskal-Wallis test, non-parametric version of the one-way ANOVA, Duncan's post hoc tests (Section 3.1)), and Principal Component Analysis (PCA) (Section 3.2).

Research Area
The analyzed area was within the borders of Poland (Central-Eastern Europe) ( Figure 1).
The author used various statistical tests (tests of normality of distribution, tests of consistency of distribution, tests of homogeneity of variance, tests of independence χ 2 ) and multivariate analyses (Kruskal-Wallis test, non-parametric version of the one-way ANOVA, Duncan's post hoc tests (Section 3.1)), and Principal Component Analysis (PCA) (Section 3.2).

Research Area
The analyzed area was within the borders of Poland (Central-Eastern Europe) ( Figure 1).       Figure 3a). It is filled with sediments of the Cretaceous (K) aquifer, and lined with sediments of the Jurassic (J) aquifer. Sediments of the Triassic (T) aquifer have a limited reach in this part of the basin. The estimated (predicted) depth temperatures have the highest values in the deepest parts of the axial part of the basin, in the formations of the Jurassic (J) aquifer, at depths of -2500 to -2750 m a.s.l. Most samples came from the depths, where the expected temperatures do not exceed 60 °C (Figure 3b).     The arrangement of the Mesozoic formations in the shape of a trough is visible (Figure 3a). It is filled with sediments of the Cretaceous (K) aquifer, and lined with sediments of the Jurassic (J) aquifer. Sediments of the Triassic (T) aquifer have a limited reach in this part of the basin. The estimated (predicted) depth temperatures have the highest values in the deepest parts of the axial part of the basin, in the formations of the Jurassic (J) aquifer, at depths of -2500 to -2750 m a.s.l. Most samples came from the depths, where the expected temperatures do not exceed 60 • C (Figure 3b).
In the N-S section (Figure 4a), there is a clear depression of the Mesozoic formations in the S direction. Temperatures (Figure 4b) with values above 50 • C are expected at depths from about -1100 m a.s.l.

Characteristics of the Analyzed Data
Out of the 268 results of the chemical analyses of the water samples, 219 results for waters from the basement of the Carpathian Foredeep and 49 results for waters from the basemenst of the Outer Carpathians were used to carry out further statistical analyses. The most numerous results came from the Jurassic (J, 148) and Cretaceous (K, 101) aquifers. These were mostly Cl-Na waters (228 results). The largest number of samples were from depth interval between 500 and 1000 m b.g.l. (123 results). The results of the chemical analyses were relatively evenly divided into the values of TDS (usually 41-56 results each). On the other hand, the most frequently represented values of estimated temperatures (Tz) were in the range of 20-30 • C (98 results). Table 1 presents the number of the described chemical analyses, grouped by: • Water-bearing horizon (Cretaceous-K, Jurassic-J, and Triassic-T); • Region (the basement of the Carpathian Foredeep-ZPK, the basement of the Outer Carpathians-KZ); • Chemical type of the water (explanation below); • Water sampling depth interval (every 500 m); • Water TDS interval (every 25 g/dm 3 ); • Estimated temperatures at the depth of water sampling (every 20 • C). The information contained in the above data and subjected to further statistical analysis included: Depth (Z) is here defined as the center of the depth interval from which the groundwater sample was taken. Therefore, it is a conventional water abstraction depth.
The temperature (Tz) determined at the depth (Z) is defined as the temperature calculated for the purposes of this article using the geothermal gradient map made by Hajto (2006Hajto ( -2012 [47][48][49]. It was prepared in order to assess the temperatures in the depths of the following areas: Polish Lowlands, Outer Carpathians, and Carpathian Foredeep. The formula according to the calculated temperature (Tz) at depth (Z) has the following form: The phenomenon of water cooling during operation was ignored. It causes the temperature of the outflow waters to be lower than the temperature of the waters in the reservoir. Therefore, for these reasons, the waters in question should be considered 'potentially geothermal', as their temperatures in the reservoir and at the outflow have not been documented.
In order to determine the chemical type of water from the discussed chemical analyses, the concentrations of individual components, expressed in g/L, were converted to mval/L and % mval anions and % mval cations. Then, we checked which anions and cations exceed the threshold of 20 ± 3% mval anions and 20 ± 3% mval cations. From these, waters were selected in which there was one anion exceeding the required percentage threshold. In waters meeting this criterion, attention was paid to the dominant cation. When creating a name for the "chemical type", the first member indicated the anion, and the second member indicated the cation. In this way, the following "simple chemical types" were designated in the discussed data: Cl-Na, SO 4 -Ca, and SO 4 -Na. One "chemical type" was made up of waters containing one and the same dominant anion, as well as one and the same dominant cation.
If there were two dominant anions among the anions, then cations in the term "type" were not taken into account; rather, only those dominant anions. In this way, the "mixed chemical types" were designated: SO 4 -HCO 3 , Cl-HCO 3 , and Cl-SO 4 . In the nomenclature of "simple and mixed types", the order of the dominant anions and cations was not taken into account. This was a simplification of the Altowski-Szwiec classification [50], known and often used in hydrogeology. In it, however, the name of the water begins with the ion whose concentration in the water is the highest, regardless of whether it is an anion or a cation [16]. It generates a much greater variety of "chemical types", which often makes it difficult to illustrate water chemistry in regional and review studies.
From among the range of hydrochemical indices that can be calculated, the water metamorphism index, rNa + /rCl − , water sulphate index, rSO 4 2− × 100/rCl − , and the bicarbonate-chloride index, rHCO 3 − /rCl − , were selected as those whose high values may indicate the conditions of active water exchange. However, they do not necessarily indicate the existence of conditions for active exchange (see Section 4), but may be a symptom of it. Table 2 presents statistical measures for the set of analyzed data (Parameters), which are measures of position and variability. These include: minimum value, first quartile, median, mean, third quartile, maximum value, value range, variance, and standard deviation.
The analyzed waters were therefore groundwater from the depth (Z) from 436 to 3077 m b.g.l. Their TDS ranged from 2 to 176 g/dm 3 , and the estimated temperatures (Tz) in the rock mass at depth (Z) were in the range from 20 to 90 • C.
As is seen on the Piper diagram ( Figure 5) most water samples is characterized by Cl − concentration above 60% meq of anions, SO 4 2− concentration below 40% meq of anions and HCO 3 − concentration below 10% meq of anions, Ca 2+ concentration below 40% meq of cations, Na + concentration above 60% meq of cations and Mg 2+ concentration above 80% meq of cations. However, some of the samples (marked with red ellipses on Figure 5) show different properties such as increased SO 4 2− concentration between 60% meq of anions and 80% meq of anions and increased Ca 2+ concentration above 40% meq of cations. These are samples mainly from water-bearing of Jurassic (J) and also 2 samples from Creataceous (K) and 2 samples from Triassic (T). All of them come from the basement of the Carpathian Foredeep (ZPK).   HCO3 − concentration below 10% meq of anions, Ca 2+ concentration below 40% meq of cations, Na + concentration above 60% meq of cations and Mg 2+ concentration above 80% meq of cations. However, some of the samples (marked with red ellipses on Figure 5) show different properties such as increased SO4 2− concentration between 60% meq of anions and 80% meq of anions and increased Ca 2+ concentration above 40% meq of cations. These are samples mainly from water-bearing of Jurassic (J) and also 2 samples from Creataceous (K) and 2 samples from Triassic (T). All of them come from the basement of the Carpathian Foredeep (ZPK).

Research Problems
The statistical analyses were aimed at discovering certain dependencies and anomalies related to the water chemistry of the Cretaceous, Jurassic, and Triassic aquifers in the basement of the middle part of the Carpathian Foredeep and in the basement of the middle part of the Outer Carpathians.

Research Problems
The statistical analyses were aimed at discovering certain dependencies and anomalies related to the water chemistry of the Cretaceous, Jurassic, and Triassic aquifers in the basement of the middle part of the Carpathian Foredeep and in the basement of the middle part of the Outer Carpathians.
We conducted several statistical tests and analyses (details in Section 3.2) to test the hypotheses, to answer the following four questions connected with the chemical composition of the water in the analyzed area: 1.
Does the chemical type of the water depend on the depth and mineralization of the water? 3.
Can anomalies related to the chemical composition of potentially geothermal waters be found in this new system of variables?

Applied Research Methods
All statistical tests and the Principal Component Analysis were performed by the author using R (free license open-source statistical software).
The statistical tests used to obtain statistically significant answers to the research questions (1 and 2) included the Kruskal-Wallis test (non-parametric ANOVA), post hoc Duncan test (multiple comparisons of mean values), and Pearson's Chi-squared (χ 2 ) test. As an auxiliary test for homogeneity of variance, Levene's test was used. As a test for the normality of distributions, the Shapiro-Wilk test and Anderson-Darling test were used. The purpose of these tests was to check the assumptions for the multivariate version of the ANOVA. The condition of homogeneity of variance in the groups (water-bearing horizon and region) for most parameters (concentration of most ions, density, TDS, H 2 SiO 3 , Tz), the condition of data randomization, and the condition of multivariate normality of the distribution were not met (Section 3.1). Therefore, the Kruskal-Wallis test was used, which is a rank test comparing distributions in k > 2 groups, and is most often used when the assumptions for an ANOVA are not met [51]. Then, Duncan's post hoc tests were performed, which indicated in which groups there were statistically significant differences at the level of 5% significance between the mean values of the analyzed parameters [51]. It is a non-parametric alternative to the Student's t-test. Pearson's Chi-squared (χ 2 ) test was performed to check whether the chemical type of the water in the analyzed data was independent of depth (Z) and mineralization (TDS). The formulation of the independence of the tested parameters as the null hypothesis allowed us to state the lack of independence of the tested parameters after rejecting this null hypothesis.
Boxplots (not attached in the article) were used to evaluate the direction of differences between the mean values of the parameters (variables), divided into water-bearing horizons and region.

Statistical Tests
Homogeneity of variance, with respect to the water-bearing horizon (K, J, T) and region (ZPK, KZ), was tested by the Levene's test to check one of the assumptions for the analysis of variance (ANOVA). The null hypothesis of this test is the homogeneity of variance in a given population. Therefore, the homogeneity of the variance of the parameters (variables) was examined, including the density, TDS, HCO 3 − , SO 4 2− , Cl − , Ca 2+ , Mg 2+ , Na + , rNa + /rCl − , rSO 4 2− × 100/rCl − and rHCO 3 − /rCl − , as well as Tz, in the groups in relation to the water-bearing horizon (K, J, T) and region (ZPK, KZ).
Only in the case of SO 4 2− , Mg 2+ and H 2 SiO 3 did the test not reject the hypothesis of homogeneity of variance. In the remaining cases (density, TDS, HCO 3 − , Cl − , Ca 2+ , Na + , Tz) it can be concluded that, at the significance level of 5% (or less), the variance was heterogeneous.
The study of normality of distributions in groups divided by the water-bearing horizon (K, J, T) with the Anderson-Darling and Shapiro-Wilk tests showed that only the parameters (variables) of density, TDS, Cl-, and Na+ for samples from the water-bearing horizon of the Triassic (T) aquifer did not reject the null hypothesis of the normality of distributions. For the remaining tested parameters (variables) from the Cretaceous (K) and Jurassic (J) and for Triassic (T) aquifers-HCO 3 − , SO 4 2− , Ca 2+ , Mg 2+ , H 2 SiO 3 , rNa + /rCl − , rSO 4 2− × 100/rCl − , rHCO 3 − /rCl − , and Tz-the tests rejected the normality of the distribution at a significance level of 5%.
When divided into groups by region (ZPK, KZ), the normality of distributions of all parameters was rejected by tests at the significance level of 5% (or less).
The Kruskal-Wallis test showed that there were no statistically significant (at the significance level of 5%) differences between distributions divided into groups with respect to the water-bearing horizon (K, J, T) for HCO 3 − , rNa + /rCl − , and rHCO 3 − /rCl − . The results for H 2 SiO 3 were at the borderline of significance (5%). Thus, it can be said that at the significance level of 10% there were no statistically significant differences between the distributions of H 2 SiO 3 in the Cretaceous (K), Jurassic (J), and Triassic (T) aquifers.
The Duncan test (Holm method, Bonferroni method), performed post hoc, showed which water-bearing horizons (K, J, T) differed significantly in terms of mean values. The interpretation of the results of Kruskal-Wallis test, Duncan's test and boxplots is presented in Table 3.
On the other hand, grouped by region (ZPK, KZ), the Kruskal-Wallis test showed that there were no statistically significant (at the significance level of 5%) differences between the distributions of Mg 2+ , H 2 SiO 3 , and rNa + /rCl − or rHCO 3 − /rCl − . The rest of the parameters showed statistically significant differences when grouped by region (ZPK, KZ). Table 3. Conclusions taken from the Kruskal-Wallis test, Duncan test, and boxplots of statistically significant differences between distributions and mean values, grouped by the water-bearing horizon (K, J and T) and by region (ZPK, KZ). The Pearson's Chi-squared (χ 2 ) test was performed to test or confirm the hypothesis regarding the dependence of the chemical type of the water on the depth of the water sample and on the mineralization of the water. The categorical variable "chemical type" and continuous variables "depth" (Z) and "TDS" were used to perform the test, through converting them into categorical variables by dividing their values into intervals. The 'depth' (Z) variable was split every 250 m, and the TDS was split every 10 g/L. The test result for the relationship between the chemical type of the water and the depth (Z) indicated "no independence" between these parameters. Similar conclusions can be drawn in the case of the test result for the study of the independence of the chemical type of the water and mineralization (TDS) ( Table 4). Thus, at the significance level of 5%, it can be concluded that the chemical type of the water "is not independent of depth and mineralization". Table 4. Results and interpretation of the Pearson's Chi-squared test regarding the dependence of the chemical type of water on the depth and TDS.

Principal Component Analysis
In preparation for the PCA, two versions of the correlation matrix were checked: one based on Pearson's correlation coefficient (Figure 7), and one based on Spearman's rank correlation coefficient (Figure 8). The following results were obtained:  After checking both correlation matrices, it was decided to carry out further analysis of the following parameters (variables): density; TDS; concentrations of the main ions HCO 3 − , SO 4 2− , Cl − , Ca 2+ , Mg 2+ , and Na + ; values of the hydrochemical indices rNa + /rCl − , rSO 4 2− × 100/rCl − and rHCO 3 − /rCl − ; and the estimated temperature (Tz). The variables have different units and are of different orders; therefore, standardization of the variables was used in the analysis. Thus, the PCA was based on the correlation matrix, not the covariance.
The results of Principal Component Analysis (Table 5) indicate how many new variables (PC) should be taken into account, and what percentage of common variance they can explain. For the selection of the number of main components, the Kaiser criterion (components with eigenvalues above 1 are selected), the Cattell's scree plot (the graph shows a clear gap between the steep inclination of important factors and the gradually decreasing slope of others), and the criterion of a satisfactory percentage were taken into account. A common value was also utilized (in environmental sciences, 60% is required) [51,54]. For the three principal components (PC 1, PC 2, and PC 3), the eigenvalues exceeded 1 (see the eigenvalues in Table 5). For PC 4, the eigenvalue was close to 1 (0.99); therefore, it was justified to include it in the most important components representing new variables. The percentage of common variance translated by the successive components indicated that PC 1 explains 53%, PC 2-17%, PC 3-9%, PC 4-8%, and PC 5-7% of the variance. This gives a total of 79% of the explained common variance with three principal components, 87% with four principal components, and 94% with five principal components.
Factor loadings indicated which parameters (variables) from among those analyzed had the greatest impact on a given principal component. The factor loadings for the 12 main components are presented in Table 6. Since the PCA carried out in this paper was based on the correlation matrix (which was set by the standardization of the variables), the factor loadings could also be treated as correlation coefficients of individual variables with the respective components.
PC 1 was positively correlated with several parameters (variables): density, TDS, Cl − , Ca 2+ , Na + , Mg 2+ , and Tz (c.a. above 30% each), and negatively with hydrochemical indices (c.a. −22% each). PC 2 was mainly negatively affected by hydrochemical indices (ca. −50% each). PC 3 was strongly negatively affected by HCO 3 − (−77%), as well as Tz (−44%), and positively by Mg 2+ (c.a. 40%). PC 4 could be identified with one parameter (variable), SO 4 2− , 96%. With four principal components, the percentage of the explained common variance was 87%, and was greater than 79% for three principal components. However, it was decided to adopt the first three components (PC 1, PC 2, PC 3) for further consideration. The interpretation of the new variables was as follows: • PC 1 is the "weight of water", and high values are associated with waters of high mineralization and density, and thus increased concentrations of Cl − , Na + , Ca 2+ , and Mg 2+ and elevated temperatures (Tz); • PC 2 is the "anionic-cationic ratio", and high values are associated with the lowest values of the selected hydrochemical indices and low temperatures (Tz); • PC 3 is "magnesium non-bicarbonate", and high values characterize waters with a low concentration of bicarbonate ions (HCO 3 -) at an increased concentration of Mg 2+ and low temperatures (Tz).
Taking into account all of the analyzed parameters (variables), the equations of these first three principal components can be written as follows:: These components are orthogonal to each other, i.e., they are mutually uncorrelated, so they can be used for further analysis (e.g., discriminant or multiple regression) [51].
The projection of the individual factor coordinates of the cases and the factor coordinates of the parameters (variables) on the plane formed by two of the principal components is called a biplot. The axes in the biplot are scaled to show both parameters (variables) and cases (specific water samples) on a single plot. The length of the vectors representing particular parameters (variables) is proportional to the degree of correlation of a given parameter (variable) with particular principal components [51].
The divisions due to TDS intervals, depth intervals, and estimated temperature intervals were used on the biplots as the background for the Principal Component Analysis results. The projection of the cases (water samples) on the PC 1 and PC 2 plane (Figure 9a-f) shows a fairly clear division between the cases belonging to the water of chemical type Cl-Na and the rest of the water types (Figure 9a). Thus, it was possible to determine the value of the factor coordinates for PC 1 (c.a. −2.5), above which the waters only have the Cl-Na type. If the factor coordinates for PC 1 were lower, we were dealing with waters of chemical types SO 4 -Ca, SO 4 -Na, SO 4 -HCO 3 , Cl-SO 4 , and Cl-HCO 3 . On the subsequent biplots it can be read that these chemical types are associated with waters whose TDS does not exceed 25 g/L (Figure 9b). Mostly, these are waters of Jurassic, Cretaceous, and Triassic (K, J, T) (Figure 9c) basement of the Carpathian Foredeep (Figure 9d, factor coordinates for PC 1 < 0 and PC 2 < 0) from a depth range up to a maximum of 1500 m.g.l (Figure 9e), with estimated temperatures (Tz) below 50 • C (Figure 9f). There were no clear differences between waters from the basement of the Carpathian Foredeep (ZPK) and the basement of the Outer Carpathians (KZ), or between waters from the Cretaceous (K), Jurassic (J), and Triassic (T) formations visible on the planes of PC 1 and PC 2.
The projection of cases (water samples) on the PC 1 and PC 3 plane (Figure 10a-f) for the division by chemical type also showed a very clear boundary between the Cl-Na type and other chemical types of water (factor coordinates for PC 1 approx. −2.5). The most negative values of the factor coordinates for PC 1 were related to the chemical types where SO 4 2− was the dominant or one of the dominant anions. Another limit in this division was the value of the PC 3 factor coordinates, which divided the Cl-HCO 3 (factor coordinates for PC 3 < 0) from SO 4 -Ca, SO 4 -HCO 3 and SO 4 -Cl cases (factor coordinates for PC 3 > 0) (Figure 10a). When divided by TDS intervals, it can be seen that PC 1 is a good discriminator for water types, while PC 3 does not show such properties (Figure 10b). On the other hand, for the values of the factor coordinates for PC 1 < 2 and PC > 0, it can be concluded that the waters came only from the basement of the Carpathian Foredeep (ZPK). Apart from by these values of the factor coordinates PC 1 and PC 3, it was not possible to separate the waters by region of origin. PC 1 and PC 3 also did not distinguish between the Cretaceous (K), Jurassic (J), and Triassic (T) aquifers (Figure 10d). PC 1 and PC 3 did not divide well waters from different depth intervals (Z) (Figure 10e). Similar observations can be made for the partitioning according to the estimated temperature (Tz). However, for the values of the factor coordinates for PC 1 > 1.5 and PC 3 < 0, temperatures above 60 • C can be expected (Figure 10f). When looking for potential zones of active water exchange, one should look for zones with lower PC 2 values. Main component PC 1 will also present the lowest values, while PC 3 will present the highest. Therefore, the lowest (negative) values of PC 1 (Figures 12a and 13a) and PC 2 (Figures 12b and 13b), as well as the highest (positive) values of PC 3 ( Figures  12c and 13c), are marked with shades of yellow on the cross-sections. They emphasize the existence of the zone, the depth of which can be defined as -500 to -1250 m a.s.l. in the W-E section (Figure 12a-c), and similarly in the N-S section (Figure 13a-c). This zone has different hydrochemical conditions compared to the surroundings. The location of this zone on the map of the analyzed area is shown in Figure 14   The projection of cases on the PC 2 and PC 3 plane (Figure 11 a-f) indicated that the cases with the lowest values of the factor coordinates for PC 2 were related to the waters of the Jurassic aquifer ( Figure 11c) and the basement of the Carpathian Foredeep (Figure 11d). The TDS of these waters did not exceed 25 g/L (Figure 11b), and the depth from which they originated did not exceed 1500 m b.g.l. (Figure 11e), which at the same time affected the value of the estimated temperatures (Tz), which reached a maximum of 40 • C (Figure 11f). With the values of the factor coordinates PC 2 < −2.5 or PC 2 > 0, and at the same time PC 3 > 0, no waters were observed from the basement of the Outer Carpathians (Figure 11d). Most of the waters from the basement of the Outer Carpathians had the value of the factor coordinates PC 3 < 0. These were the waters of the greatest depths (Z) (Figure 11e), and thus with the highest estimated temperatures (Tz), in the range above 50 • C (Figure 11f).
The information from the biplot diagrams (Figures 9-11) is complemented by the visualization of the calculated values of the main components of PC 1, PC 2, and PC 3 for the cases (according to Formulas (2)-(4)) in the W-E cross-sections (Figure 12a-c) and the N-S cross-sections (Figure 13a-c). It should be noted that the axis values on the biplots represent the factor coordinates for the individual principal components, as opposed to the calculated values of the individual PC 1, PC 2, and PC 3 components for the cases presented in the cross-sections.
When looking for potential zones of active water exchange, one should look for zones with lower PC 2 values. Main component PC 1 will also present the lowest values, while PC 3 will present the highest. Therefore, the lowest (negative) values of PC 1 (Figures 12a and 13a) and PC 2 (Figures 12b and 13b), as well as the highest (positive) values of PC 3 (Figures 12c and 13c), are marked with shades of yellow on the crosssections. They emphasize the existence of the zone, the depth of which can be defined as -500 to -1250 m a.s.l. in the W-E section (Figure 12a-c), and similarly in the N-S section (Figure 13a-c). This zone has different hydrochemical conditions compared to the surroundings. The location of this zone on the map of the analyzed area is shown in Figure  14

Discussion
The geological structure of the area in question naturally influences the significant differences in the chemical compositions of the waters. As can be seen in the cross-sections (for example in Figures 3 and 4)

Discussion
The geological structure of the area in question naturally influences the significant differences in the chemical compositions of the waters. As can be seen in the cross-sections (for example in Figures 3 and 4), the Mesozoic formations of the Miechów Trough plunge under the Miocene formations of the Carpathian Foredeep and the Flysch formations of Outer Carpathians. Thus, the differences in depth generate differences in the mean values of the estimated temperatures (Tz), leading to differences in the mean TDS and all the associated concentrations of the main ions. However, Mg 2+ and the hydrochemical indices (rNa + /rCl − and rHCO 3 − /rCl − ) do not show significant differences in mean values due to the origin of the waters from the basement of the Carpathian Foredeep (ZPK) and the basement of the Outer Carpathians (KZ) ( Table 3). On the other hand, importantly, the sulfate index, rSO 4 2− × 100/rCl − , differs significantly in waters from the basement of the Carpathian Foredeep and the basement of the Outer Carpathians ( Table 3).
The same index shows significant differences in mean values of waters from the Cretaceous (K) and Jurassic (J) formations, while the other hydrochemical indices do not show such differences (Table 3). In the anomaly zone, the hydrochemical indices (rSO 4 2− × 100/rCl − , rNa + /rCl − and rHCO 3 − /rCl − ) negatively affect the value of PC 2 (anion-cationic ratios), which may prove the existence of an active water exchange zone or contact of the water with an active exchange zone. Additionally, low values of PC 1 (water weight) and the lowest PC 3 value (magnesium non-bicarbonate) indicate anomalies and the region with features of waters from active exchange zones. However, it is necessary to consider other possible factors influencing the high values of these indices, reduced mineralization of the waters, and high concentrations of HCO 3 − ions. The high rSO 4 2 -x100/rCl − value is influenced by increased concentrations of SO 4 2− ions. In the region of the Carpathian Foredeep and its basement (ZPK), the sulfate concentration in the waters of the region in question is influenced by sulfate minerals present in the rocks; the sulfates of the Miocene evaporative level of the Carpathian Foredeep, as well as gypsum and anhydrite in the Mesozoic formations, and the transformation of bitumens (oxidation of the deposits and organic substances scattered in the rock). These processes coexist, and constitute a rich source of sulfur entering the groundwater [55,56]. Its form strongly depends on the redox conditions [16]. Moreover, Nieć (1986) [57] notes that in the Polish deposits of native sulfur (the Carpathian Foredeep), it is possible to observe the movement of sulfur to the bottom of sulfur-bearing formations, within the base of the Baranów sandstones. This is the next step in the conversion of sulfur deposits formed due to the influence of bitumens on gypsum, which is reduced into sulfur-bearing limestone with the participation of bacteria. The excess of bitumens leads to further transformations and, as a result, to leaching of sulfur from sulfur-bearing limestone. Sulfur, in turn, is very easily oxidized to SO 4 2− [16,[55][56][57]. The increased content of sulfate ions in the discussed waters may be related to the widespread sulfates in the Miocene evaporative level of the Carpathian Foredeep (ZPK) [21,22,58,59]. Such a relationship was also suggested by Gąsiewicz et al. (2010) [22]. High sulfate index values can result from supply by karst groundwater containing dissolved gypsum [60]. On the other hand, Lipiec et al. (2020) [54] stated that "the proportional relationship between rHCO 3 − /rCl − and rSO 4 2− × 100/rCl − ratios (..) suggests inflow from an active water exchange zone". This thesis was confirmed by the high values of the rNa + /rCl − index, above the average value for ocean water of 0.87 [16,61].
The increased value of the rHCO 3 − /rCl − index, combined with the decreased mineralization of the waters, may also have a different explanation than the commonly known association of waters of shallower aquifers and active water exchange zones. We were inclined to look for a connection with the processes of destruction of oil deposits, which has also been suggested by other authors [21,38,62]. Waters with low mineralization and a high content of HCO 3 − ions in areas and reservoirs away from probable supply areas, often adjacent to bitumen deposits, next to Cl-Na, Cl-Ca, and Cl-Mg brines, and sometimes below waters with higher mineralization, as well as bicarbonate waters, are sometimes very slightly mineralized. Some water demineralization is believed to take place there [38]. One of its causes have may been indicated by Lenk (1983) [62]; the dilution of water with water vapor escaping from natural gas deposits during their destruction due to methane (CH 4 ). On the other hand, Gąsiewicz (2000) [21] gave an example of the process taking place during the oxidation of CH 4 , which, combined with the activity of bacteria, leads to the oxidation of CH 4 , reduction in SO 4 2− , and production of HCO 3 − and water (chemically pure). This could provide a good explanation for the influence of hydrocarbon deposits on water chemistry, especially (in this case) enrichment with HCO 3 − ions and water demineralization.
On the other hand, high values of the rNa + /rCl − index suggest conditions of active water exchange, but high values of TDS could indicate the leaching of sodium-chloride salts, rather than the conditions of good exchange. Therefore, it is important to take into account not only the values of the indices themselves, but also to link them with others that affect the overall picture of the water chemistry.
However, in the area of the described zone with different hydrogeochemical characteristics (Figures 9-14), drilling has been undertaken to search for geothermal waters (Cudzynowice GT-1), at the location indicated in Figure 14. The drilling show the existence of zones and water-bearing horizons with good reservoir properties of the rocks of Cretaceous (K) formations. The Cudzynowice GT-1 borehole, which is 750 m deep, was bored with Cenomanian (of the Cretaceous) sands and sandstones, and collects water of a temperature of 27-28.6 • C, mineralization of about 14-15 g/L, and dominant Cl − and SO 4 2− anions. The self-outflow efficiency amounts to 82 m 3 /h [25]. Hence, taking into account a number of parameters (variables) and combining them into new variables, the principal components may shed new light on the interpretation of the chemical composition of these waters.

Conclusions
This paper presents chemical composition of the potentially geothermal waters from statistical point of view and pointing out the hydrochemicaly anomaly zone.
The main achievements of the paper are: • showing the chemical composition of the waters (based on 268 samples) of the analyzed area (Figures 1-4) and indicating statistically significant differences between the waters from the Cretaceous, Jurassic and Triassic aquifers and from the basement of the Carpathian Foredeep (ZPK) and from the basement of the Outer Carpathians (KZ) ( Figure 5, Tables 1 and 2). Statistically significant differences were found between the concentrations of most of the main ions, the TDS, and the density of water in the groups mentioned. On the other hand, HCO 3 − ions showed no significant differences based on the water-bearing horizon such as Mg 2+ ions in the regions (ZPK and KZ). SO 4 2+ ions showed significantly higher mean values in the Carpathian Foredeep than in the basement of the Outer Carpathians ( Figure 5, Table 3); • demonstration that the chemical type of water is "not independent" of mineralization (TDS) and depth (Table 4)-what to expect; • conducting the PCA (Principal Component Analysis), thanks to which it is possible to reduce the dimensionality of the variables (3-4 PC instead of 12) explaining about 80% of the common variance (Tables 5 and 6); • displaying the values of PC 1, PC 2 and PC 3 for cases on cross-sections and for cases and variables on biplots (Figures 9-11); • PCA made it possible to indicate the anomalous zone in comparison of the background in terms of the chemical composition of the waters; • depicting the depth of the chemically anomalous zone on the cross-sections ( Figures  12 and 13), and also its location in the plan on the location map ( Figure 14); • data preparation (orthogonal new variables-PC) for further analysis-e.g., some of the Discriminant Analyses (LDA, QDA, MDA), Cluster Analysis which would be aimed at finding a good discriminant for water classification based on new statistical methods.
In summary, the chemical composition of the potentially geothermal waters of the basement of the central part of the Carpathian Foredeep and the basement of the Outer Carpathians may have an initial diagnostic role, indicating some anomalies in relation to their background. These may be a symptom of the existence of zones that would be interesting from the point of view of water exploitation for various purposes.
It is worth noting the zone located in the central part of the Carpathian Foredeep in the depth range of -500 to -1250 m a.s.l. mainly related to formations of the Jurassic, but partly also Cretaceous. This zone is different from a hydrogeochemical point of view in relation to the neighboring zones. However, further research is required to attempt to link the chemical composition with various factors influencing its image. It should be considered that the statistical methods and methods of distinguishing an anomalous zone (perhaps indicating conditions for good water exchange) discussed in this article are only auxiliary methods. The used methods have also weak sides for example dependence on estimated temperatures as a substitute for actual temperatures, taking into account hydrochemical indices which are related to main ion concentrations. The methods require supplementing with other methods, especially considering a number of dependencies on the rock mass, hydrogeological and tectonic conditions, and the vicinity of deposits (e.g., hydrocarbons, sulfur, sulfates).

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.

Conflicts of Interest:
The author declares no conflict of interest.