The Eve of the NYC Democratic Mayoral Primary Election

It is the eve of the New York City Democratic mayoral primary election. This is a simple follow-up on my post from last Friday as I was curious how the final pre-Election Day polling was going to fall. It’s fairly clear who is going to get the most votes. Though we have a very good idea who is going to take the nomination it is still not guaranteed. Using the same line of reasoning that I used in my previous post we can calculate the probability that Bill de Blasio is not only going to get the most vote but also achieve the threshold of 40% of the vote to avoid a run-off that is scheduled for October 1st. The following shows the five leading candidates and their distribution of vote. For the distribution shown in the graph below I proportionally assigned the remaining undecided vote each of the five main candidates. There are other candidates that will likely get a few votes but their vote will only be a few percentage points. For the purpose of this estimation and the graph I am only showing the five candidates.

The results once again come from www.realclearpolitics.com and I only used the most recent two polls and averaged the two results. The biggest discrepancy between the two polls in in Christine Quinn where there is a seven point difference. Another item to note is the methodology between the two polls NBC/WSJ/Marist use phone operators while PPP uses IVR. The first graph simply shows results from the combined two polls. The second graph I take the undecided voters and proportionally assign them to top five candidates. If we believe that the undecided voters will break this way then de Blasio will almost certainly win and avoid the run-off.

This graph simply takes the votes as provided by PPP and NBC/WSJ/Marist. This does not include the undecided voters though we know that some of the undecided will likely go to each of the candidates.

The following graph proportionally assigns the undecided vote to each of the five top candidates. This shows that Bill de Blasio has an extremely high likelihood of not only getting the most votes but also obtaining the minimum threshold.

I’m somewhat confused by what it means to tweak the “shape1” and “shape2” parameters “by hand” for a beta-distributed statistic. How do I know what good starting and ending parameters are for the algorithm R employs? The documentation is not being much help.

“Tweaking” refers to the starting point in the fitdistr() function. Using different starting parameters in that function can produce different output. So it may need some adjusting until good convergence is met. I have found that if I don’t have a clue what to start with I’ll just put in a couple of reasonable numbers. Then I’ll look at the output and adjust my starting parameters to better match what I see from the output. I may iterate through that process a few times to make sure the parameter output values aren’t drastically bouncing around based on the starting input.