calculating statistical variables for IETD analysis