Many defects occur during the mass production of precision electrical components. To control and manage them, process variables (PVs), such as the temperature, pressure, flow rate, and liquid level, are measured and time‐series data analyzed. However, identification of point of defects is difficult as any operation can cause defects and multiple equipment units are used in parallel for some operations. This study considers the combination of unfavourable conditions between operations to predict the defect rate (DR) of products. A dataset measured in an actual mass‐production process for precision electrical components is analysed to predict the DR of the products. Data analysis is performed on a dataset generated from an actual mass‐production process for precision electrical components, and machine learning models. are constructed using ensemble learning methods, such as random forests, the gradient boosting decision tree, XGBoost, and LightGBM. Conventional univariate analyses only show a maximum correlation coefficient of 0.17 with a DR and process variables (PVs). In this study, we improved the correlation coefficient to 0.73 using a multivariate analysis, including the data of PVs that are not considered important in the process, and appropriately transformed PVs based on the domain knowledge of the process. Furthermore, PVs that were closely related to the DR could be diagnosed based on the feature importance of the constructed machine‐learning models. This study confirms the importance of using domain knowledge to improve the prediction ability of machine learning models and the interpretation of constructed models.