Incumbency in Congressional Elections (BDA 14.3)

This notebook page reproduces analysis done in BDA 14.3, which investigates the advantage of incumbents in congressional elections.


In [1]:
% pylab inline
from pandas import *


Populating the interactive namespace from numpy and matplotlib

Here, we read congressional election results from 1902 to 1992 from BDA book website.


In [2]:
# construct a list of DataFrames for each year
dfs = []
# it seems like years prior to 1990 were not analyzed in the book
for year in range(1900, 1994, 2):
    year_df = read_csv("http://www.stat.columbia.edu/~gelman/book/data/incumbency/%d.asc" % year,
             delimiter=r"\s+", header=None)    
    year_df['year'] = year
    dfs.append(year_df)
incumbency_df = concat(dfs)
incumbency_df.rename(columns={0:'state',1:'district',2:'incumbency',3:'democratic',4:'republican'},
                     inplace=True)
# compute proportion of democratic votes
incumbency_df['demoprop'] = incumbency_df['democratic'] / \
        (incumbency_df['democratic'] + incumbency_df['republican'])

Preprocessed data look like belows. state and district columns identify the district, while democratic and republican are the number of votes each party received. incumbency is +1 if Democrats controled the seat and -1 if Republicans controled the seat before the election.


In [3]:
incumbency_df.head()


Out[3]:
state district incumbency democratic republican year demoprop
0 1 1 -1 16836 25048 1900 0.401967
1 1 2 -1 28349 33205 1900 0.460555
2 1 3 -1 9284 14727 1900 0.386656
3 1 4 -1 20520 29579 1900 0.409589
4 2 1 0 10040 17803 1900 0.360593

For illustration, let us look at how the election result in 1986 is correlated with that in 1988. For this, we create a separate DataFrame for each year.


In [4]:
df_1986 = incumbency_df.loc[(incumbency_df['year'] == 1986),('state','district','democratic','republican','demoprop')]
df_1988 = incumbency_df.loc[incumbency_df['year'] == 1988,('state','district','democratic','republican','demoprop','incumbency')]
df_1986 = df_1986.rename(columns={'demoprop':'demoprop1986','democratic':'democratic1986','republican':'republican1986'})
df_1988 = df_1988.rename(columns={'demoprop':'demoprop1988','incumbency':'incumbency1988','democratic':'democratic1988','republican':'republican1988'})

Then, we merge them by district.


In [5]:
df_1986_1988 = merge(df_1986, df_1988, on=('state', 'district'))

We are only interested in cases Democratic and Republican candidates competed with each other.


In [6]:
# filter out cases 
filtered_df_1986_1988 = df_1986_1988.loc[(df_1986_1988['democratic1986'] > 0) & (df_1986_1988['republican1986'] > 0) &\
        (df_1986_1988['democratic1988'] > 0) & (df_1986_1988['republican1988'] > 0)]

In [7]:
filtered_df_1986_1988.head(20)


Out[7]:
state district democratic1986 republican1986 demoprop1986 democratic1988 republican1988 demoprop1988 incumbency1988
0 1 1 128930 44122 0.745036 176463 51985 0.772443 1
1 1 2 109229 52869 0.673845 143326 81965 0.636182 1
2 1 3 114276 49806 0.696457 147394 74275 0.664928 1
3 1 4 66999 77212 0.464590 55751 147843 0.273834 -1
4 1 5 63371 98664 0.391095 58612 163729 0.263613 -1
5 1 6 62133 111304 0.358245 78814 157020 0.334193 -1
6 2 1 121848 100260 0.548598 190989 111125 0.632175 1
7 2 2 43614 148770 0.226703 85346 167229 0.337904 -1
8 3 1 32396 113653 0.221816 38907 186356 0.172718 -1
15 3 8 104651 40259 0.722179 165745 40316 0.804349 1
17 3 10 121578 49451 0.710862 187178 93564 0.666726 1
19 4 1 54787 70739 0.436459 86623 131824 0.396540 -1
20 4 2 29688 85479 0.257782 89677 119742 0.428218 -1
21 5 1 85077 62397 0.576895 84141 105506 0.443672 1
22 5 2 44586 113603 0.281853 56129 145218 0.278768 -1
24 11 98 106351 53767 0.664204 158338 76179 0.675166 1
25 12 1 93497 29175 0.762171 141988 60037 0.702824 1
26 12 2 83821 35167 0.704449 134505 67759 0.664997 1
27 12 3 73743 51882 0.587009 117024 107479 0.521258 1
28 12 4 49290 78699 0.385111 79066 155283 0.337386 -1

