27. sensitivity analysis

37
Insight Through Computing 27. Sensitivity Analysis Congressional Apportionment Sensitivity Analysis

Upload: darryl

Post on 14-Jan-2016

41 views

Category:

Documents


0 download

DESCRIPTION

27. Sensitivity Analysis. Congressional Apportionment Sensitivity Analysis. Quantifying Fairness. How do you distribute 435 Congressional seats among the 50 states so that the ratio of population to delegation size is roughly the same from state to state?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 27. Sensitivity Analysis

Insight Through Computing

27. Sensitivity Analysis

Congressional ApportionmentSensitivity Analysis

Page 2: 27. Sensitivity Analysis

Insight Through Computing

Quantifying Fairness

How do you distribute 435 Congressional seats among the 50 states so that the ratio of population to delegation size is roughly the same from state to state?

Quite possibly one of the greatest division problems of all time!

Page 3: 27. Sensitivity Analysis

Insight Through Computing

Quantifying Importance

How do you rank web pages for importance

given that you know the link structureof the Web, i.e., the in-links and out-linksfor each web page.

Quite possibly one of the greatest ranking problems of all time!

Page 4: 27. Sensitivity Analysis

Insight Through Computing

Related Questions

How “close” is a state to losing a Congressional district because of population changes?

How to do new or deleted links that involve a web page affect its PageRank?

Page 5: 27. Sensitivity Analysis

Insight Through Computing

Reasoning About Change

Sensitivity analysis:

How does the “answer” change if theinput data changes or if theassumptions that underlie the computation change?

VERY IMPORTANT IN SCIENCE & ENGINEERING

Page 6: 27. Sensitivity Analysis

Insight Through Computing

An Earlier Example

MyPi = 3.14;

R = 3961.12345;

EarthArea = 4*MyPi*R*R

Math error in MyPi, measurement error in R, model error in spherical model, rounding error in arithmetic.

Page 7: 27. Sensitivity Analysis

Insight Through Computing

Subtext

These examples provide distinct

opportunities to review ourprogramming techniques.

Page 8: 27. Sensitivity Analysis

Insight Through Computing

The ApportionmentProblem

Page 9: 27. Sensitivity Analysis

Insight Through Computing

Notation

Number of states: nState populations: p(1),…,p(n) Total Population: P State delegation size: d(1),…,d(n)Number of seats: D

Page 10: 27. Sensitivity Analysis

Insight Through Computing

Ideal: Equal Representation

