Professional Documents
Culture Documents
[19]: x1 x2 subjects y
0 3 3 Math 50
1 4 4 Math 42
2 6 5 Stat 60
3 3 9 Eco 24
4 6 5 Stat 56
5 2 1 Math 43
6 6 4 Eco 57
7 2 6 Eco 34
8 1 1 Stat 56
9 4 3 Math 43
10 1 6 Stat 35
11 3 3 Math 67
1
1 0 1 0
2 0 0 1
3 1 0 0
4 0 0 1
5 0 1 0
6 1 0 0
7 1 0 0
8 0 0 1
9 0 1 0
10 0 0 1
11 0 1 0
2
[41]: <matplotlib.collections.PathCollection at 0x2c0408da1f0>
print(fit1.summary())
3
Eco 1.2094 8.643 0.140 0.893 -19.227 21.646
Stat 7.2330 6.467 1.118 0.300 -8.060 22.526
==============================================================================
Omnibus: 13.930 Durbin-Watson: 1.451
Prob(Omnibus): 0.001 Jarque-Bera (JB): 8.700
Skew: 1.562 Prob(JB): 0.0129
Kurtosis: 5.763 Cond. No. 21.9
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly
specified.
C:\Users\Nazakat ali\anaconda3\lib\site-packages\scipy\stats\stats.py:1603:
UserWarning: kurtosistest only valid for n>=20 … continuing anyway, n=12
warnings.warn("kurtosistest only valid for n>=20 … continuing "
[37]: residual=fit1.resid
probplt=s.ProbPlot(residual, stats.norm, fit=True)
fig=probplt.qqplot(line='45')
h=plt.title('qqplot of residuals')