Statistical mechanics is a branch of theoretical physics that studies, using probability theory, the average behaviour of a mechanical system where the state of the system is uncertain.The classical view of the universe was that its fundamental laws are mechanical in nature, and that all physical systems are therefore governed by mechanical laws at a microscopic level. These laws are precise equations of motion that map any given initial state to a corresponding future state at a later time.