Trust plays a crucial role in establishing and retaining relationships. Sociopsychological analysis identifies three major constructs, such as ability, benevolence and integrity, upon which trust is being built up. On a similar note, in a Wireless Sensor Network (WSN), it is indispensable to have trust among nodes since nodes collectively sense physical parameters and send them to the base station. The nodes, however, can behave fraudulently and send bad information, mostly due to hardware and software faults. Taking inspiration from the sociopsychological account, the present paper introduces a novel model for computing trust of sensor nodes. Additionally, the immune inspired model is suggested for removing fraudulent nodes whose trust ratings fall below the threshold. Roles of the three factors, viz. ability, benevolence and integrity, are examined in WSN domain. The proposed model proves itself to be more advantageous than other methods that adopt machine learning and neural network models in performance metrics such as detection time, reliability, scalability, efficiency and complexity. Proposed work has been implemented on LabVIEW platform and the results substantiate the reliability of the proposed mathematical model. © 2015 Elsevier Ltd. All rights reserved.