Self-Interacting Random Walk, Bayesian Statistics and Statistical Physics