Number of states: nState populations: p(1),…,p(n) Total Population: P State delegation size: d(1),…,d(n)Number of seats: D

)(

)(...

)1()1(

nd

npdp

D

P

Page 11: 27. Sensitivity Analysis

Insight Through Computing

29.376 435281424177

19004973)( NewYorkd

DP

p(i)id )(

i.e.,

And so for NY in 2000..

But delegation size must be a whole number!!!

Page 12: 27. Sensitivity Analysis

Insight Through Computing

More Realistic…

Number of states: nState populations: p(1),…,p(n) Total Population: P State delegation size: d(1),…,d(n)Number of seats: D

)(

)(...

)1()1(

nd

npdp

D

P

Page 13: 27. Sensitivity Analysis

Insight Through Computing

An Apportionment Method determinesdelegation sizes d(1),…,d(n) that arewhole numbers so that representationis approximately equal:

)(

)(...

)1()1(

nd

npdp

Definition

Page 14: 27. Sensitivity Analysis

Insight Through Computing

Jefferson Method 1790-1830

Decide on a ``common ratio’’, the idealnumber of constituents per district.

In 1790: r = 33000

Delegation size for the i-th state is

d(i) = floor( p(i)/r )

Page 15: 27. Sensitivity Analysis

Insight Through Computing

State Pop Reps Pop/Reps

Connecticut 236841 7 33834Delaware 55540 1 55540Georgia 70835 2 35417Kentucky 68705 2 34352Maryland 278514 8 34814Massachusetts 475327 14 33951New Hampshire 141822 4 35455New Jersey 179570 5 35914New York 331589 10 33158North Carolina 353523 10 35352Pennsylvania 432879 13 33298Rhode Island 68446 2 34223South Carolina 206236 6 34372Vermont 85533 2 42766Virginia 630560 19 33187

Page 16: 27. Sensitivity Analysis

Insight Through Computing

Jefferson Method 1790-1830

Population and the chosen common ratio

determine the size of Congress:

Year p r D 1790 3615920 33000 1051800 4889823 33000 1411810 6584255 35000 1811820 8969878 40000 2131830 11931000 47700 240

Page 17: 27. Sensitivity Analysis

Insight Through Computing

Webster Method 1840

d(i) = round( p(i) / 70680 )

CommonRatio

instead offloor

Size of Congress Also Determined By Common Ratio

Page 18: 27. Sensitivity Analysis

Insight Through Computing

Hamilton Method (1850-1900)

This method fixes the size of Congress.

Allocations are based on the “idealratio”:

Total Population / Total Number of Seats

Page 19: 27. Sensitivity Analysis

Insight Through Computing

The 1850 Case (31 States)

D = 234

r = 21840083 / 234 = 93334

% Round 1 allocation…for i=1:31 d(i) = floor( p(i)/r ) end

All but 14 of the 234 seats have been given out.

Page 20: 27. Sensitivity Analysis

Insight Through Computing

AL 6.798

AR 2.047

CA 1.768

CT 3.973

DE 0.971

FL 0.768

GA 8.073

IL 9.123

IN 10.590

IA 2.059

KY 9.622 LA 4.498 ME 6.248 MD 5.859 MA 10.655 MI 4.261 MS 5.171 MO 6.933 NH 3.407 NJ 5.244 NY 33.186

NC 8.074 OH 21.218 PA 24.769 RI 1.581 SC 5.513 TN 9.717 TX 2.028 VT 3.366 VI 13.207 WI 3.272

State Population / Ideal Ratio

Page 21: 27. Sensitivity Analysis

Insight Through Computing

AL 6.798

AR 2.047

CA 1.768

CT 3.973

DE 0.971

FL 0.768

GA 8.073

IL 9.123

IN 10.590

IA 2.059

KY 9.622 LA 4.498 ME 6.248 MD 5.859 MA 10.655 MI 4.261 MS 5.171 MO 6.933 NH 3.407 NJ 5.244 NY 33.186

NC 8.074 OH 21.218 PA 24.769 RI 1.581 SC 5.513 TN 9.717 TX 2.028 VT 3.366 VI 13.207 WI 3.272

floor(State Population / Ideal Ratio)

Page 22: 27. Sensitivity Analysis

Insight Through Computing

AL 6.798

AR 2.047

CA 1.768

CT 3.973

DE 0.971

FL 0.768

GA 8.073

IL 9.123

IN 10.590

IA 2.059

KY 9.622 LA 4.498 ME 6.248 MD 5.859 MA 10.655 MI 4.261 MS 5.171 MO 6.933 NH 3.407 NJ 5.244 NY 33.186

NC 8.074 OH 21.218 PA 24.769 RI 1.581 SC 5.513 TN 9.717 TX 2.028 VT 3.366 VI 13.207 WI 3.272

These 14 states most deserve an extra seat

Page 23: 27. Sensitivity Analysis

Insight Through Computing

Method of Equal Proportions

This method has been in use since 1940.

For the 2000 apportionment:

n = 50

D = 435

Determine the delegation sizes d(1:50)Given the state populations p(1:50).

Page 24: 27. Sensitivity Analysis

Insight Through Computing

Every State Gets At LeastOne District

So start with this:

d = ones(50,1)

Now “deal out” Congressional districts 51 through 435

Page 25: 27. Sensitivity Analysis

Insight Through Computing

Now Allocate the Rest…

for k = 51:435

Let i be the index of the state that most deserves an additional district.

d(i) = d(i) + 1;end

Page 26: 27. Sensitivity Analysis

Insight Through Computing

Most Deserving?

The Method of Small Divisors

At this point in the “card game” deal adistrict to the state having the largestquotient p(i)/d(i).

Tends to favor big states.

Page 27: 27. Sensitivity Analysis

Insight Through Computing

Most Deserving?

The Method of Large Divisors

At this point in the “card game” deal adistrict to the state having the largestquotient p(i)/( d(i) + 1).

Tends to favor small states

Page 28: 27. Sensitivity Analysis

Insight Through Computing

Most Deserving?

The Method of Major Fractions

At this point in the “card game” deal adistrict to the state having the largestvalue of

( p(i)/d(i) + p(i)/(d(i)+1) )/2

Compromise via the Arithmetic Mean

Page 29: 27. Sensitivity Analysis

Insight Through Computing

Most Deserving?

The Method of Equal Proportions

At this point in the “card game” deal adistrict to the state having the largestvalue of

sqrt( p(i)/d(i) * p(i)/(d(i)+1) )

Compromise via the Geometric Mean

Page 30: 27. Sensitivity Analysis

Insight Through Computing

Allocation Via Equal Proportions

for k = 51:435

[z,i] = max((p./d).*(p./{1+d)))

d(i) = d(i) + 1;

end

Page 31: 27. Sensitivity Analysis

Insight Through Computing

A Sensitivity Analysis

The 435th district was awarded to North Carolina.

Was that a “close call”? Is there another

state that “almost” won this last district?

Quantify.

Page 32: 27. Sensitivity Analysis

Insight Through Computing

Move from NC to UT

NC: 6.4593UT: 6.4568

North Carolina just beat out Utah for the last congressional seat.

Can show that if 670 people move from NC to UT, then NC loses a seat and UT gains one

Equal Proportionranking when dealing out the last district

Page 33: 27. Sensitivity Analysis

Insight Through Computing

Other Questions

If Puerto Rico and/or Washington DCbecome states and the total number of representatives remains at 435, thenwhat states lose a congressional seat?

If the population of New York remainsfixed and all other states grow by 5%during the2000-10 decade, then how

manyseats will NY lose?

Page 34: 27. Sensitivity Analysis

Insight Through Computing

A Useful Structure Array

C = CensusData

Assigns to the structure array C theapportionments and Census results for thecensus years 1890 through 2000.

C(k) houses information pertaining toThe k-th census/apportioment.

Page 35: 27. Sensitivity Analysis

Insight Through Computing

C has these Fields

year The year of the census. (1790,

1800,...,2000).

states k-by-16 char array that names

existing states during the census.

pop k-by-1 real array that

specifies the state populations.

reps k-by-1 real array that specifies

the state apportionments.

Page 36: 27. Sensitivity Analysis

Insight Through Computing

Example

Pop = C(10).pop;Reps = C(10).reps;P = 0; D = 0;for i=1:length(pop) P = P + Pop(i); D = D + Reps(i);Endr = P/D

Assigns the ideal ratio for the 10th census to r.

Page 37: 27. Sensitivity Analysis

Insight Through Computing

A Somewhat Related Problem

Gerrymandering:The Art of drawingdistrict boundaries So As to favor incumbents