Sensor nodes are often used to collect data from locations inaccessible or hazardous for humans. As they are not under normal supervision, these nodes are particularly susceptible to physical damage or remote tampering. Generally, a hierarchical data collection scheme is used by the sensors to report data to the base station. It is difficult to precisely identify and eliminate a tampered node in such a data collecting hierarchy. Most security schemes for sensor networks focuses on developing mechanism for nodes located higher in the hierarchy to monitor those located at lower levels. We propose a complementary mechanism with which the nodes at lower levels can monitor their parents in the hierarchy to detect malicious behavior. Every node maintains a reputation value of its parent and updates this at the end of every data reporting cycle. We propose a novel combination of statistical testing techniques and existing reputation management and reinforcement learning schemes to manage the...