Figure 14.1 which shows the proportion of Democratic vote as a function of that in 1988 is reproduced below. Two variables seems to have very strong linear relationship, and it seems critical to use previous year's result as a covariate variable.


In [8]:
fig, ax = plt.subplots()
filtered_df_1986_1988[filtered_df_1986_1988['incumbency1988'] != 0].plot('demoprop1986', 'demoprop1988', kind='scatter', marker='.', ax=ax)
filtered_df_1986_1988[filtered_df_1986_1988['incumbency1988'] == 0].plot('demoprop1986', 'demoprop1988', kind='scatter', marker='o', facecolors='none', ax=ax)
ax.set_xlim(-.05,1.05)
ax.set_ylim(-.05,1.05)
ax.set_xlabel('Democratic vote in 1986')
ax.set_ylabel('Democratic vote in 1988')
ax.set_aspect('equal')
plt.show()


Now, we learn a linear model for each year's election result to estimate the effect of incumbency.


In [9]:
# first, come up with the list of years we will learn linear model on
years = unique(incumbency_df['year'])

In [20]:
medians = []
for index in range(1, len(years)):
    now_year = years[index]
    prev_year = years[index - 1]
    df_prev = incumbency_df.loc[(incumbency_df['year'] == prev_year),('state','district','demoprop','democratic','republican')]
    df_now = incumbency_df.loc[incumbency_df['year'] == now_year,('state','district','demoprop','incumbency','democratic','republican')]
    df_prev = df_prev.rename(columns={'demoprop':'demoprop_prev','democratic':'democratic_prev','republican':'republican_prev'})
    df_now = df_now.rename(columns={'demoprop':'demoprop_now','democratic':'democratic_now','republican':'republican_now'})
    df_now['is_incumbent'] = abs(df_now['incumbency'])
    df_now['constant'] = 1    
    df_prev_now = merge(df_prev, df_now, on=('state', 'district'))
    df_prev_now = df_prev_now.loc[(df_prev_now['democratic_now'] > 0) & (df_prev_now['republican_now'] > 0) & \
                              (df_prev_now['democratic_prev'] > 0) & (df_prev_now['republican_prev'] > 0)]
    df_prev_now['incumbent_party'] = (df_prev_now['demoprop_prev'] > 0.5).map({True:1,False:-1})
    
    df_prev_now['prevprop'] = df_prev_now['demoprop_prev']
    df_prev_now['nowprop'] = df_prev_now['demoprop_now']
    df_prev_now.loc[df_prev_now['demoprop_prev'] < 0.5, 'prevprop'] = 1.0 - df_prev_now['demoprop_prev'][df_prev_now['demoprop_prev'] < 0.5]
    df_prev_now.loc[df_prev_now['demoprop_prev'] < 0.5, 'nowprop'] = 1.0 - df_prev_now['demoprop_now'][df_prev_now['demoprop_prev'] < 0.5]
    
    X = matrix(df_prev_now.loc[:,('constant', 'is_incumbent', 'incumbent_party','prevprop')].as_matrix())
    y = matrix(df_prev_now.loc[:,('nowprop')].as_matrix()).T
    XtX = X.T * X
    Xty = X.T * y
    beta_hat = linalg.solve(XtX, Xty)
    medians.append(beta_hat[1,0])
    if now_year == 1988:
        print beta_hat
        print medians
        #break


[[ 0.14534019]
 [ 0.1139545 ]
 [-0.00522071]
 [ 0.62840951]]
