#OK to post homework #Zhizhang Deng, 12/02/2020, Assignment 17a 1. Year 2000: Total electorial vote is 538. Outcome is 271 - 267 coeff(GFv(USEC(), x), x, 271) = 16965465344318 ways Year 2004: Total electorial vote is 537 where Minnesota only voted 9 votes when it has 10 votes. Outcome is 286 - 251 data := USEC(); [3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 18, 20, 20, 29, 29, 38, 55] # now we make a 10 to 9 due to Minnesota data := [3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 18, 20, 20, 29, 29, 38, 55] coeff(GFv(data, x), x, 286) = 16161969590617 ways Year 2008: Total electorial vote is 538 Outcome is 365 - 173 coeff(GFv(USEC(), x), x, 365) = 3182416524832 ways Year 2012: Total electorial vote is 538 Outcome is 332 - 206 coeff(GFv(USEC(), x), x, 332) = 8628577597686 Year 2016: Total electorial vote is 531 Outcome is 227 - 304 - 7 Assuming this 7 votes for others is added to 227, making a outcome as 234 - 304 coeff(GFv(USEC(), x), x, 234) = 13873406885786 ways 2. (i). eqn := GFvp(USEC(), 1/2, x) evalf(add(coeff(eqn, x, n), n = 270 .. 538)) = .4962304641 (ii). From 2000 - 2016, lists of winner votes is: lst := [271, 286, 365, 332, 304] seq(evalf(add(coeff(eqn, x, n), n = lst[i] .. 538)), i = 1 .. 5) = .4886926154, .3774150266, 0.2906376147e-1, .1138587085, .2558478272 3. Observed value: res := [seq(SimuCount(USEC(), 3/10, 2000, 4), i = 1 .. 4)] = [[163.8520000, 47.02447338, .2816623650, 2.935646384], .4170000000, [161.7525000, 46.79671190, .2920772324, 2.918609751], .4115000000, [162.9730000, 46.83705020, .2810178755, 2.901708903], .4085000000, [162.2635000, 46.23926976, .2913412550, 2.765843725], .4205000000] Theoretical value: evalf(StatAnal(GFvp(USEC(), 3/10, x), x, 4)) = [161.4000000, 46.65683230, .2695069204, 2.844567676] Expectation, standard-deviation, 3rd, 4th momentum are very close to each other and are close to the theoretical value. As for the probability of consistency, it seems like it's around 41%. And the four runes are very close to each other on this one as well.