## 4 Performance Evaluation
### Detection Performance
#### 4.2.2 Detection Performance  
We now evaluate the detection performance of CUBIA. It is important to meet the detectability requirements, such as the maximum allowed latency of detection. In this simulation study, we assume that the maximum allowed latency of detection is 2 s, which is, if the selfish misbehavior is not detected within 2 s, then we consider this case as a mis-detection. In practice, the detection latency requirement can be adjusted based on specific needs/conditions of the network and protocol stack. For example, an extended exposure to selfish carrier sensing can cause TCP congestion control and fast recovery algorithms to kick in, which make it very difficult to recover the throughput performance. There also exists a tradeoff between the detection sensitivity and false-alarm rate, which is part of our future work. We run the simulation 150 times for each set of tests with various backhaul link capacities \(B_{cel}\) of selfish tethering and alarm thresholds. Tables 3 and 4 show the detection results for UDP and TCP protocols, respectively. We can observe that our scheme can detect the selfish behavior with high backhaul capacity with very high accuracy. Note that \(B_{cel}\) implies the intensity of selfish behavior, because, the larger the \(B_{cel}\), the more outstanding packets the selfish node can transmit, which causes severe interference, as observed in Section 2.2. However, the results imply that, in many cases, the detection decision takes more than 2 s with low selfish intensity, i.e., small \(B_{cel}\). This is because the impact of such a moderately selfish node on the network performance is not significant, i.e., the selfish node only achieves a small throughput gain over the legitimate nodes. Consequently, the moderate selfish node is not immediately detectable by CUBIA within 2 s, since it takes more samples for the AP to accurately detect such selfish nodes. Figure 10 shows the average throughput degradation ratio of well-behaving nodes due to the selfish node for various values of selfish intensity (i.e., \(B_{cel}\)). The figure implies that a higher selfish intensity incurs a severer interference on well-behaving nodes. The throughput degradation can be ignored when the backhaul link capacity \(B_{cel}\) of the selfish node is small. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \((\theta_{AS},\theta_{S})B_{cel}\) & **20 Mbps** & **10 Mbps** & **5 Mbps** & **2 Mbps** \\ \hline \((2,3)\) & 1.00 & 1.00 & 0.99 & 0.73 \\ \((2,4)\) & 1.00 & 1.00 & 0.99 & 0.74 \\ \((2,5)\) & 1.00 & 1.00 & 0.97 & 0.61 \\ \hline \((3,4)\) & 1.00 & 0.94 & 0.05 & 0.00 \\ \((3,5)\) & 1.00 & 0.93 & 0.07 & 0.00 \\ \((3,6)\) & 0.99 & 0.92 & 0.07 & 0.00 \\ \hline \((4,5)\) & 1.00 & 0.27 & 0.00 & 0.00 \\ \((4,6)\) & 1.00 & 0.33 & 0.00 & 0.00 \\ \((4,7)\) & 0.95 & 0.27 & 0.00 & 0.00 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Detection performance for the UDP protocol. We next evaluate the impact of the backhaul link capacity \(B_{\textit{ccl}}\) of selfish tethering on the detection performance for \(B_{\textit{ccl}}\) = 2, 5, 10, and 20 Mbps. Figure 11 shows the cumulative distribution of detection time under various \(B_{\textit{ccl}}\). The results indicate that more aggressive selfish behavior, i.e., higher \(B_{\textit{ccl}}\), is detected more quickly by CUBIA for both TCP and UDP protocols. This indicates that CUBIA can quickly detect aggressive selfish behaviors, which is a very important design requirement for any good detection scheme since such an aggressive behavior can seriously degrade the performance of well-behaving nodes. Finally, we study the impact of alarm thresholds, i.e., \(\theta_{AS}\) and \(\theta_{S}\), on the detection time. Figure 12 depicts the distribution of detection time for three different values of the _first alarm threshold_\(\theta_{AS}\). It is straightforward that the use of a smaller value of \(\theta_{AS}\) may issue the first alarm too frequently and may incur an unnecessary overhead for RTS/CTS exchange, which results in performance degradation.