# Trust-Aware Routing Mechanism through an Edge Node for IoT-Enabled Sensor Networks
## 4 Proposed Trust-Aware Routing Mechanism
### Trust-Value-Based Route Path Selection
#### 4.2.1 Trust Values Evaluation
Finally, the efficiency in terms of energy is depicted for both the untrusted scenarios against TBSEER and VFDC methods in Figure 9a and Figure 9b, respectively. ### Statistical Evaluation

The statistical evaluation is the non-parametric evaluation of the approach performed for validating the performance of the proposed technique with other similar techniques. For comparison, we consider five existing but similar approaches i.e., particle swarm optimization (PSO), ant colony optimization (ACO), hybrid whale GWO [35], modified bee colony optimization (MBCO) [23], and ant lion optimization with K-means (ALO-K) [22]. The objective function is taken to be the proposed one, which is expressed in Equation (1). Table 6 shows the success rates and average time taken for execution of all these algorithms. Higher success rate exhibits better performance, and lower time taken for execution leads to faster convergence of the algorithm. It can be noted that the proposed modified GWO and ABC algorithms performs better than other existing algorithms. We compare the heuristic algorithms using the datasets described in Table 7 and paired observations. Statistical tests such as _[PERSON]'s_ test and _[PERSON]'s_ test help in identifying the best heuristic approach for trustworthiness. The test procedures used in this paper to analyze the observations in datasets are [PERSON]'s test and [PERSON]'s test. In these methods, the null hypothesis \((H_{0})\) says that all algorithms have the same variances and mean cost while the alternate hypothesis \((H_{1})\) says that all algorithms have different variances and mean cost. \begin{table}
\begin{tabular}{c c} \hline \hline
**Algorithms** & **Average Route Length** \\ \hline VFDC & 4.41 \\ TBSEER & 4.0 \\ TEM-MEN & 3.79 \\ TARM & 3.22 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Average route length. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Methods** & **A 1** & **B 2** & **C 3** \\ \hline PSO & 1124 & 0.89 & 2.3 \\ Whale optimization & 1256 & 0.45 & 1.0 \\ Cuckoo search & 1466 & 0.73 & 1.7 \\ GWO & 1689 & 0.38 & 1.5 \\ Modified GWO & 1858 & 0.26 & 0.48 \\ \hline \hline \end{tabular}

* Total packets sent to CH. 2 Average Energy usage (intra-cluster) in joules. 3 Cluster balancing factor.

\end{table} 
Table 5: Intra-cluster parameters comparison with other optimization approaches used for clustering of nodes. Figure 9: Energy efficiency in joules for untrusted scenarios: (**a**) 25% of untrustworthy nodes out of the total 200 nodes; (**b**) 50% of untrustworthy nodes out of the total 200 nodes. #### 5.3.1 Friedman Test

It is used to find the variations between the groups which have rank-dependent variables. The null hypothesis states that all algorithms perform equally while the alternate hypothesis says that there are differences in each algorithm's performance. Here, we consider the best optimal values of intra-cluster distances expressed in Equation (5) as the basis to assign ranks (written in brackets after each best-optimized value) from one to six, as shown in Table 8. The Friedman distribution value is given by

\[Fr=\frac{(x-1)\chi_{Fr}^{2}}{x(y-1)-\chi_{Fr}^{2}} \tag{30}\]

where \(\chi_{Fr}^{2}\) is expressed as

\[\chi_{Fr}^{2}=\frac{12x}{y(y+1)}\left[\sum_{i=1}^{y}r_{i}^{2}-\frac{y(y+1)^{2} }{4}\right] \tag{31}\]

where \(x\) is the number of datasets and \(y\) is the total number of algorithms (\(x=5\) and \(y=6\)) being compared. The degree of freedom is \((y-1)\) and \((y-1)(x-1)\), i.e., between 5 and 20; using this, the critical value obtained from \(F\)-distribution at \(\alpha=0.05\) is 2.711. The values of \(\chi_{Fr}^{2}\) and \(Fr\) computed from the above equations are 18.428 and 11.216, respectively. As it can be noticed that \(Fr\) is greater than the critical value, the null hypothesis is rejected, showing that the performances of all algorithms are different. #### 5.3.2 [PERSON]'s Test

[PERSON]'s test shows the rejection of the null hypothesis for all algorithms; so, here, we use [PERSON]'s procedure as a post-hoc test.