Real-Time Anomaly Detection in IoT Sensor Data Using Statistical and Machine Learning Methods
Muhammad Hanifa, Abdul Wadoodb, Rana Waseem Ahmada, Sayed Alamgir Shahc, Roidar Khand
- aMinhaj University Lahore, Pakistan
- bShaukat Khanum Hospital and Research Center Lahore, Pakistan
- cInternational Islamic University Islamabad, Pakistan
- dUniversity of Malakand, Pakistan
Papers open inside SciRah from the original publisher or repository; SciRah never hosts them.
Abstract
The proliferation of the Internet of Things (IoT) has intensified the need for robust real-time anomaly detection to safeguard system reliability and operational efficiency. This study presents a comprehensive framework that integrates statistical methods with machine learning techniques for anomaly detection in IoT sensor data. Initial analyses employed descriptive statistics, correlation structures, Z-score, and Interquartile Range (IQR) to characterize data distributions, establish anomaly thresholds, and assess sensor stability. Results identified loudness as the most volatile feature, while light demonstrated high consistency. To enhance detection accuracy, multiple machine learning models were evaluated, including Logistic Regression, Decision Tree, Random Forest, Support Vector Machine (SVM), and Neural Network (MLP). Comparative findings revealed that ensemble and deep learning methods significantly outperformed traditional approaches, with the Neural Network achieving superior accuracy and Random Forest providing strong efficiency. The results highlight the potential of hybrid statistical–machine learning frameworks for effective, scalable, and interpretable real-time anomaly detection in IoT environments.
TL;DRA comprehensive framework that integrates statistical methods with machine learning techniques for anomaly detection in IoT sensor data found that ensemble and deep learning methods significantly outperformed traditional approaches, with the Neural Network achieving superior accuracy and Random Forest providing strong efficiency. (Semantic Scholar)

