Princeton Election Consortium

Innovations in democracy since 2004

Outcome: Biden 306 EV (D+1.2% from toss-up), Senate 50 D (D+1.0%)
Nov 3 polls: Biden 342 EV (D+5.3%), Senate 50-55 D (D+3.9%), House control D+4.6%
Moneyball states: President AZ NE-2 NV, Senate MT ME AK, Legislatures KS TX NC

MATLAB – gerrymandering code – delegations.m

ifirst=[1 8 9 18 22 75 82 87 88 115 128 131 133 151 160 164 168 174 180 182 190 199 213 221 225 233 234 237 241 243 255 258 285 298 299 315 320 325 343 345 352 353 362 398 402 403 414 424 427 435 436];

dsim=0;dactual=0;
for j=1:50
sdist=[ifirst(j):ifirst(j+1)-1];
gerry
p1(j)=outs(2);p2(j)=outs(3);
pmin(j)=min(outs(2:3));
seats_sim(j)=outs(4);
seats_act(j)=s_dseats;
% do something with outputs
dsim=dsim+outs(4);
dactual=dactual+s_dseats;
end
dsim
dactual
diffs=seats_act-seats_sim;
hist(diffs,[-3.7:0.2:3.2])
grid on
xlabel(‘Difference from simulated mean outcome (seats)’)
ylabel(‘Number of seats’)
sum(diffs(or(diffs<-1.2,diffs>1.2)))