Quantitative analysis of arousal and cyclic alternating pattern