Foundations of Agnostic Statistics