A correlation between the spectral and timing properties of AGN