Statistics for Quantum chaos and phase transitions