Machine-learning techniques are extensively used in fraud detection and have a huge potential application in electricity theft detection. Electricity theft occurs when consumers manipulate their electricity consumption to be recorded as lower than the actual, resulting in reduced revenue for the electricity supplier. This study explores the application of advanced machine-learning techniques to detect electricity theft, focusing on the impact on supply of electricity to electricity usage pattern. We used a dataset that contains supply interruptions influenced by transformer reliability to construct a robust detection model. This model integrates data analytic techniques from decision trees, support vector machines, k-nearest neighbors, and logistic regression classifiers. After selecting the optimal classifier, we used aggregated parameters to improve theft-detection accuracy. A comprehensive sensitivity analysis was used to evaluate the effects of variations in transformer reliability factors on interruption, interruption costs, electricity revenue, and theft-detection performance. Our findings indicate that using optimal aggregated parameters significantly enhances detection accuracy 10.709 percent, 11.435 percent, 4.909 percent, and 2.097 percent from original parameters depend on the number of aggregation in 2-hour, 4-hour, 6-hour, and 12-hour, respectively. The lower transformer reliability leads to increased loss with percentage 66.87 percent, 46.98 percent, 17.22 percent and reduced theft-detection efficiency by 27.32 percent, 19.23 percent, 6.20 percent. depend on reliability factor20 percent, 50 percent, and 80 percent, respectively.