Perplexity and Burstiness Explained: The Statistics Behind AI Detectors