# Uncovering Vegetation Changes in the Urban-Rural Interface through Semi-Automatic Methods
## 2 Materials and Methods
### Method  
The method of analysis used to verify the vegetation changes around the built up areas is adapted from the model developed by [PERSON] et al. [30]. Initially proposed to verify burnt areas, the model searches for statistically significant differences between time series of satellite images, using a moving window. This semi-automatic model does not use training data, as the data from the neighbourhood of the study area are incorporated to avoid phenological variations of vegetation. The analysis uses three values extracted from the time series. For each available image are checked: (i) the value of the NDVI in each pixel located within the study area; (ii) the  
Figure 1: Localization of the selected five municipalities. mean value of the NDVI of the neighbouring pixels 500 m apart, located outside of the study area and in the same land cover; and (iii) the difference between these values. The Welch \(t\)-test was applied for each of this information and each date of the time series. Welch \(t\)-test [38] is a variation of Student's \(t\)-test and aims to find statistically significant differences between averages of two datasets of different sizes and variances. According to [39] the procedure of the \(t\)-test depends on the possibility that the variances of the samples can be considered equal. The hypothesis that allows considering equal variances is called homoscedasticity. The test is defined by  
\[t=\frac{\overline{x_{1}}-\overline{x_{2}}}{\sqrt{\frac{\overline{S_{p}^{2}}}{ n_{1}}+\frac{\overline{S_{p}^{2}}}{n_{2}}}} \tag{1}\]  
where \(x_{1}\) and \(x_{2}\) are the observed averages of the two samples, \(n_{1}\) and \(n_{2}\) are the sample size and \(S_{p}\) is the joint estimate of the standard deviation, which is calculated by  
\[s_{P}=\sqrt{\frac{(n_{1}-1)S_{1}^{2}+(n_{2}-\bot)S_{2}^{2}}{n_{1}+n_{2}-2}} \tag{2}\]  
where \(S_{1}\) and \(S_{2}\) are the variances observed in samples 1 and 2. The degree of freedom associated with this statistic is \(n_{1}+n_{2}-2\). If the variance of the samples is not considered equal the calculation of t is given by  
\[t=\frac{\overline{x_{1}}-\overline{x_{2}}}{\sqrt{\frac{\overline{s_{1}^{2}}}{ n_{1}}+\frac{\overline{S_{2}^{2}}}{n_{2}}}} \tag{3}\]  
In this case the degree of freedom is defined by the minimum value of \((n_{1}-1,\,n_{2}-1)\). [PERSON] [39] points out that it is more appropriate to use the assumption of homoscedasticity, because when variances are not considered equal, it is more difficult to reject the null hypothesis. Within this analysis, the null hypothesis (H0) assumes equality between the average of the two sets analysed--i.e., there are no differences between the means of the NDVI in the indicated period--thus showing that the area remained stable. The rejection of the null hypothesis suggests that there was some change, and this is identified by the \(p\)-value that is associated with the t value obtained for each analysed group. Since the \(p\) is less than or equal to a threshold, e.g., 0.05, the null hypothesis is rejected, and it is obtained that there was a statistically change in that period. The indication if there was a decrease in the NDVI is associated with the value of t when it presents values below zero. The Welch \(t\)-test identifies significant differences between the mean value of two sets with different sizes and variances. These sets are defined by a time window applied before and after each date. The current date is included in the 'before' group. These groups have a minimum limit of 2 dates and a maximum of 8 dates and the moving time window is established in 60 days, to minimise problems in the months where there are few or no images with valid values, e.g., because of the presence of clouds. The identification of a change occurs when the \(t\)-test points the significant difference for the value of 'pixel (i)' and the value of the 'difference (iii)' and not the'mean (ii)' on the same date.