Machine Learning, Data Science, Python, Statistics, Data.
to test whether the coefficient of the ‘X’ variable in our linear regression model is statistically significant or not. We can use the t-test and p-value to test this hypothesis: import statsmodels.formula.api as smf model = smf.ols('Y ~ X', data=data).fit() print(model.summary()) The summary()