A stochastic model of human gait dynamics