[0.0019195806729165074, 0.01972658075641779, 0.0016997590173346022, -0.0032784537691771388, -0.0021820901831764174, -0.0007851733458413521, 0.0081958335306211109, -0.0064443406235737523, 0.010741442399438113, 0.0034023656908457657, -0.0015133612278730381, 0.0091955066917765605, -0.010569319274621595, 0.025496882436096047, 0.02139375934904254, -0.00055946682490948263, 0.010144602686085486, 0.019863680631801162, 0.018738754275532198, 0.0028761506806991343, 0.010615676162485085, 0.025109704603547989, -0.012287067383441449, 0.010152930134022161, 0.0030081385045218701, 0.012728862820039747, 0.02356080511601082, 0.02262350550043726, 0.027621822394866082, 0.048273856560154531, 0.011371925919593519, 0.031405224561749545, 0.095918433962167413, 0.023370542893507342, 0.059533378771127632, 0.0703075801674867, 0.059985050818511257, 0.074766069841745511, 0.10006561934919177, 0.0762117832282945, 0.030430170359919597, 0.10950050996641039, 0.10945305381689718, 0.11395450279835834]

In [19]:
plt.scatter(years[1:], medians)


Out[19]:
<matplotlib.collections.PathCollection at 0x113faae10>

In [17]:
df_prev_now['residual'] = y - X * beta_hat
fig, ax = plt.subplots()
df_prev_now[df_prev_now['is_incumbent'] == 1].plot('prevprop', 'residual', kind='scatter', marker='.', ax=ax)
df_prev_now[df_prev_now['is_incumbent'] == 0].plot('prevprop', 'residual', kind='scatter', marker='o', facecolors='none', ax=ax)
#filtered_df_1986_1988[filtered_df_1986_1988['incumbency1988'] == 0].plot('demoprop1986', 'demoprop1988', kind='scatter', marker='o', facecolors='none', ax=ax)
#ax.set_xlim(-.05,1.05)
#ax.set_ylim(-.05,1.05)
#ax.set_xlabel('Democratic vote in 1986')
#ax.set_ylabel('Democratic vote in 1988')
#ax.set_aspect('equal')
plt.show()



In [11]:
df_prev_now['prevprop']


Out[11]:
0     0.745036
1     0.673845
2     0.696457
3     0.535410
4     0.608905
5     0.641755
6     0.548598
7     0.773297
8     0.778184
15    0.722179
17    0.710862
19    0.563541
20    0.742218
21    0.576895
22    0.718147
...
417    0.659929
418    0.783784
419    0.617038
420    0.601865
422    0.540672
423    0.604747
424    0.513825
426    0.735501
427    0.720640
428    0.747230
429    0.712112
430    0.726371
431    0.652021
432    0.578890
433    0.612514
Name: prevprop, Length: 313, dtype: float64

In [13]:
df_prev_now['residual'] = y - X * beta_hat

In [14]:
df_prev_now.head()


Out[14]:
state district demoprop_prev democratic_prev republican_prev demoprop_now incumbency democratic_now republican_now is_incumbent constant incumbent_party prevprop nowprop residual
0 1 1 0.745036 128930 44122 0.772443 1 176463 51985 1 1 1 0.745036 0.772443 0.050181
1 1 2 0.673845 109229 52869 0.636182 1 143326 81965 1 1 1 0.673845 0.636182 -0.041343
2 1 3 0.696457 114276 49806 0.664928 1 147394 74275 1 1 1 0.696457 0.664928 -0.026806
3 1 4 0.464590 66999 77212 0.273834 -1 55751 147843 1 1 -1 0.535410 0.726166 0.125194
4 1 5 0.391095 63371 98664 0.263613 -1 58612 163729 1 1 -1 0.608905 0.736387 0.089230

In [12]:
import statsmodels.api as sm

In [60]:
est = sm.OLS(y, X)

In [61]:
est = est.fit()
est.summary()


