add event detection and probability generation functions to stats utils