Statistics for Improving the Performance of Data Delivery in Wireless Sensor Networks