Out[61]:
OLS Regression Results
Dep. Variable: y R-squared: 0.491
Model: OLS Adj. R-squared: 0.486
Method: Least Squares F-statistic: 99.27
Date: Tue, 10 Mar 2015 Prob (F-statistic): 5.14e-45
Time: 21:39:22 Log-Likelihood: 414.98
No. Observations: 313 AIC: -822.0
Df Residuals: 309 BIC: -807.0
Df Model: 3
Covariance Type: nonrobust
coef std err t P>|t| [95.0% Conf. Int.]
const 0.1453 0.031 4.675 0.000 0.084 0.207
x1 0.1140 0.015 7.546 0.000 0.084 0.144
x2 -0.0052 0.004 -1.394 0.164 -0.013 0.002
x3 0.6284 0.040 15.907 0.000 0.551 0.706
Omnibus: 5.694 Durbin-Watson: 1.890
Prob(Omnibus): 0.058 Jarque-Bera (JB): 6.634
Skew: -0.177 Prob(JB): 0.0363
Kurtosis: 3.619 Cond. No. 20.6

In [128]:
prev_year


Out[128]:
1986

In [119]:
df_prev_now['prevprop'] = df_prev_now['demoprop_prev']
df_prev_now['nowprop'] = df_prev_now['demoprop_now']
df_prev_now['prevprop'][df_prev_now['demoprop_prev'] < 0.5] = 1.0 - df_prev_now['demoprop_prev'][df_prev_now['demoprop_prev'] < 0.5]
df_prev_now['nowprop'][df_prev_now['demoprop_prev'] < 0.5] = 1.0 - df_prev_now['demoprop_now'][df_prev_now['demoprop_prev'] < 0.5]

In [124]:
df_prev_now


