# PROFEE: A Probabilistic-Feedback Based Speed Rate Adaption for IEEE 802.11 bc
## 3 Estimation of the Number of STAs Receiving Broadcast Messages Correctly/Incorrectly
In theory, the three ways should provide the same estimation, which adds robustness to the system; however, as we will see soon, depending on the chosen probabilities, not all three alternatives provide an accurate estimation for a finite number of messages. Similarly, in some scenarios, the capture effect might change a collision into a correct reception in the AP, thus introducing additional errors while using the correct feedback and collision estimators. The only equation with a closed form when solving for \(n_{ACK}\) is Equation (3),  
\[n_{ACK}=\frac{\log\Bigl{(}\frac{E[ACKSilence]}{f}\Bigr{)}}{\log(1-p_{ACK})}, \tag{7}\]  
and the only equation with a closed form when solving for \(n_{NACK}\) is Equation (4),  
Figure 1:0  
Equation (7) is valid while \(0<p_{ACK}<1\) and \(E[ACKSilence]>0\), while Equation (8) is valid when \(0<p_{NACK}<1\) and \(E[NACKSilence]>0\). Although there is no closed form for the other equations, they can be solved via numerical methods. In order to illustrate the error and estimation convergence time, we evaluated the expected error by comparing the number of STAs obtained from Equation (8), and the number of STAs obtained via simulations for estimating \(n_{NACK}\) using the _silence_ estimator. The experiment was performed in Python for \(f=1000\) messages and 10, 100, and 1000 STAs. Each STA transmitted with probability \(p_{NACK}\) in each slot and did not transmit with probability \(1-p_{NACK}\). When no STA transmitted a NACK, a silence event was counted. A collision event was counted when more than one STA transmitted a NACK, and when exactly one STA transmitted a NACK, a successful NACK reception was counted. After 1000 messages, \(n_{NACK}\) was estimated using Equation (8), and the estimation error was computed. This process was repeated 10,000 times to obtain the expected error for such probability. Figure 3 shows the results of the simulations for evaluating the expected error for estimating \(n_{NACK}\) for different values of \(p_{NACK}\) using the expected number of silences \(E[NACKSilence]\). The plots also show the analytic plot of Equation (4) for \(n_{NACK}=10\), \(n_{NACK}=100\), and \(n_{NACK}=1000\). These plots show an area (red rectangle) where the percentage of silences minimizes the expected error in estimating \(n_{NACK}\) after 1000 messages. Notice that, in these figures, this is between 15% and 45% of silence events, which we will call \(prop_{NACK}^{inf}\) and \(prop_{NACK}^{sup}\), respectively. Notice that, although the simulations are performed for estimating \(n_{NACK}\), the same process coincides with estimating \(n_{ACK}\). To achieve the percentage of silences that minimizes the expected error in the estimation of \(n_{ACK}\) and \(n_{NACK}\), we propose a simple algorithm that iterates over different values of \(p_{ACK}\) and \(p_{NACK}\), respectively, until it finds one that satisfies that the target percentage of silence events, in this case, is between \(prop_{ACK}^{inf}\) and \(prop_{ACK}^{sup}\) (or \(prop_{NACK}^{inf}\) and \(prop_{NACK}^{sup}\)). The proposed algorithm is similar to a binary search algorithm as shown in Algorithm 1. On each iteration, the value of \(p_{ACK}\) or \(p_{NACK}\) will logarithmically approach to a value that satisfies \(prop_{ACK}^{inf}\leq p_{ACK}\leq prop_{ACK}^{sup}\) (or \(prop_{NACK}^{inf}\leq p_{NACK}\leq prop_{NACK}^{sup}\)). Notice that the maximum value for \(p_{ACK}\) and \(p_{NACK}\) is 0.1, as shown in lines 13-15 of the algorithm, which works well for more than 10 STAs. Figure 1:1 Expected error obtained with the silence estimator after 1000 messages. Although the algorithm is presented for \(n_{ACK}\), a similar one works for \(n_{NACK}\) by changing \(p_{ACK}\) for \(p_{NACK}\) and \(prop_{ACK}^{inf}\) and \(prop_{ACK}^{sup}\) for \(prop_{NACK}^{inf}\) and \(prop_{NACK}^{sup}\). When an appropriate value of \(p_{ACK}\) or \(p_{NACK}\) is found, the expected error in the estimation will be the minimum, which means that the AP will estimate \(n_{ACK}\) or \(n_{NACK}\) as accurately as possible.