# A Hybrid Trust Model against Insider Packet Drop Attacks in Wireless Sensor Networks
## 3 Motivation of the Proposed Work
### Design of the New Trust Model
#### 4.2.1 New Trust Model
Next, as shown in Table 1, we calculate _unit penalty_ for each unit failure probabilistically by multiplying the base penalty \(\alpha\) by the confidence ratio of the unit failures. By this manner, we formulate \(PT\) (\(n\)) as:  
\[ \begin{array}{ll}PT(n)=&n\times\alpha\times 1+(n-1)\times\alpha\times(1-P[f]^{2 })/(1-P[f])+(n-1)\times\alpha\times(1-P[f]^{2})/(1-P[f])+\ldots\\ &2\times\alpha\times(1-P[f]^{n-1})/(1-P[f])+1\times\alpha\times(1-P[f]^{n})/(1 -P[f])\\ &=\sum\limits_{i=1}^{n}(n-i+1)\times\alpha\times(1-P[f]^{i})/(1-P[f])\\ \end{array}  \tag{7}\]  
where \(\alpha\) is a base penalty for a single failure. By using Equations (6) and (7), we get \(T\) (\(n\)) as:  
\[T(n)=T(0)-\sum\limits_{i=1}^{n}(n-i+1)\times\alpha\times(1-P\Big{[}f]^{i})/(1- P[f]) \tag{8}\]  
where \(P[f]=1-T(0)\) since \(T(0)\) is the expectation value of \(P[s]\) when \(n=0\) in the beta trust model. To reduce the computation complexity, we have:  
**Theorem 1**. : _The trust function T(\(n\)) defined in Equation (6) satisfies:_  
\[T(n)=T(n-1)-PT_{R}(n); \tag{9}\] \begin{table}
\begin{tabular}{c c c c c} \hline
**Unit Failure** & **Probability** & **Confidence** & **Confidence Ratio** & **Unit Penalty** \\ \hline Single f & \(P[f]\) & \(1-P[f]\) & \(1(=(1-P[f]^{1})/(1-P[f]))\) & \(\alpha\) \\ Double ff & \(P[f]^{2}\) & \(1-P[f]^{2}\) & \((1-P[f]^{2})/(1-P[f])\) & \(\alpha\times(1-P[f]^{2})/(1-P[f])\) \\ Triple fff & \(P[f]^{3}\) & \(1-P[f]^{3}\) & \((1-P[f]^{3})/(1-P[f])\) & \(\alpha\times(1-P[f]^{3})/(1-P[f])\) \\ \(n\)-tuple f... f & \(P[f]^{n}\) & \(1-P[f]^{n}\) & \((1-P[f]^{n})/(1-P[f])\) & \(\alpha\times(1-P[f]^{n})/(1-P[f])\) \\ \hline \end{tabular}
\end{table} 
Table 1: Unit failure and unit penalty. \[PT_{R}(n)=P[f]PT_{R}(n-1)+\alpha n. \tag{10}\]  
**Proof. ** From Equations (7) and (8), we have:  
\[T(n)=T(0)-\sum\limits_{i=1}^{n}\alpha(n-i+1)(1-P[f]^{i})/(1-P[f])\] \[=T(0)-\sum\limits_{i=1}^{n}\alpha(n-i)(1-P[f]^{i})/(1-P[f])+\sum \limits_{i=1}^{n}\alpha(1-P[f]^{i})/(1-P[f])\] \[=T(0)-\left\{\sum\limits_{i=1}^{n-1}\alpha(n-i)(1-P[f]^{i})/(1-P[ f])+\sum\limits_{i=1}^{n}\alpha(1-P[f]^{i})/(1-P[f])\right\}\] \[=\left\{T(0)-\sum\limits_{i=1}^{n-1}\alpha(n-i)(1-P[f]^{i})/(1-P[ f])\right\}-\alpha\sum\limits_{i=1}^{n}(1-P[f]^{i})/(1-P[f])\] \[=T(n-1)-\alpha\sum\limits_{i=1}^{n}(1-P[f]^{i})/(1-P[f]).\]  
Next, let \(PT_{R}(n)=\alpha\times\sum_{i=1}^{n}(1-P[f]^{i})/(1-P[f])\). Then,  
\[PT_{R}(n)=\alpha\sum\limits_{i=1}^{n}(1-P[f]^{i})/(1-P[f])\] \[=\alpha\bigg{\{}1+\frac{1-P[f]^{2}}{1-P[f]}+\frac{1-P[f]^{3}}{1-P[ f]}+\cdots+\frac{1-P[f]^{n}}{1-P[f]}\bigg{\}}\] \[=\alpha\bigg{\{} \begin{array}{c}1+(1+P[f])+(1+P[f]+P[f]^{2})+ \cdots\\ \qquad\qquad+(1+P[f]+\cdots+P[f]^{n-1})\end{array} \bigg{\}}\] \[=\alpha\bigg{[}n+P[f]\big{\{}1+(1+P[f])+(1+P[f]+P[f]^{2})\cdots \bigg{]}\] \[=\alpha\bigg{\{}n+P[f]\sum\limits_{i=1}^{n-1}(1-P[f]^{i})/(1-P[ f])\bigg{\}}\] \[=P[f]\bigg{\{}\alpha\sum\limits_{i=1}^{n-1}(1-P[f]^{i})/(1-P[f]) \bigg{\}}+an\] \[=P[f]PT_{R}(n-1)+\alpha n.\]  
\(\Box\)  
Base Penalty \(\alpha\)  
Next, we need to determine the value of the base penalty \(\alpha\). For a single failure (\(n=1\)), we assign the amount of penalty that the beta trust model gives for a single failure by which our new trust function works the same as the beta trust model. This approach helps to make it easy to design a hybrid trust model as we explained in Section 4.1. Thus, given the number of successes \(s\) and the number of failures \(f\):  
\[\alpha_{n=1}=T_{Beta}(s,f)-T_{Beta}(s,f+1)=\frac{(s+1)}{(s+f+2)}-\frac{(s+1)}{ \{(s+1)+(f+2)\}}=\frac{(s+1)}{(s+f+2)(s+f+3)}. \tag{11}\]  
Meanwhile, as explained in Section 4.2.1, for consecutive failures (\(n\geq 2\)) we use our new trust model that penalizes the node generating the consecutive failures.