Predicting the winner of an election and estimating the margin of victory of that election are favorite problems both for news media pundits and computational social choice theorists. Since it is often infeasible to elicit the preferences of all the voters in a typical prediction scenario, a common algorithm used for predicting the winner and estimating the margin of victory is to run the election on a small sample of randomly chosen votes and predict accordingly. We analyze the performance of this algorithm for many commonly used voting rules.More formally, for predicting the winner of an election, we introduce the (ε,δ)-Winner Determination problem, where given an election E on n voters and m candidates in which the margin of victory is at least εn votes, the goal is to determine the winner with probability at least 1−δ where ε and δ are parameters with 0<ε,δ<1. The margin of victory of an election is the smallest number of votes that need to be modified in order to change the election winner. We show interesting lower and upper bounds on the number of samples needed to solve the (ε,δ)-Winner Determination problem for many common voting rules, including all scoring rules, approval, maximin, Copeland, Bucklin, plurality with runoff, and single transferable vote. Moreover, the lower and upper bounds match for many common voting rules up to constant factors.For estimating the margin of victory of an election, we introduce the (c,ε,δ)–Margin of Victory problem, where given an election E on n voters, the goal is to estimate the margin of victory M(E) of E within an additive error of cM(E)+εn with probability of error at most δ where ε,δ, and c are the parameters with 0<ε,δ<1 and c>0. We exhibit interesting bounds on the sample complexity of the (c,ε,δ)–Margin of Victory problem for many commonly used voting rules including all scoring rules, approval, Bucklin, maximin, and Copelandα. We observe that even for the voting rules for which computing the margin of victory is NP-hard, there may exist efficient sampling based algorithms for estimating the margin of victory, as observed in the cases of maximin and Copelandα voting rules.