Foundations of quantum mechanics: Connection with stochastic processes