Calculating Polls in Camelot

Each state has one or more districts.

D1 D2 D3 …

Each district has three top issues.

D1I1 D1I2 D1I3

Each district has a stance on its top three issues.

STANCE (S) POSSIBLE VALUES

Very Liberal (VL) -1.00 <= X < -0.50
Liberal (L) -0.50 <= X < -0.25
Moderate (M) -0.25 <= X <= 0.25
Conservative (C) 0.25 < X <= 0.50
Very Conservative (VC) 0.50 < X <= 1.00

D1I1(S) D1I2(S) D1I3(S)

A district’s stances on its top three issues are averaged to determine the district’s political orientation (DPO).

DPO = AVG ( D1I1(S) + D1I2(S) + D1I3(S) )

A candidate has stances on all issues.

C1I1(S) C1I2(S) C1I3(S) C1I4(S) C1I5(S) …

A candidate’s stances on all issues are averaged to determine the candidate’s political orientation (CPO).

CPO = AVG ( C1I1(S) + C1I2(S) + C1I3(S) + C1I4(S) + C1I5(S) + … )

A candidate’s stances on a district’s top three issues are averaged to determine the candidate’s district political orientation (CDPO).

CDPO = AVG ( C1I1(S) + C1I2(S) + C1I3(S) )

To determine a candidate’s district orientation difference (CDOD), subtract the district’s political orientation from the candidate’s district political orientation.

CDOD = CDPO – CPO

Divided the candidates into two groups by comparing the candidate’s district political orientation (CDPO) and the district’s political orientation (DPO).

Group 1 should contain the candidates whose CDPO equals the
district’s DPO.

Group 2 should contain the candidates whose CDPO does not equal the
district’s DPO.

Sort the candidates in each group by the absolute value (|x|) of their candidate district orientation different (CDOD), from lowest to highest.

Combine both groups of candidates into a single list, maintaining their individual sort orders and placing the candidates in Group 1 at the top of the list.

Assign a ranking integer to each candidate in the list, starting at the top and working down the list until you reach the end.

The ranking number should be initialized to the total number of candidates
still in the race.

After a ranking number is assigned to a candidate, subtract 1 from the
ranking number before assigning it to the next candidiate in the list.

DPO/CDPO S |CDOD| RANKING

District 1 0.25 M

Candidate 1 0.08 M 0.17 5
Candidate 2 0.33 C 0.08 4
Candidate 5 -0.35 L 0.60 3
Candidate 4 0.92 VC 0.67 2
Candidate 3 -0.67 VL 0.92 1

Perform this ranking for each district in the state.

RANKING
District 1 District 2 District 3
Candidate 1 5 4 3
Candidate 2 4 5 2
Candidate 3 1 1 4
Candidate 4 2 3 1
Candidate 5 3 2 5

Total up each candidate’s district rankings and calculate each percentages of the total.

Total Percentage
Candidate 1 12 27%
Candidate 2 11 24%
Candidate 3 6 13%
Candidate 4 6 13%
Candidate 5 10 22%

Sort the candidates by their percentages, from highest to lowest.

Candidate 1 27%
Candidate 2 24%
Candidate 5 22%
Candidate 3 13%
Candidate 4 13%

Combine the percentages (rounding up) of the candidates who do not rank first, second, or third in the list under the category “Other”.

Candidate 1 27%
Candidate 2 24%
Candidate 5 22%
Other 27%

These are the percentages that will be used in creating the state poll for the Primaries and State Detail screens.

| C1 | C2 | C3 | Other |

This entry was posted in Side Projects and tagged . Bookmark the permalink.

One Response to Calculating Polls in Camelot

  1. Pingback: Chris’ Feedback on Campaign Puppets | Objective.Me

Comments are closed.