# Probability that a random voter voted for the same candidate twice

Let's say there are only two candidates(Candidate A & Candidate B) in an election and both of them ran for office in both elections. Candidate A received 48% of the vote in the first election and 51% of the vote in the second election. We will assume that there is a fixed group of voters and all of them voted in both elections. So, if 100 people voted in first election, exact same 100 people also voted in second election. Let's also assume a correlation coefficient of .8 between the voting habit of a voter(voting for the same or different candidate) in the first and second election. What is the probability that a randomly chosen voter voted for Candidate A in both elections?

N.B:- This is the same question as posted here https://www.quora.com/Bush-received-48-51-of-the-total-votes-in-two-elections-Whats-the-probability-that-a-randomly-chosen-voter-voted-for-Bush-in-both-the-elections . I am trying to better understand the answer posted by Aaron Brown as I dont understand the details of his answer.

• Unless you specify more about who was competing in both elections and how the voting went, this question looks unanswerable. After all, if the voters who voted in both elections all voted for the loser in the first election and that loser did not stand for election again, then (obviously) 0% of the voters voted for the same candidate in both! (NB Your statement of the question is not the same as the statement in your link.) – whuber Feb 13 at 13:11
• @whuber I edited it to make it answerable and made it similar to the question in the link. – gibbz00 Feb 13 at 14:13
• Thank you; it's close to a well-determined question. But not quite. First, are you randomly selecting from all voters who voted in both elections, voters who voted in either election, or voters who voted in a specific election? Second, you cannot make any progress until you make assumptions about how these common voters voted for the candidates in at least one election. After all, maybe all the voters in this group voted for Candidate B in the first election! – whuber Feb 13 at 14:30
• @whuber In regards to your first point, I mentioned every voter voted in both elections. So we are randomly selecting a voter from a fixed pool of people who voted in both elections. So, if 100 people voted in first election, exact same 100 people also voted in second election. Can we make progress assuming this? – gibbz00 Feb 13 at 18:35
• Yes: that's why I reopened the question. The record shows that you did not mention this crucial assumption until after I posted my comments, though. – whuber Feb 13 at 18:38

You can express it as a contingency table:

$$\begin{array}{cc} \begin{array}{cc|cc} && \text{1st Bush} & \text{1st others} & \\ &100& 48 & 52 \\\hline \text{2nd Bush}& 51& a & b \\ \text{2nd others} & 49 & c & d \\ \end{array} \end{array}$$

Due to all the restrictions (everything needs to add up to get the margins) you can bring the $$a,b,c,d$$ down to a single parameter

$$\begin{array}{cc} \begin{array}{cc|cc} && \text{1st Bush} & \text{1st others} & \\ &100& 48 & 52 \\\hline \text{2nd Bush}& 51& a & 51-a \\ \text{2nd others} & 49 & 48-a & a+1 \\ \end{array} \end{array}$$

So in any case you will need some additional information (wheter or not this is some vaguely defined correlation or not) to express the size of the group that voted for Bush in both elections.

In terms of Aaron Brown's comment on quora you have

$$a/100 = \frac{\rho+0.98}{4} \quad$$

I am not sure what type/definition of correlation relates to that. It is not corresponding to a later statement:

If the events were independent then ρ would be zero and the fraction that voted for Bush both times would be 0.2448 which happens to equal 0.48×0.51. However, this would be very surprising.

because $$\frac{0.98}{4} \neq 0.2448$$.

Instead, the case that the fraction that voted for Bush both times would be 0.48×0.51=0.2448 occurs when the phi coefficient is zero

• Should not d be 49 - (48-a) = a+1? If that is the case, I guess we can assume that the group that voted for Bush in both elections could be anything from zero to 48 percent. Given we dont know what is going on with Aaron's correlation formula, how would you tackle the problem? – gibbz00 Feb 15 at 23:22
• @gibbz00 I have corrected it. Regarding your question for tackling the problem... I guess that statistics is not gonna be able to give a solution without more information, so it is very difficult to say anything useful about it except for stating the fact that you need more information. – Sextus Empiricus Feb 19 at 15:58

I don't understand the answer provided in the link. So I simulated this scenario in R and I got a different result, which leads me to believe that the answer in the link might be wrong.

Note: I choose to interpret the statement "a correlation coefficient of 0.8" to really mean "a probability of 0.8".

mean(replicate(1e5,{
tmp=sample(c("A","B"),48,prob=c(0.8,0.2),replace=T)
sum(tmp==rep("A",48))/100
}))

[1] 0.3839619

• Could you explain how your simulation correctly models the question? On the face of it, some of the information in the question doesn't appear anywhere in the code. – whuber Feb 15 at 15:34
• @whuber It's true, I did not include the information pertaining to the second candidate, because they are not relevant, I think. The question is asking for the probability of voting both times on the first candidate, which immediately disqualifies all the people that voted for the second candidate in the first round. I still considered this when I divided the sum by 100, but I did not bother calculating what they did in the second round. – user2974951 Feb 15 at 15:45
• But how does your code implement a "correlation coefficient" of 0.8? You seem to treat that as a probability rather than as a correlation coefficient. – whuber Feb 15 at 15:56
• @whuber I did interpreted that as a probability because I don't know how to interpret a voter having a correlation coefficient of 0.8 to vote his first choice again. This does not compute to me so I took the liberty of assuming that OP really meant probability. – user2974951 Feb 15 at 17:18
• Please see the answer posted by Martijn W for how the correlation coefficient is involved. – whuber Feb 15 at 17:28