## 2 Materials and Methods
### Initial Exploratory Analysis
#### 2.2.2 PCA  
Once the entire dataset was standardized, PCA was applied. One of the main targets of PCA is to reduce the dimensionality of the initial dataset without losing the amount of information belonging to it. A dimensionality reduction technique is a process that takes advantage of linear algebraic operations to convert an \(n\)-dimensional dataset to an \(n\)-\(k\) dimensional one. Clearly, this transformation comes at the cost of a certain loss of information, but it also gives the benefit of being able to graphically visualize the data, while keeping good accuracy. The idea behind PCA is to find the best subspace, which explicates the highest possible variance in the dataset. Using linear transformations, starting from an initial standardized matrix in the n-dimensional space, changes in variables are carried out that makes possible to identify observations in the space generated from the principal components, which have the particularity to catch the maximum possible variance of the initial dataset, thus reducing the loss of information. Given \(p\) random standardized variables \(\widetilde{X}_{1},\widetilde{X}_{2},\ldots,\widetilde{X}_{p}\), collected into the matrix \(\widetilde{X}\), the analysis allows determining \(k<p\) variables \(Y_{1},Y_{2},\ldots,Y_{k}\), each of them a linear combination of the \(p\) starting variables, having maximum variance. To find \(Y_{i}\), also known as the \(i\)-th principal component, we need to find the vector \(V_{i}\) such that  
\[Y_{i}=\widetilde{X}V_{i} \tag{2}\]  
by maximizing the variance relative to the first principal component. In other words, vectors \(V_{i}\) are the eigenvectors of the covariance matrix \(C\) of \(\widetilde{X}\), i.e., the \(n\times p\) matrix whose generic element \(C_{hk}\) is equal to \(COV(\widetilde{X}_{h},\widetilde{X}_{k})\). The \(j\)-th element of \(Y_{i}\) represents the _score_ of the \(i\)-th principal component for \(j\)-th statistical unit. The \(j\)-th element of \(V_{i}\) represents the _weight_ that the \(j\)-th variable \(\widetilde{X}_{j}\) has in the definition of the \(i\)-th principal component. Vectors \(V_{i}\) can be collected as columns in the matrix of weights \(V\). Lastly, axis rotations are applied, which mean a change of position of the dimensions obtained during the factor's extraction phase, keeping the initial variance fixed as much as possible. The axis can be rigidly rotated (orthogonal rotation) or interrelated (oblique rotation). The result is a new matrix of rotated factors. Once the dimension of the dataset has been reduced, it is possible to plot the observations in the new space generated by the principal components, space where the coordinates of the observations have undergone linear transformation, in accordance with the variables as mentioned before. The scatter plot represented in Figure 3, depicts the observations after variable reduction. One can notice the presence of elements defined as outliers, i.e., abnormal values, far from the average observations. These disturbing elements could generate unbalanced compensations inside the analytical model, and that is why they will be handled with care, modifying the algorithm's settings whenever possible or, in extreme cases, removed from the dataset. In this case, the outliers were almost all the administrative centers of Emilia-Romagna region, far away, in terms of the quantitative variables, from the rest of the observations. Figure 3: Observations scatter plot which depicts the observations after variable reduction. It is a good rule to consider the principal components that catch at least 80% of the variance of the starting dataset. The more the considered variables, the higher the number of principal components necessary to reach that quote. Whenever the amount of variance reached is not sufficient, an additional reduction in variables is performed by iterating the process.