Ranked Choice Voting – a final verdict and a “Winner”

Ranked Choice Voting – a final verdict and a “Winner”

My flirtation with Ranked Choice Voting has ended as many of my flirtations end: bewildered and alone with my thoughts.

As I disclosed early in the process, I went into this project thinking the United States isn’t ready for RCV, and this exercise and the recent stories from NYC confirm it.

exhibit A:

NYC Board of Elections throws mayoral primary into chaos by counting test ballots

Here is my working hypothesis, at this time, America’s Democracy is not strong enough to adopt Ranked Choice Voting.  It is too complex and that complexity invites doubts and questions.  Given that America can’t seem to handle counting first past the post ballots well, RCV is a ‘luxury’ that will do more harm than good.

ICE CREAM and RANKED CHOICE VOTING

This began as a simple weekend project.  Noting NYC was preparing the use RCV in their NYC Mayor’s race, we should practice polling and writing the code to tabulate / allocate the votes.

In theory, it should be easy.

1)  Test, does one “vote getter” receive more than 50% of the vote?  If so, declare winner, if not continue.

2)  Tabulate and rank vote getters.

3)  Eliminate lowest vote getter.

4)  Re-allocate votes of eliminated voter getter to next choice.

5)  Goto  Step 1.

Easy, right?

It has proven to be a challenge.

In part because I am not an expert.  In part because RCV has been implemented slightly differently in different jurisdictions.  In part because the press doesn’t understand or report the details past the superficial Steps 1-5.

Here are some of the challenges I ran into:

When presenting the ballot, which format do we use?  An array or multi-screen selection?  Both are used.  Do we program in error detection to stop people from making errors like repeating choices?  Paper ballots don’t, so we chose to allow people taking the poll to make errors.

When ranking, the first issue is write-ins.  Is ‘Peanut Butter Cup’ the same as ‘Peanutbutter Cup’?  We immediately have a classification issue.  I think best to avoid trying to interpret voter intent, so I ignored capitalization, but not spelling or spacing.  Not a huge deal, but a decision.

When ranking, how does one handle ties?  If three candidates / flavors are ranked and all tied – in what order does one eliminate the ties?  Turns out, my research showed there are three ways in use now.

In our case study, we had 219 respondents.  You can download the datafile here. Each respondent had up to 5 choices, each choice included the opportunity for a write in.  Some opted to make no choice or turned in a blank ballot.  Some used all 5 choices, some used 1 choice.  Some didn’t follow the rules and voted the same choice 5 times or repeated choices.

So essentially, we have a array of 219 rows x 5 choices.

When eliminating, how do we eliminate ?

For example, if we eliminate ‘Lemon’ in the first round, is ‘Lemon’ only eliminated for Round 1 OR is ‘Lemon’ eliminated from the entire array?  Meaning if ‘Lemon’ is eliminated in round 1, ‘Lemon’ is eliminated as a choice in all ballots in all subsequent rounds.

When spoiling a ballot, when do you spoil it and for how long?

I can write code in the beginning that can test for errors.  Did a voter rank ‘Lemon’ more than once?  If so, is the ballot spoiled at the beginning of counting completely – OR does it become spoiled at the time of counting the second erroneous “Lemon”?  Furthermore, if someone doesn’t follow the instructions in their 3rd ranking, is their ballot spoiled for all further counting?  or do we eliminate the error and move the the next ‘valid’ choice after the error?

If a choice is eliminated in a round and removes a ballot with an error, is the ballot still good? Do we ignore the error and keep the additional choices?

Say, a ranking of:

Butter Pecan, Lemon, Lemon, Chocolate, Vanilla.

Clearly this voter didn’t follow instructions.  They ranked Lemon twice.

If Lemon is eliminated in the very first round, does that allow become Butter Pecan, Chocolate, Vanilla and remain in the mix or do we throw it out at the beginning? Is the ballot spoiled or a vote for Chocolate?

Finally, how do we define WINNER? Do I use a fraction (any % over 50%) or whole numbers?  What is the denominator?  If a person’s ballot is exhausted, are they still counted in the denominator or are they now an under-vote?

It is exhausting. Can you imagine the Cyber Ninjas involved in this mess?

An Experiment in Ranked Choice Voting

So, here we go.  Here are my assumptions / decisions:

I erred on the side of trying to count votes.

I grouped write-ins only if they matched, but didn’t consider capitalization.

