Average Value of a Function(HD)