detecting deviation from an expected pattern of behaviour or schedule