calculateStatistics function

Calculate network statistics from a formula