Elections involving a large voter population often lead to outcomes that surprise many. A better prediction of the true outcome helps reduce the adverse effect of surprise on the economy of a sizable population. This paper starts from the basic observation that individuals in the underlying population build estimates of the distribution of preferences of the whole population based on their immediate neighbors in the underlying social network. The outcome of the election leads to a surprise if these local estimates contradict the outcome of the election for some fixed voting rule. To get a quantitative understanding, we propose a novel mathematical model of the setting where the individuals in the population and their connections are described by a random graph with connection probabilities that are biased based on the preferences of the individuals. Each individual also has some estimate of the bias in their connections. The connection model is inspired by the homophily effect in social networks. We show that the election outcome leads to a surprise if the discrepancy between the estimated bias and the true bias in the local connections exceeds a certain threshold, and confirm the phenomenon that surprising outcomes are associated only with closely contested elections. We consider large elections with networked voters and compare standard voting rules based on their performance on surprise. Our results show that the rules have different behavior for different parts of the population. It also hints at an impossibility result that any reasonable voting rule will be less surprising for all parts of a population. To attest some of our theoretical predictions, we experiment with the large dataset of UK-EU referendum (a.k.a. Brexit).