Out[124]:
state district demoprop_prev demoprop_now incumbency is_incumbent constant incumbent_party prevprop nowprop
0 1 1 0.745036 0.772443 1 1 1 1 0.745036 0.772443
1 1 2 0.673845 0.636182 1 1 1 1 0.673845 0.636182
2 1 3 0.696457 0.664928 1 1 1 1 0.696457 0.664928
3 1 4 0.464590 0.273834 -1 1 1 -1 0.535410 0.726166
4 1 5 0.391095 0.263613 -1 1 1 -1 0.608905 0.736387
5 1 6 0.358245 0.334193 -1 1 1 -1 0.641755 0.665807
6 2 1 0.548598 0.632175 1 1 1 1 0.548598 0.632175
7 2 2 0.226703 0.337904 -1 1 1 -1 0.773297 0.662096
8 3 1 0.221816 0.172718 -1 1 1 -1 0.778184 0.827282
15 3 8 0.722179 0.804349 1 1 1 1 0.722179 0.804349
17 3 10 0.710862 0.666726 1 1 1 1 0.710862 0.666726
19 4 1 0.436459 0.396540 -1 1 1 -1 0.563541 0.603460
20 4 2 0.257782 0.428218 -1 1 1 -1 0.742218 0.571782
21 5 1 0.576895 0.443672 1 1 1 1 0.576895 0.443672
22 5 2 0.281853 0.278768 -1 1 1 -1 0.718147 0.721232
24 11 98 0.664204 0.675166 1 1 1 1 0.664204 0.675166
25 12 1 0.762171 0.702824 1 1 1 1 0.762171 0.702824
26 12 2 0.704449 0.664997 1 1 1 1 0.704449 0.664997
27 12 3 0.587009 0.521258 1 1 1 1 0.587009 0.521258
28 12 4 0.385111 0.337386 -1 1 1 -1 0.614889 0.662614
29 12 5 0.254316 0.237979 -1 1 1 -1 0.745684 0.762021
30 12 6 0.704573 0.616187 1 1 1 1 0.704573 0.616187
31 12 7 0.209586 0.253913 -1 1 1 -1 0.790414 0.746087
33 12 9 0.690236 0.675042 1 1 1 1 0.690236 0.675042
35 12 11 0.319806 0.295192 -1 1 1 -1 0.680194 0.704808
36 12 12 0.365143 0.301439 -1 1 1 -1 0.634857 0.698561
37 12 13 0.346410 0.305193 -1 1 1 -1 0.653590 0.694807
38 12 14 0.725803 0.687410 1 1 1 1 0.725803 0.687410
39 13 1 0.547841 0.507927 1 1 1 1 0.547841 0.507927
40 13 2 0.665100 0.616466 1 1 1 1 0.665100 0.616466
... ... ... ... ... ... ... ... ... ... ...
402 71 29 0.853305 0.858410 1 1 1 1 0.853305 0.858410
403 71 30 0.637869 0.622409 1 1 1 1 0.637869 0.622409
404 71 31 0.717798 0.736979 1 1 1 1 0.717798 0.736979
405 71 32 0.699380 0.693365 1 1 1 1 0.699380 0.693365
406 71 33 0.272098 0.275149 -1 1 1 -1 0.727902 0.724851
407 71 34 0.603327 0.643780 1 1 1 1 0.603327 0.643780
408 71 35 0.231473 0.282049 -1 1 1 -1 0.768527 0.717951
409 71 36 0.571130 0.559706 1 1 1 1 0.571130 0.559706
410 71 37 0.363160 0.339708 -1 1 1 -1 0.636840 0.660292
411 71 38 0.433965 0.374041 1 1 1 -1 0.566035 0.625959
412 71 39 0.235454 0.235471 -1 1 1 -1 0.764546 0.764529
413 71 40 0.387042 0.308268 0 0 1 -1 0.612958 0.691732
414 71 41 0.309315 0.320033 -1 1 1 -1 0.690685 0.679967
415 71 42 0.253184 0.339475 0 0 1 -1 0.746816 0.660525
416 71 43 0.247112 0.263655 -1 1 1 -1 0.752888 0.736345
417 71 44 0.659929 0.620585 1 1 1 1 0.659929 0.620585
418 71 45 0.216216 0.244993 -1 1 1 -1 0.783784 0.755007
419 72 1 0.617038 0.695886 1 1 1 1 0.617038 0.695886
420 72 2 0.398135 0.373377 -1 1 1 -1 0.601865 0.626623
422 72 4 0.540672 0.719846 1 1 1 1 0.540672 0.719846
423 72 5 0.395253 0.498410 -1 1 1 -1 0.604747 0.501590
424 73 1 0.486175 0.446130 -1 1 1 -1 0.513825 0.553870
426 73 3 0.735501 0.501437 0 0 1 1 0.735501 0.501437
427 73 4 0.279360 0.254708 -1 1 1 -1 0.720640 0.745292
428 73 5 0.747230 0.763888 1 1 1 1 0.747230 0.763888
429 73 6 0.712112 0.675995 1 1 1 1 0.712112 0.675995
430 73 7 0.726371 0.763288 0 0 1 1 0.726371 0.763288
431 73 8 0.347979 0.291337 -1 1 1 -1 0.652021 0.708663
432 81 98 0.421110 0.373454 -1 1 1 -1 0.578890 0.626546
433 82 1 0.387486 0.440967 -1 1 1 -1 0.612514 0.559033

321 rows × 10 columns


In [101]:
df_prev_now['demoprop_prev'] > 0.5


Out[101]:
0      True
1      True
2      True
3     False
4     False
5     False
6      True
7     False
8     False
15     True
17     True
19    False
20    False
21     True
22    False
...
417     True
418    False
419     True
420    False
422     True
423    False
424    False
426     True
427    False
428     True
429     True
430     True
431    False
432    False
433    False
Name: demoprop_prev, Length: 321, dtype: bool

In [96]:
df_prev_now


