What is the math behind calling election seats with confidence, before all votes have been counted?

179 Views Asked by At

On election night, predictions are made on the winner of each district, after only a fraction of the vote has been counted up. How is this done?

Say there is a seat up for election, and 10,000 votes have been cast. After counting up 10% of the vote one party has more votes than the other, say 500 over 400. How confident can we be that that party would win? I have a feeling it has something to do with bayes, buy not sure exactly how.

So what exactly is the relationship between the number of votes cast/counted, and their distribution, and the probability that the leading party will win?