Distributed deviation detection in sensor networks