The topology of probability distributions on manifolds