Out[96]:
state district demoprop_prev demoprop_now incumbent_party constant is_incumbent
0 1 1 0.745036 0.772443 1 1 1
1 1 2 0.673845 0.636182 1 1 1
2 1 3 0.696457 0.664928 1 1 1
3 1 4 0.464590 0.273834 -1 1 1
4 1 5 0.391095 0.263613 -1 1 1
5 1 6 0.358245 0.334193 -1 1 1
6 2 1 0.548598 0.632175 1 1 1
7 2 2 0.226703 0.337904 -1 1 1
8 3 1 0.221816 0.172718 -1 1 1
15 3 8 0.722179 0.804349 1 1 1
17 3 10 0.710862 0.666726 1 1 1
19 4 1 0.436459 0.396540 -1 1 1
20 4 2 0.257782 0.428218 -1 1 1
21 5 1 0.576895 0.443672 1 1 1
22 5 2 0.281853 0.278768 -1 1 1
24 11 98 0.664204 0.675166 1 1 1
25 12 1 0.762171 0.702824 1 1 1
26 12 2 0.704449 0.664997 1 1 1
27 12 3 0.587009 0.521258 1 1 1
28 12 4 0.385111 0.337386 -1 1 1
29 12 5 0.254316 0.237979 -1 1 1
30 12 6 0.704573 0.616187 1 1 1
31 12 7 0.209586 0.253913 -1 1 1
33 12 9 0.690236 0.675042 1 1 1
35 12 11 0.319806 0.295192 -1 1 1
36 12 12 0.365143 0.301439 -1 1 1
37 12 13 0.346410 0.305193 -1 1 1
38 12 14 0.725803 0.687410 1 1 1
39 13 1 0.547841 0.507927 1 1 1
40 13 2 0.665100 0.616466 1 1 1
... ... ... ... ... ... ... ...
402 71 29 0.853305 0.858410 1 1 1
403 71 30 0.637869 0.622409 1 1 1
404 71 31 0.717798 0.736979 1 1 1
405 71 32 0.699380 0.693365 1 1 1
406 71 33 0.272098 0.275149 -1 1 1
407 71 34 0.603327 0.643780 1 1 1
408 71 35 0.231473 0.282049 -1 1 1
409 71 36 0.571130 0.559706 1 1 1
410 71 37 0.363160 0.339708 -1 1 1
411 71 38 0.433965 0.374041 1 1 1
412 71 39 0.235454 0.235471 -1 1 1
413 71 40 0.387042 0.308268 0 1 0
414 71 41 0.309315 0.320033 -1 1 1
415 71 42 0.253184 0.339475 0 1 0
416 71 43 0.247112 0.263655 -1 1 1
417 71 44 0.659929 0.620585 1 1 1
418 71 45 0.216216 0.244993 -1 1 1
419 72 1 0.617038 0.695886 1 1 1
420 72 2 0.398135 0.373377 -1 1 1
422 72 4 0.540672 0.719846 1 1 1
423 72 5 0.395253 0.498410 -1 1 1
424 73 1 0.486175 0.446130 -1 1 1
426 73 3 0.735501 0.501437 0 1 0
427 73 4 0.279360 0.254708 -1 1 1
428 73 5 0.747230 0.763888 1 1 1
429 73 6 0.712112 0.675995 1 1 1
430 73 7 0.726371 0.763288 0 1 0
431 73 8 0.347979 0.291337 -1 1 1
432 81 98 0.421110 0.373454 -1 1 1
433 82 1 0.387486 0.440967 -1 1 1

321 rows × 7 columns


In [97]:
prev_year


Out[97]:
1986

In [67]:
beta_hat


Out[67]:
matrix([[ 0.13487107],
        [ 0.02991895],
        [ 0.03331865],
        [ 0.79351264]])

In [68]:
now_year


Out[68]:
1906

In [33]:
sum(incumbency_df['democratic'] < 0)


Out[33]:
1242

In [34]:
sum(incumbency_df['republican'] < 0)


Out[34]:
1169

In [45]:
unique(df_1986_1988['democratic1986'])


