Statistically-enhancing the diagnosis of packet losses in WSNs