The electric power system is one of the indispensable infrastructures in modern society, and its stable operation is crucial for guaranteeing economic development and social security. By calculating the correlation coefficient and drawing the correlation heat map, we find that there is a correlation between the voltage at each location and the occurrence of electrical faults, and at the same time, there is also a certain correlation between various types of electrical faults and the voltage at each location. These results indicate that there are complex and close interrelationships between different locations and between different types in the power system. In order to better identify and classify different types of electrical faults, we used the random forest model for prediction. The model is used to classify whether an electrical fault occurs or not and to determine its category. The prediction results show that the Random Forest achieved 99.63% in classifying whether an electrical fault occurred or not, and 91.26% in classifying the category of electrical faults. This shows that the Random Forest algorithm model is able to detect electrical faults well, as well as judge the category of electrical faults. In summary, this paper provides insight into the operation of the power system by studying the correlation between the voltage at various locations in the power system and the different types of electrical faults and using the random forest model to make predictions. These findings are of great significance in ensuring the stable operation of power systems.