## 4 Results
### Statistical Tests and Model Validation  
Tourist movements can be modeled at the micro or macro level according to [PERSON] and [PERSON] [12; 98; 99; 100]. At the micro level the movements are represented by a continuous stochastic process \((X_{t})_{tET}\), where \(T=[0,\infty)\) and that takes values in a space of states \(S\). The \(S\) states consist of several georeferenced spatial points representing the locations of people's movements, so called continuous state space. On the other hand, in a tourist destination such as a city it is possible to model spatial--temporal movement in a state space \(S\) as the set of the different places of interest, therefore, \(S\) is discrete. At the macro level tourist movements are represented by a stochastic discrete process \((X_{t})_{tET}\), where \(T=1,2,3,...\) and takes values in a space of states \(S\). In this way: \(S=A_{1},A_{2},A_{3}\ldots A_{k}\). So \(A_{i}\) where \(i=2,3,...k\) represents the tourist attractions and \(A_{k}\) represents the state \"OUT\" which is the outer space region \(S\). For this research this space of states \(S\) is presented in Table 2, and the movement of tourist represented in a Markov Chain according to Section 4.1.  
Figure 8: Visualization map of the intensity of the general visit of the city. Source: Own elaboration..  
Figure 9: Visualisation map of the intensity of visits to the historic centre. Source: Own elaboration.  
In order to validate this modeling, the null hypothesis to be contrasted is the independence between the factors and the alternative hypothesis as the dependence between the factors. In a general the value of \(X^{2}\) calculated is compared with the tabulated value of \(X^{2}\), the latter indicates the value of a given confidence level and \((n-1)*(k-1)\) degrees of freedom, where \(n\) number of rows of the matrix and \(k\) number of columns of the matrix. If the calculated value is greater than the table value of \(X^{2}_{(n-1)(k-1)}\), it will mean that the differences between the observed frequencies and the theoretical or expected frequencies are very high, so it is concluded that there is dependence between the factors or attributes analyzed. In short: \(H1=X^{2}>X^{2}_{(n-1)(k-1)}\) means to reject null hypothesis (dependence between variables) and \(H2=X^{2}<X^{2}_{(n-1)(k-1)}\) means to accept null hypothesis (independence between variables). Thus, if the results of the validation are in relation to the equation \(H1\), it will indicate if the null hypothesis was rejected, thus existing the dependence between variables, otherwise, equation \(H2\), the null hypothesis will be accepted, existing independence between the variables. However this works best for low values of n and k. For higher samples and multiple combinations of n and k a more elaborate treatment is wanted.  
To test the model proposed we use the verifyMarkovProperty function from markovchain package [101] of R: this verifies whether the Markov property holds for the given secure of events. \"The test implemented in the package looks at triplets of successive observations (this implies more freedom degrees). If \(x_{1},x_{2},\ldots,x_{N}\) is a set of observations and \(n_{ijk}\) is the number of times \(t\) (\(1\leq t\leq N-2\)) such that \(x_{t}=i\), \(x_{t+1}=j,x_{x+2}=k\), then if the Markov property fulfilled \(n_{ijk}\) indicates a binomial distribution with parameters \(n_{ij}\) and \(p_{jk}\). A standard \(\chi^{2}\) test can check, since \(\sum_{i}\sum_{j}\sum_{k}\frac{n_{ijk}-n_{ij}p_{jk}}{n_{ij}p_{jk}}\sim\chi^{2} \left(|S|^{3}\right)\) where \(|S|\) is the cardinality of the state space\" according to Spedicato in [101]. The calculated chi-square value for this research is \(X^{2}=1939.842\) with degrees of freedom \(df=17\),\(576\) and \(p\)-value = 1, Since the \(p\)-value shown is 1, we do not reject the null hypothesis that the sequence follows the Markov property on independence between variables so the approach of the construction of a transitions matrix as in Table 3 is correct.