Out[45]:
array([128930, 109229, 114276,  66999,  63371,  62133, 121848,  43614,
        32396,  91033, 120222, 134387, 113690, 131051, 124183, 104651,
       110026, 121578, 114926,  54787,  29688,  85077,  44586,      0,
       106351,  93497,  83821,  73743,  49290,  32145,  67460,  24462,
        57820,  89634,  46666,  35280,  41967,  43920,  63057,  67139,
        69771,  83985,  43581,  49728,  58317,  62836,  70605,  50738,
        76318,  41689,  42138,  61089,  27950,  42147,     -9,  95094,
        43343,  66359,  28339,  36852, 140759,  49225,  33864,  82491,
       103908,  34194,  86777,  67574,  99745, 109256,  56898,  88224,
       128399, 107804,  86133,  45648,  98142,  69557,  85731,  40248,
       112405,  97135,  71381, 104726,  56972,  34399,  36157, 104164,
        37223, 136638,  26324, 131650,  63875, 122376,  99268, 102949,
        57925,  82466,  32064,  90761,  82873,  92738,  28990, 106970,
        25536,  38874,  70293,  46087,  85442,  56331, 111105, 126556,
        65722,  97585,  86983, 102456,  75932,  43105,  80772,  53431,
        49675, 106662, 120586,  68817,  94307,  55204,  78720,  41624,
        40608,  74927, 101225,  97406,  49702,  74941,  53180,  87643,
        76435,  92328,  77950, 101659, 105031,  39144,  90477,  43448,
        98311,  26320,  54864,  42155,  46195, 105646,  44847, 104740,
        42727,  88612,  83257,  55750,  36639, 112855, 126526,  97814,
       110976,  99878, 106288, 106919,  58445, 120354, 109506, 106700,
        57265,  38636,  43985,  55903,  83504, 107271,  58552,  78807,
        43359, 110737, 111164,  47540, 125115,  94048,  54261, 112662,
       105410, 110598,  93903, 135718,  91044,  93538, 116403, 129471,
       101030,  73155,  56291,  71532,  95939,  67137,  70372,  59182,
       216258, 171462,  63364,  54491,  32961,  64699,  73085,  88230,
        44965,  59864,  63292,  57568, 115127, 132881, 125406, 139608,
       108126, 105773, 128814,  36726, 115335,  97465, 110120, 143583,
        68574,  49559, 149036,  62694, 171961, 121213,  80047,  99203,
        69440,  72482,  75850,  75892,  93229,  51352,  88636,  82254,
        84303,  79548, 109205,  96864,  59870,  73119,  80575,  85819,
        16143,  91122,  95320,  71460,  92216,  86410,  72250,  70471,
        80959,  76240,  62035,  91575,  55262,  63592,  79109,  67012,
        95859,  92398,  84445,  78529,  97540,  57410,  68270,  17635,
        30617,  73285, 135863,  84201,  84831,  45907,  67852,  70777,
        50590,  97791,  63335,  42129,  55363,  63779,  30079,  68131,
        69368,  67435,  47651,  64165,  64315,  57644,  81943,  53906,
        26315,  90619,  88113,  68200, 100161,  65075,  82098, 102975,
        79226,  82825,  61663, 114543, 114008,  94984,  45256,  36278,
        30088,  75034,  86997,  85126, 102180,  35966, 101699,  83006,
        90715,  76355,  73669,  58217,  51163,  77239,  66894,  64848,
       106113,  91223,  95353,  50672,  52488,  53834,  59723, 103035,
        98501,  73583,  61830,  59433,  37138,  45924,  95760,  77180,
        76921,  42582,  48780, 138174,  74602, 158709, 128364, 122688,
       142946, 124174, 121790, 113490,  84240, 112380,  69564, 107696,
        53597,  93600, 128151,  58682, 101480,  45619,  49027,  54497,
        44036, 121468, 103914,  62692,  98091, 110403,  92635,  78132,
        59369,  77126,  90739,  44312,  66404,  38322,  78118,  69808,
        50625,  42377,  75664,  59816,  47586,  45078,  70557,  32800,
       141585,  75124, 180067, 105697,  82290,  92697, 124840, 114775,
        41709, 121732,  90063, 124317,  57545,  74053,  63061, 123830])

In [ ]: