  A classical inequality, which is known for families of monotone functions, is
generalized to a larger class of families of measurable functions. Moreover we
characterize all the families of functions for which the equality holds. We
apply this result to a problem arising from probability theory.
