Stochastic properties of Riemannian manifolds and applications to PDE's