*3.3. Correlations between Surface Roughness and the Analyzed Factors*

In the previous section, the influential factors on surface roughness: layer height and wall thickness in experiment 1, and wall thickness in experiment 2, were identified. To evaluate the influence of these factors on surface roughness, graphical methods for identifying trends and additional statistical analysis for checking correlations were used. Based on the ANOVA results, the results of experiment 1 are plotted in Figure 4. In the figure, the tests are grouped by layer height. In the figure, it is possible to see clearly how the surface roughness obtained for the layer height of 0.15 mm is lower than the one obtained for the layer height of 0.25 mm. This result agrees well with the conventional knowledge on surface roughness obtained in additive manufacturing processes [18,31]. Moreover, it is possible to see how the lowest surface roughness was obtained for the tests that used the lowest layer height and wall thickness (e\_5 and e\_7).

**Figure 4.** Surface roughness results of experiment 1 grouped by layer height.

When grouping the results by wall thickness and plotting them, it is possible to appreciate how wall thickness has a clear influence on surface roughness. Again, obviously, the results for the wall thickness of 1 mm and layer height of 0.15 mm (e\_5 and e\_7) are those that produced the lowest surface roughness.

Similar results to those obtained in Figure 5 were obtained when grouping the results of experiment 2 by wall thickness. In this case, the influence of the printing path (strategy) is negligible. In general, an increasing trend can be seen when wall thickness is increased, as seen in Figure 6. According to our best knowledge, the influence of wall thickness on surface roughness has not been previously studied in detail in the literature. In addition, a clear relation was not found between printing path strategy and wall thickness, though this relation should be studied in detail for lower values of wall thickness.

**Figure 5.** Surface roughness results of experiment 1 grouped by wall thickness.

**Figure 6.** Surface roughness results of experiment 2 grouped by wall thickness.

From the previous results, it is clear that both layer height and wall thickness have an important influence on surface roughness. However, the influence of the printing speed and temperature is not clear in the figures, as it was identified using the ANOVA results.

In order to confirm the influence of the different factors on surface roughness, an analysis based on the use of non-parametric tests was carried out. In this sense, Spearman's *ρ* and Kendall's τ correlation coefficients are calculated as done by Carou et al. [32]. These two tests are useful to identify monotonic relationships, being resistant to the effect of outliers [33]. Moreover, it is important to note that these tests do not assume a specific parametric model or specific distributions for the data [34]. The two coefficients can be calculated using Equations (1) and (2) for the Spearman's *ρ* and Kendall's τ, respectively [33,34].

$$\rho = \frac{\sum\_{i=1}^{n} \left( R\_{Xi} - R\_{yi} \right) - n(n+1)^2/2}{n(n^2 - 1)/2} \tag{1}$$

$$
\tau = \frac{P - M}{n(n - 1)/2} \tag{2}
$$

*n*is the number of pairs (*xi*, *yi*); *Rxi*and *Ryi* the ranks of x and y, respectively; and *P* and *M*, the numbers of pluses and minuses, respectively. R Softwarewasused for calculating the coefficients for the different factors: layer height, printing path, printing speed, temperature, and wall thickness versus surface roughness based on the results listed in Tables 6 and 7. The results obtained are shown in Table 8. The correlation coefficients can vary from −1 (perfect negative association) to +1 (perfect positive association). When there is no correlation, the coefficient gets a value of 0 [33]. In the table, the correlation coefficients are listed along with their *p*-values.

In Table 10, similarly to the ANOVA results, it is possible to see how only layer height and wall thickness resulted as significant factors when computing the coefficients. Therefore, it is possible to state that no clear relation exists between surface roughness and printing path, printing speed, and temperature. Besides, the calculated coefficients for these relations are close to 0 (in all cases, lower than 0.3273268).


**Table 10.** Correlation coefficients for experiment 1 and 2 versus the analyzed factors.

Note: \* significant factor considering *p*-value < 0.05.

Regarding layer height and wall thickness, the coefficients have positive values. So, when increasing these two factors, higher values of surface roughness are expected. Although their values are not very close to +1, they show a monotonic correlation with values ranging from 0.47 to 0.90 for both Spearman's *ρ* and Kendall's τ coefficients. The results show small differences between the values obtained for these two coefficients. However, a bigger difference was found when comparing the results of experiment 1 and 2. In this case, it should be noted that only 8 experiments were carried out in experiment 1, while 15 experiments were carried out in experiment 2. So, the dataset of experiment 2 should be considered as more reliable for identifying monotonic relations. In fact, the calculated coefficients for experiment 2 show a clear correlation between surface roughness and wall thickness with *p*-value below 0.05 and values for the correlation coefficients very close to +1, while the *p*-value in the case of experiment 1 was not below 0.05.

Finally, from the graphical analysis and the statistical analysis using ANOVA and non-parametric tests, a general recommendation can be drawn. So, it is highlighted that when surface roughness is a critical requirement in additive manufacturing, particularly using FDM processes, layer height and wall thickness should be fixed at lower values. It seems clear that layer height should be as low as possible to minimize the staircase effect. However, further research should be carriedout for wall thickness to understand whether it is possible to reduce its value to a minimum or not, considering issues such as the size of the nozzle extruder and even printing path strategies that could have a negative impact when the wall thickness is too small.
