Gross Domestic Product (GDP) is the core indicator of national economic accounts, which reflects the economic capacity of a region. It is necessary to have an accurate forecast of GDP. GDP prediction plays an important role in formulating economic policies. By predicting the growth trend of GDP, the government can make correct adjustments and regulate economic activities. This paper takes Guangdong Province and Shandong Province as examples, aiming to establish their GDP models respectively, and obtains their important economic factors on the basis of the models. Firstly, the correlation test and stepwise regression method were used to screen out the variables with significant impact on GDP, and then ridge regression was used to solve the multicollinearity to make the model more accurate. Finally, the similarities and differences of important economic factors in the two provinces were compared. The important economic factors of these two provinces can reflect the characteristics of the economic development of China's north and south, which is conducive to promoting the coordinated development of regional economy and win-win cooperation.