The Population Paradox in Hamilton's Apportionment Method

The following table should help you do Problem 10 on page 535 of the Comap Text.
state      old census  old quota    new census  new quota
A             5525381   42.305         5657564   42.693
B             3470152   26.569         3507464   26.468
C             3864226   29.586         3885693   29.322
D              201203    1.540          201049    1.517
Here is the computer program which made the table.
#! /usr/bin/python

Aold = 5525381
Bold = 3470152
Cold = 3864226
Dold = 201203
OldStandardDivisor = (Aold+Bold+Cold+Dold)/100.0
AoldQuota=Aold/OldStandardDivisor
BoldQuota=Bold/OldStandardDivisor
ColdQuota=Cold/OldStandardDivisor
DoldQuota=Dold/OldStandardDivisor

Anew = 5657564
Bnew = 3507464
Cnew = 3885693
Dnew = 201049
NewStandardDivisor = (Anew+Bnew+Cnew+Dnew)/100.0
AnewQuota=Anew/NewStandardDivisor
BnewQuota=Bnew/NewStandardDivisor
CnewQuota=Cnew/NewStandardDivisor
DnewQuota=Dnew/NewStandardDivisor


print "state      old census  old quota    new census  new quota"
print  "A    ", str(Aold).rjust(15), ("%5.3f"%AoldQuota).rjust(8), str(Anew).rjust(15), ("%5.3f"%AnewQuota).rjust(8)
print  "B    ", str(Bold).rjust(15), ("%5.3f"%BoldQuota).rjust(8), str(Bnew).rjust(15), ("%5.3f"%BnewQuota).rjust(8)
print  "C    ", str(Cold).rjust(15), ("%5.3f"%ColdQuota).rjust(8), str(Cnew).rjust(15), ("%5.3f"%CnewQuota).rjust(8)
print  "D    ", str(Dold).rjust(15), ("%5.3f"%DoldQuota).rjust(8), str(Dnew).rjust(15), ("%5.3f"%DnewQuota).rjust(8)