pub fn average<T>(data: Vec<T>) -> Option<T>where T: Num,
Returns the average value of the given data set, or None if data is empty.