This paper devises a methodology to compare the accuracy of prediction markets and polls. The data of the Exchange of Future Events (xFuture) for Taiwan's 2006 mayoral elections and 2008 presidential election show that the prediction markets outperform the opinion polls in various indices of accuracy. In terms of the last forecast before the election date, the accuracy of the prediction markets is 3 to 10 percent higher than that of the opinion polls. When comparing the accuracy of historical forecasts, the prediction markets outperform the polls in 93 to 100 percent of the cases. Moreover, the average accuracy of the prediction markets is 9 to 10 percent higher than that of the polls, with a standard deviation more than 2 percent less than that of the polls. To examine the robustness of these comparisons, this paper conducts two tests including daily forecast and normalized accuracy, and finds that the prediction markets successfully pass the tests with a significantly better accuracy than the polls.