Coal resources are one of the important mineral resources in China. In the process of coal mining, due to the complex hydrogeological conditions in the mining area, and ineffective water exploration and discharge, accidents of mine water inrush occasionally occur, which may seriously restrict the safe production of coal resources. According to statistics, from 2000 to 2017, there were 1,173 accidents of coal mine flood in China, with 4,760 deaths. Therefore, the prediction reliability of mine water inflow plays a vital role in the safety of coal mining. A time series model is specifically designed to simulate and predict a time-sequential, time-varying, and interrelated data series. Most time series models require that the data must be stationary and the time series must follow a normal distribution. Taking Laoyingshan coal mine as an example, this study establishes a model of Seasonal Auto-Regressive Integrated Moving Average (SARIMAX model) and a model of Seasonal Auto-Regressive Integrated Moving Average with eXogenous factors (SARIMA model), compares the fitting and prediction results of these two models, and evaluates their adaptability in prediction of mine water inflow in karst mountainous areas. Based on the monthly average rainfall and monthly average water inflow from October 1994 to December 2014, a SARIMA model for univariate seasonal time series and a SARIMAX model for multivariate seasonal time series have been established. To establish a corresponding mathematical model, it is necessary to perform a parameter significance test on each model, analyze the model fitting goodness and model fitting accuracy, and determine the optimal model. The test parameters can be selected from the coefficient of determination R2 of the sample, the Nash efficiency coefficient (NSE), the mean absolute percentage error (MAPE), the deviation, the root mean square error (RMSE), the AIC value, the BIC value and other indicators to test. Since NSE, RMSE, R2, and MAPE standards are correlated in some degree, the NSE, AIC and BIC values are selected as the criteria for validating the quality of the model. The above two different models are used to predict the average monthly water inflow of the mine in 2015. The model prediction results show that, except for the SARIMA model in November 2015 and the SARIMAX model in July 2015, the MAPE is greater than 40%. According to Qian Xuepu's classification of the prediction accuracy of mine water inflow, these prediction results can reach the mine water inflow of Level B. According to the relative error of the prediction results, the MAPE errors of the SARIMA model in the first 4 months and those of the SARIMAX model in the first 5 months are both within 25%, and the subsequent errors experience a maximum value or a large fluctuation with the step size, indicating good short-term prediction but poor adaptability for long-term prediction of these two models. Even so their prediction accuracy can still reach the mine water inflow controlled by Level C. In terms of the prediction accuracy, the SARIMAX model is more accurate in prediction than the SARIMA model. The main reason is that the SARIMA model is a univariate prediction model, which predicts the later changes only based on the time series changes of the water inflow itself, but ignores the external factors caused by the water inflow. The SARIMAX model only introduces the influence of rainfall on water inflow, but as one of the important factors affecting water inflow, rainfall plays an obvious role in improving the prediction accuracy. The correlation between rainfall and mine water inflow indicates that atmospheric precipitation is the main source for water recharge, and mining fissures are the main recharges channels in the mining area. The change of water inflow has a certain hysteresis effect relative to rainfall. With the extension of mining level, the increase of the mining area and the backfilling of the water-conducting fissures caused by the goaf collapse, the hysteresis effect of rainfall becomes increasingly obvious. The correlation between rainfall and inflow in the same month and the first previous month radually decreases, while it gradually increases from the second and fifth months. Based on the mine water inflow and rainfall, the SARIMA model for univariate seasonal time series and the SARIMAX model for multivariate seasonal time series have been established to predict the mine water inflow. The prediction results show that 91.7% of the predicted values of the two models reach the mine water inflow of Level B, and the prediction accuracy is high. The MAPE of SARIMAX model is 18.57%, less than that of SARIMA model (25.27%), indicating higher accuracy of SARIMAX model. [ABSTRACT FROM AUTHOR]