## 3 Spectrum Sensing Quality Analysis
The detection probability distribution generation:

Sort the detection probability \(p_{d}(m,1),p_{d}(m,2),\cdots,p_{d}(m,N_{c})\) in ascending order and constitute the sorted sequence as \(\beta_{d}(1),\beta_{d}(2),\cdots,\beta_{d}(N_{c})\). 2:\(\forall X_{d},Y_{d}>0\), for \(X_{d}<\beta_{d}(1)\) and \(Y_{d}>\beta_{d}(N_{c})\). 3: Divide interval \([X_{d},Y_{d}]\) into \(\xi\) equal subintervals, i.e., \(X_{d}=\mu_{0}^{d}<\mu_{1}^{d}<\mu_{2}^{d}\cdots<\mu_{\xi-1}^{d}<\mu_{\xi}^{d}=Y _{d}\). 4:for\(\ell=1\to\xi\)do
5:\(\mu_{\ell}^{d}-\mu_{\ell-1}^{d}=(Y_{d}-X_{d})/\xi\). 6: Calculate the number of the detection probabilities within subinterval \(\Big{(}\mu_{\ell-1}^{d},\mu_{\ell}^{d}\Big{]}\) denoted by \(n_{\ell}^{d}\). 7: Calculate the probability \(\Upsilon_{\ell}^{d}(m)=n_{\ell}^{d}/N_{c}\). 8:endfor
9:Return:\(\Upsilon_{d}(m)=\Big{\{}\Upsilon_{1}^{d}(m),\,\Upsilon_{2}^{d}(m),\cdots, \,\Upsilon_{\xi}^{d}(m)\Big{\}}\). The false alarm probability distribution generation:

Sort the false alarm probability \(p_{f}(m,1),p_{f}(m,2),\cdots,p_{f}(m,N_{c})\) in ascending order and constitute the sorted sequence as \(\beta_{f}(1),\beta_{f}(2),\cdots,\beta_{f}(N_{c})\). 10:\(\forall X_{f},Y_{f}>0\), for \(X_{f}<\beta_{f}(1)\) and \(Y_{f}>\beta_{f}(N_{c})\). 11: Divide interval \(\Big{[}X_{f},Y_{f}\Big{]}\) into \(\xi\) equal subintervals, i.e., \(X_{f}=\mu_{0}^{f}<\mu_{1}^{f}<\mu_{2}^{f}\cdots<\mu_{\xi-1}^{f}<\mu_{\xi}^{f}=Y _{f}\). 12:for\(\ell=1\to\xi\)do
13:\(\mu_{\ell}^{f}-\mu_{\ell-1}^{f}=\Big{(}Y_{f}-X_{f}\Big{)}/\xi\). 14: Calculate the number of the false alarm probabilities within subinterval \(\Big{(}\mu_{\ell-1}^{f},\mu_{\ell}^{f}\Big{]}\) denoted by \(n_{\ell}^{f}\). 15: Calculate the probability \(\Upsilon_{\ell}^{f}(m)=n_{\ell}^{f}/N_{c}\). 16:endfor
17:Return:\(\Upsilon_{f}(m)=\Big{\{}\Upsilon_{1}^{f}(m),\,\Upsilon_{2}^{f}(m),\cdots, \,\Upsilon_{\xi}^{f}(m)\Big{\}}\). ```  
**Algorithm 1**Generation Procedure of Distribution \(\Upsilon_{d}(m)\) and Distribution \(\Upsilon_{f}(m)\)  
Owing to the fact that the number of the detection probabilities or the false alarm probabilities is calculated under the constraint of \(N_{c}\), it is clear that the distributions \(\Upsilon_{d}(m)\) and \(\Upsilon_{f}(m)\) fall into the complete probability distributions, i.e., \(\sum_{\ell=1}^{\xi}\Upsilon_{\ell}^{d}(m)=1\) and \(\sum_{\ell=1}^{\xi}\Upsilon_{\ell}^{f}(m)=1\). Apparently, the entropy paradigm should be used for a measure of the uncertainty associated with a random variable of a distribution in information theory [31], and can be also applied to measure the uncertainty of the distributions \(\Upsilon_{d}(m)\) and \(\Upsilon_{f}(m)\). As a result, for the \(m\)-th SSN over the entire uplink channels, the uncertainty characterization of the distributions \(\Upsilon_{d}(m)\) and \(\Upsilon_{f}(m)\) can be respectively described as based on the entropy modeling framework:  
\[H(\Upsilon_{d}(m))=-\sum_{\ell=1}^{\xi}\Upsilon_{\ell}^{d}(m)\log_{2}\Upsilon_{ \ell}^{d}(m) \tag{14}\]\[H\Big{(}\Upsilon_{f}(m)\Big{)}=-\sum\limits_{\ell=1}^{\zeta}\Upsilon_{\ell}^{f}(m) \log_{2}\Upsilon_{\ell}^{f}(m) \tag{15}\]  
In what follows, we are also interested in gaining a better understanding of how to apply this entropy measurement to evaluate the stability of local spectrum sensing. It should be admitted that the entropy tends to be larger when the change of the random variable values in given distribution is disorder or randomness [32]. That is, a more disordered probability distribution will result in larger entropy. Thus, the better performance of spectrum sensing for the \(m\)-th SSN will bring about the more ordered probability distributions \(\Upsilon_{d}(m)\) and \(\Upsilon_{f}(m)\). In this way, the stability of the distributions \(\Upsilon_{d}(m)\) and \(\Upsilon_{f}(m)\) will decrease because of more disorder for the values of the detection probability and false alarm probability in the distributions \(\Upsilon_{d}(m)\) and \(\Upsilon_{f}(m)\).