Explicit formulae in probability and in statistical physics