# Majority Voting statistical test

What statistical test would be appropriate to test whether the number of votes of a winner is significant when there are more than 2 levels?

For the case of 2 levels I found this answer. But is there an extension for more levels?

For example, given 3 candidates: A,B and C with number of votes:

A=59

B=45

C=53

I would like to test if A was really the winner or if it was just by chance with a given significance level. Preferably with an R implementation.

I found that a chi-squared test could be used but it just tells whether there was a significant difference between any of the groups but I want to test if the candidate with the highest number of votes is significantly better than the others.

I thought about comparing just the highest one with the second highest but I think that approach is not correct since I would be discarding information of the other candidates.

• Ordinarily there is no concept of "significance" in the winner of an election: the winner is the person with the most votes, period. Thus, to understand this situation as you do, we need to hear from you concerning your probability model for the election outcome. Exactly how do you conceive of this election as occurring by chance? – whuber Jun 25 '15 at 18:03
• Also with election you generally have the whole population that voted (some vote by not voting), so if you have data on whole population, then by definition each difference is statistically significant. – Tim Jun 25 '15 at 20:05
• Specifically, those votes come from an ensemble of n trees (Random Forest) and the candidates are the classes. My concern is that with a diffrent n the distribution of votes over classes changes. For two clases, if i get A=90 and B=10 votes then my certainty about which is the final class is high so my prediction will be 'A'. If A=51 and B=49 my certainty is low and in this case my prediction should be 'unknown'. – Enrique Jun 25 '15 at 21:35