import statsmodels.api as sm import numpy as np print('Regression results') predictors = np.random.random(1000).reshape(500, 2) target = predictors.dot(np.array([0.4, 0.6])) + np.random.random(500) lmRegModel = sm.OLS(target, predictors) result = lmRegModel.fit() print(result.summary())