I did no error checking in the beginning, except for removing blank ballots.  They were undervotes and not counted in the calculations.

So, we began with 219 respondents.  Removing 11 blank ballots.  208 votes cast.  This is the first challenge, when testing if someone gets >50%, do we divide by 219 or 208?  In this case, I am using 208.

 Initial Tally – Rank Choice for Ice Cream

Initial Tally – RCV

So let’s go through our steps?

Step 1 – Test, does one candidate have over 50%?

As we see, we have NA or blank at 5%. We will filter those out moving forward.
AND we have a 11 way tie for “last place”.

But no one flavor exceeds 50%.

However, if the denominator is 219, Mint Chocolate Chip is at 20%, if the denominator is 208, Mint Chocolate chip is 21%.  We will see, this becomes a bigger deal as ballots become exhausted.

Step 2 – Tabulate and Rank Candidates

See above.

Step 3 – eliminate lowest vote getter.

At this early stage, we have 11 vote getters tied for the lowest (all write ins).

In what order do we eliminate these and re-allocate votes?

In my case, I am going to randomize the bottom 11 and eliminate them – BUT this could have material effects later as we may see. Is random better than another way? I don’t know. But, would this lead to replication issues in some type of audit? Maybe.

So in this case, let’s say I eliminate ‘Tiger tail’ (whatever flavor that is…must be a radical socialist).  The voter’s second selection after Tiger Tail was “Mint Chocolate Chip” so I eliminate Tiger Tail, replace with MCC and goto step 1.

Step 1-2 – no change.

Step 3 – our next randomized selection to eliminate “New York Super Fudge Chunk”  Now this respondent, is completely dedicated to “New York Super Fudge Chunk”.  In fact so much so, they ranked it 5 times.  Their ballot is invalid. 

So, I spoil the ballot.  Ok.  Is the denominator 207 now?  Yes.  New York Super Fudge Chunk is now an ‘under vote’. 

There are no votes to re-allocate. 

Goto step 1…..

So, you can see we are making lots of “micro” steps.  If we do it this way, (which I did, we end up with over 50 rounds of voting). 

There is another way.  For example, we will eventually eliminate “Neapolitan” which isn’t even a ‘flavor’ – it’s three flavors dumped into a box for those who can’t make up their minds, but I am off track)  Once I eliminate “Neapolitan” should I remove it from the entire array OR do I just remove it for that round – allowing it to come back in later rounds if it is the next choice of a voter?  I don’t know the answer and need a collaborator in math.  I chose NOT to delete it from the entire array and go round by round, allowing for a come back. 

The ramification of this decision was an ebb and flow of “major” eliminations then a series of “clean” up rounds.  Each clean up round had randomization due to the ties. 

An Ending to Ranked Choice Voting

Using this method, we are well into 50 plus “rounds”.

Towards, the end, we end up with a three way race:

A death match between:

  • Mint Chocolate Chip
  • Chocolate Chip Cookie Dough, and
  • Chocolate

At this point, we have 186 ballots still remaining that have not been “exhausted”  This means 219-186 = 33 ballots or 15% of ballots are no longer in play.  Whether error or dedication to third-party flavors, these ballots are now on the scrap bin.

In our case study, we eliminate Chocolate, and immediately have to do clean up.    Since I didn’t remove a flavor from the entire array and I am allowing comebacks – some Chocolate voters like “Birthday Cake”.  etc.

This is where my decision to allocate randomly could have an effect.   What vote pushes a candidate past 50%?

In our sample, we end up with

  • Mint Chocolate Chip at 48%
  • Chocolate Chip Cookie Dough at 45%.
  • And a three way tie at the bottom of :Cookies and Cream, Neapolitan (not a flavor), and Strawberry.
  • We also have Vanilla, Rocky Road, and chocolate chip in slightly more numbers.

I randomized, the bottom three for elimination.

ICE CREAM: RANK CHOICE VOTING

AND THE WINNER IS……

MINT CHOCOLATE CHIP!

 

In the end, of the 219 who turned in a ballot, 144 of them remained as non-exhausted or non-disqualified for a “rule” violation.   We lost one third of the ‘voters’.

However “51%” of the ballots choose Mint Chocolate Chip.

In the end, RCV remains confusing and complex.  The devil is in the details.

I am 100% positive that I have messed this up 10 different ways – yet I still declared a “winner.”

