Random-walk theory and correlation functions in classical statistical mechanics