Statistics functions for analysis of data and programs