last weekend i ate a cricket on national television. based on my statistical analysis of presidential polls, i made a bet that if donald j. trump won more than 240 electoral college votes, i would chow down. like millions of voters in both parties , i was surprised by the outcome. as a consolation, i<u+2019>d like to learn what went wrong <u+2014> and to figure out how pollsters might do better when they puzzle over our polarized electorate. data-based websites, from facebook on down, have a responsibility to convey accurate information. in this regard, i owe an apology to readers of the princeton election consortium , which i publish. my primary purpose was to show people where to put their campaigning energies by revealing which races were on a razor<u+2019>s edge. i advised my readers to focus on close senate races in states where the presidential race was also close. but i also reported an extremely high probability that hillary clinton would win, which was published by the new york times alongside its own model. did we lull voters and the news media into a sense of complacency about the election? in hindsight, it would have been better to express mrs. clinton<u+2019>s polling margin as equivalent to a 2.2 percentage point lead <u+2014> and that the true margin could be higher or lower by several points. that would have better conveyed the race<u+2019>s uncertainty. poll aggregation is built on the idea that pollsters are more accurate as a group than they are individually. during the primaries, i used state polls to argue that mr. trump was the strong favorite to win the nomination. however, general-election polls did less well, and so did i. state polls underestimated the republican-versus-democrat margin by four percentage points, the largest error in decades . this presidential-level polling error was echoed in the national house popular vote and senate polls, which were also both off by a median of four percentage points. as nate silver of fivethirtyeight has pointed out , errors are often correlated. a warped ruler is flawed no matter how many measurements are averaged. the pattern of polling errors provides a clue to why mr. trump<u+2019>s victory came as a surprise. in states that mr. trump won, his actual margins against mrs. clinton were a median of six percentage points better than the last available polls. in contrast, in states won by mrs. clinton, the gap between polls and outcomes was 0.2 of a percentage point. mr. trump<u+2019>s hidden strength in the states he won suggests that some fraction of republican voters were struggling between party loyalty and difficulty with accepting mr. trump. in the end, their loyalty won out . leading up to election day, mr. trump was kept afloat in polls by a sturdy partisan floor of support of 41 percent to 43 percent. with votes still being counted, projections indicate that he will end up winning around 46.5 percent of the final vote. mrs. clinton<u+2019>s support ranged from 45 to 48 points and she will most likely end up with 48.5 percent of the vote. this contradicts my pre-election assumption that undecided and minor-party voters, unusually abundant this year, would not break strongly in either direction. the outcome may have also been swayed by the letter that james comey, the director of the f.b.i., sent to congress on oct. 28 about mrs. clinton<u+2019>s emails, after which national and state polls swung toward mr. trump, perhaps decisively. i suggest that we retire the concept of the <u+201c>undecided<u+201d> voter. based on cognitive science , so-called undecided voters might be mentally committed to a choice, but either can<u+2019>t verbalize it or want to keep it to themselves. we humans are like this in all kinds of domains, from what to have for lunch to whom to marry. indirect approaches like web search data might provide new ways to predict voter behavior. in one particularly interesting example , during the republican primary season a reader of my website who goes by the initial n. used google correlate, a tool that allowed her to find web search terms that showed the same pattern as state polling data. using those search terms, n. predicted the outcome in unpolled states more accurately than demographic models of the republican electorate. social media may also help gauge voter enthusiasm, especially in midterm elections, when turnout is lower and polls are less accurate . unstated preferences can also be revealed by partisan straight-ticket voting, which has reached record highs . on average, partisan senate and house preferences tracked the presidential race percentage point for percentage point . such intense party loyalty provides a way to investigate a preference for mr. trump without using the word <u+201c>trump.<u+201d> in wisconsin, the democrat russ feingold sought to regain his senate seat from ron johnson. mr. feingold<u+2019>s lead slipped from a median of nine percentage points in august to a median of one point in october <u+2014> and in the end, mr. johnson won. this provided a clue that mr. trump was strong in rust belt states, where white non-college voters are abundant. as many have noted, if 55,000 trump supporters had instead cast votes for mrs. clinton in michigan, wisconsin and pennsylvania, we would be looking at a narrow clinton victory. hampered by inadequate data, her campaign grasped the danger to her supremacy in these states too late . mrs. clinton did not even visit wisconsin after the democratic convention. as a scientist, i am committed to learning from my mistakes. despite this year<u+2019>s failure, data is still our best resource for predicting events, but it is important to get good data in the first place. this will be on my mind in the spring, when i am teaching a seminar on the application of statistics to public affairs. a key topic will be partisan gerrymandering, which lends itself much better to hard facts like final vote totals , and not prediction. this year<u+2019>s election will remind me to add a heavy dose of humility to the proceedings. sam wang is a professor of neuroscience at princeton and a founder of the princeton election consortium . follow the new york times opinion section on facebook and twitter (@nytopinion) , and sign up for the opinion today newsletter . a version of this op-ed appears in print on november 19, 2016, on page a23 of the new york edition with the headline: why i had to eat a bug on cnn. today's paper | subscribe
why i had to eat a bug on cnn
sam wang