Over the next several weeks, candidates will begin to announce they are running for president. You may find yourself asking: How much does it matter whether the Republicans nominate Ted Cruz or Jeb Bush? Or whether the Democrats choose Hillary Clinton or Joe Biden? Won’t people just vote for the candidate from their party anyway?

It’s a question that political scientists and political consultants like to debate. As most political scientists can tell you, more than 90 percent of people who declared a party allegiance voted for the presidential nominee from their party in 2012. But there’s some evidence that consultants are right, too: While most people stick with their party, who gets the nod can sometimes significantly affect a party’s share of the vote, and in close elections can even affect the outcome.

The 2012 Cooperative Campaign Analysis Project (C.C.A.P.) set out to look into this question. I and other scholars asked a representative sample of 45,000 people whom they would vote for in November if the election were a contest between Barack Obama and a randomly chosen candidate from the set of Republicans contesting the nomination. Sometimes, people were asked how they would vote if the election were a choice between Mitt Romney and Mr. Obama. The next matchup might have been Newt Gingrich and Mr. Obama, or Ron Paul and Mr. Obama. The survey was administered in December 2011 and asked about Mr. Obama and the three Republican candidates mentioned above. Each person was then re-interviewed at least once during the 2012 campaign and again after the election.