State Functions from Statistical Physics