THAT, my friends, is the challenge.  As we have seen in New York – complexity can cast a shadow and lead to questions.    And that shadow leads to candidates and their teams casting doubts on the process.

How does that manifest itself?  Just like this statement from Adams in NYC:

CONCLUSION

The United States with its low trust in government and its institutions, is not ready for Ranked Choice Voting. 

RCV’s complexity and delays in counting could cast further doubts on the election process at a time when we just can’t afford it.

I look forward to your corrections, comments, because Lord knows, this is a mess.

Ranked Choice Voting – I am starting over!

As with some projects, and especially some coding projects, it is better to shut the lap – top and go for a walk.  Then start all over. That is where I find myself now. I was doing some additional research in how to account for ties: There are three ways – three different ways jurisdictions are handling this issue, and honestly, that is going to be an issue for RCV in moving forward.
  • Decided by lot
  • Most votes in previous round
  • Predetermined tie-breaking order and include in configuration or algorithm.
In fact, we have different jurisdictions defining ‘winner’ differently.  Does a candidate win when they hit 50% + X.  With X being a fractional amount or a whole number. Anyway, I am starting over after learning a lot – it is crucial to account for the ‘exceptions’ because democracy is messy as hell., and ain’t as easy as 1-2-3.
Ranked Choice Voting – I am about to give up

Ranked Choice Voting – I am about to give up

I am frustrated.  What should have been an easy 1-2-3 project has turned into a mess.

It seems by offering people ranking, people are getting to the point of “throwing” away their votes – even may be enjoying it.

Just when I think we are making progress towards declaring a winner, the dreaded write-ins come into play AND we are losing people along the way with their votes becoming spoiled or exhausted.   We are at the point were we are exhausting ballots of those who picked 5 – and none of them are cracking the top 10.

Take for example this round, we eliminated “Pitstachio” (which is a damn fine flavor, sorry to see it go….) however, Pitaschio voters are a non-compromising bunch – writing in “Green Tea” and “Birthday Cake” (which had already been eliminated).

In attempting to code this, I seem to be spending an incredibly inordinate amount of time dealing with write ins and “exceptions”.  While this is not abnormal for coding, it is reducing my enthusiam…and we persist.

But really – damn it, I want to know the “answer” not continue to deal with Pistachio’s garbage.

I am at the point, were I am going to run the code and not paste each round.  Next post will declare the winner….

Stay tuned….

Ranked Choice Voting – NOW WHAT

Ranked Choice Voting – NOW WHAT

WE ALL SCREAM FOR ICE CREAM!

I thought this was going to be easy….it is not.  It is complicated and it goes back to the old saying “those who county the votes…..”

Here is the challenge, again suppose to be easy….you eliminate the bottom vote getter and re-allocate their next choice.

Great – from last round we eliminate

Chocolate Peanut Butter

Then Neapolitan….

OK

Then we have a tie….again….in this case the random number generator says we should eliminate Strawberry.

Side / authors note:  Neapolitan.  It isn’t even a FLAVOR – it is a trash “flavor” for those who can’t make a decision. Come one, cowboy up and make yup your mind!

So we eliminate Strawberry.   We should be moving on and making progress – next for elimination is Chocolate Chip.  RIGHT?

DARN IT – Now we have another issue.  These Strawberry ranked choice voters are making my life hellish.

Eliminated Next Vote
Strawberry Chocolate
Strawberry Chocolate Chip Cookie Dough
Strawberry Cookies and Cream
Strawberry Rocky Road
Strawberry Cookies and Cream
Strawberry Vanilla
Strawberry Butter Pecan
Strawberry Mint Chocolate Chip

Some of the Strawberry’s next votes are for flavors that have already been eliminated!

What to do now?

Do I add these flavors back into the count and start eliminating from the smallest again?

Do I spoil those ballots, if you insist on voting for a crazy flavor with zero chance of winning, do I spoil your ballot now since that choice has already been eliminated? OR do I keep on applying them until the ballot is exhausted (remember, you only get 5 choices).

In this case, because I am a kind and benevolent dictator, I am NOT going to spoil the ballot and play it out to the end, but know this – I don’t like you.

Stay tuned…..

Ranked Choice Voting – Round 1

Ranked Choice Voting – Round 1

Round 1 – Ice Cream

And the winner is……

Nobody.  yet.

If you are flow charting out the tabulation, here are the easy as 1-2-3 steps:

  • Step 1 – is someone over 50%+1 (Y – declare winner, N – goto Step 2)
  • Step 2 – eliminate the lowest vote getter and reassign votes.  Easy, right?
  • Step 3 – goto Step 1.  Easy, Right?

