Statistics for Clustering algorithms for sensor networks and mobile ad hoc networks to improve energy efficiency