A theory of convexity for probability measures