Statistical and mathematical tools for atomic clocks