Spectral Correlation Function In Statistical Mechanics