A method for calculating the probability of tripping while walking