Step 2 is causing me some heartburn, because we immediately begin to run into issues / challenges.

The lead vote getter is Mint Chocolate Chip with 21% of the vote.

It would appear we should eliminate “Neapolitan”, but that would be incorrect. Neapolitan has three round 1 votes.

We first must deal with write ins, because some of them receive less than 3 votes.

The verbatim write ins are as follows:

We now have to decide on a classification for write ins.  Is Chocolate peanut butter the same as Chocolate/Peanut Butter?  Is it the same as Peanut butter cup?

We have to be extremely careful here for a couple of reasons, hypothetically “M. Mouse” as a write-in could mean “Mickey Mouse” or “Minnie Mouse”.   We shouldn’t be in the business of guessing or interpreting voter intent.

The next issue is what order, if tied, do we eliminate ballots and re-allocate votes.  This matters in the situation where the first place vote getter is one or two short of achieving victory.  It would also matter if the reallocation caused a selection to be eliminated in the following round or surviving another round.  Yes, the odds of these situations are small – but they do exist, and we need to consider this.  In addition, you have to make these decision when coding.

In what order do we eliminate tied lower tier ballots?  Do I eliminate “Coffee” or “Peach” first? What reasoning do i code-in?

In this case, we have the following write ins with 1 vote:

  • Tiger tail
  • Pralines ‘n Cream
  • Coffee
  • Peach
  • Strawberry cheesecake
  • Black raspberry
  • Spumoni
  • Raspberry
  • New York Super Fudge Chunk
  • Chocolate/Peanut butter
  • Peanut butter chocolate

We have 2 votes for “Peanut Butter Cup”

We have 3 votes for “Chocolate peanut butter”

So, these are the coding decisions I am making:

I will ignore capitalization, but will not ignore spelling when classifying write ins.  If a voter misspells a write in, then so be it.  I am sure each state will have different rules if they enact RCV as to write ins (see Alaska and Murkowski write in election as an example of rules regarding write ins). I simply can’t interpret voting intent and need to take the write in as presented.

I will alphabetize … no…. changed my mind ….. I will randomize the tied ballots to determine the order they are eliminated and second choice reallocated.

I created a random number generated and sorted low to high and I will eliminate the write ins in the following order:

  • Peach
  • Tiger tail
  • New York Super Fudge Chunk
  • Spumoni
  • Chocolate/Peanut butter
  • Pralines ‘n Cream
  • Black raspberry
  • Strawberry cheesecake
  • Raspberry
  • Coffee
  • Peanut butter chocolate

I stress this is a decision that I made.  I don’t know if it is the “correct” way to do this, and that could be a potential issue.  I am not sure enacting legislation considers this or is specific.

Again, the chances the order that I eliminated and re-allocate write ins will have a material effect on the eventual outcome is small – HOWEVER, if it were the decision I just made as a coder would be an issue.  I will need to talk to an RCV expert to explore this further.

WRITE INS FLOW

Round 1 Round 2
Peach Mint Chocolate Chip
Tiger tail Mint Chocolate Chip
New York Super Fudge Chunk New York Super Fudge Chunk**
Spumoni Chocolate Chip Cookie Dough
Chocolate/Peanut butter Rocky Road
Pralines ‘n Cream Butter Pecan
Black raspberry Mint Chocolate Chip
Strawberry cheesecake Butter Pecan
Raspberry Butter Pecan
Coffee Mint Chocolate Chip
Peanut butter chocolate Chocolate Chip Cookie Dough

We immediately experience an additional issue.  The rules require that one does not vote any one choice more than once, and if one does – the ballot becomes “spoiled”.  Our voter with his love for “New York Super Fudge Chunk” is proving to be an issue.  An additional question, is the entire ballot spoiled?  Say for example, “NYSFC” voter in round three voted for Vanilla.  Do we count round 3 or is the entire ballot spoiled for all future rounds?  If we immediately spoil the entire ballot are we disinfranchising the voter for additional rounds?

I think for our excercise, I am going to make the decision that if a voter doesn’t follow directions and votes for one choice more than once – the ballot becomes spoiled for future rounds.  Sorry, NYSFC – your strident love for “New York Super Fudge Chunk” has invalidated your ballot because we are a strict father. 

So, to recap – we aren’t even out of the write-ins, and we have three major coding / tabulation issues:

  • write in classification
  • order of elimination for ties
  • spoiled ballots

I am going to need another cup of coffee.

Round 1 Results (combination elimination of write ins)

So, after dealing with the write-ins, Mint-Chocolate Chip has increased its lead, and we start again. Thankfully, it’s not close enough to get sued…..yet.

 

 

 

Conclusion

As we observed in the previous post, it is the accumulation of small errors that could lead to a catastrophic failure.

So far we have seen possible issues with:

  • Ballot presentation
  • Allowing or not allowing voter error
  • write in issues (classification)
  • order of elimination of lowest tiers
  • spoiled ballots – when in the process?

Yes, agreed, the chances are small – BUT – if some error were to cast doubt on the tabulations, it would be terrible for confidence in the process. 

Ranked Choice Voting – an adventure

Ranked Choice Voting – an adventure

Ranked Choice Voting (RCV) and Ice Cream

With the pending Democrat primary race for Mayor in NYC using Ranked Choice Voting (RCV), we are thinking through the process of how to properly poll Rank Choice Voting and how to write the back-end code to do the analysis.

What I thought would be a weekend in project has turning into a completely different beast.  If you ever want to move from theory to execution of something – write code for it.  Writing code forces you to explore the details and try to attempt to anticipate errors etc.

In these blogs posts, I will not attempt to give a primer on Ranked Choice Voting.  Others have done that well:

Bias Alert –  you should know that I am not sold on RCV as a method of voting in the United States because it adds layers of complexity to a system – counting votes –  that we are currently struggling with in the United States.   As we will soon discover, each detail / decision is a thread for someone to pull on that could further cast doubt on our voting systems.

What I will attempt to do is walk through our fake data set and explain our logic on polling / coding and address various decision making.  I will highlight issues that I see as potential problems in polling / casting votes.

In our exercise, we were going to ask people to “rank choice vote” flavors of ice cream.  What could possibly go wrong???

ISSUE #1 – Presentation of Ballot

As a rule when polling, you want the poll to resemble the actual voting process as much as possible.

Even before collecting data, we were presented with a couple of issues / deicision points:

  • Presentation of Ballot – method
  • Allowing errors or not

As one of the people who took the poll pointed out, there are multiple ways of actually presenting the ballot – and it appears New York City is using two different methods.

There is an array and a multi-screen approach.  NYC’s sample ballot shows an array and online NYC demonstrates RCV on something called an ‘AutoMark Ballot Marking Device’ uses the multi-screen approach (https://www.vote.nyc/page/ranked-choice-voting).

NYC Ballot - array

NYC Sample Ballot

MYC Automark Ballot

 NYC isn’t clear on what method is used when, and finding out the details was outside the scope of my weekend project. 

While our online software has the ability to do either type of question, I decided for this exercise to use the multi-screen approach.  Why, to allow for error….

ISSUE #2 – Error Handling

As another reader pointed out, it would have been helpful, if we would have removed their previous choices from screens.  Example, if they picked Vanilla, it should be removed from future choices.  It would NOT have been difficult to do; however…..

It doesn’t appear that is what is being done in NYC on the printed ballot or the multi-screen approach.   It appears that errors are allowed (butterfly ballot anyone).  I would need to speak to an electronic voting machine expert to explore IF machines allow a voter to error or not, but with paper ballots we can’t code out human error. 

Therefore, when programming the survey, we “errored” on allowing the voter to “error” – even though the “rules” clearly state if you vote twice for something your vote will be “spoiled” (We will have much more on that later). 

ISSUE #3 – Instructions

As a “voter” / “survey respondent” pointed out – we had a problem with definitions / unclear instructions.  The instructions were to “Rank Choice Vote” for ice cream flavors.  We did this purposefully to mimic the ballot instructions. 

Some people were confused asking should I vote for “my favorite” or “my least favorite”, requesting more descriptive instructions.   I assume this confusion would exist on any ballot. 

In addition, it appears many “voters”  “survey respondents” didn’t realize there was a space on each choice for a “write in.” 

Conclusion

Even before data collection or simulated voting – we made two decisions (ballot presentation and error handling) that could potentially have a material effect(s) on the results, and we haven’t even started coding results yet.

The challenge with this when you study system failures of any kind, it is not normally one huge error that causes failure, it is an accumulation and compounding of smaller errors. 

But for now with those decisions made, we collect data….