We’re likely to hear a lot this election season about experience. Trump has no experience governing or serving in elected office. Hillary Clinton has a lot. But it’s less clear how experience factors into presidential success, both electoral and governing: Were our most successful and beloved presidents the ones who spent years honing their skills in national government?

That kind of experience seems to matter in winning elections. Despite public cynicism about politics and politicians, presidents typically come to office after careers in public service. (Trump would be the major exception.) But, according to the bulk of political science research, it isn’t simply that more governing experience means a better chance of winning the White House. In a 2010 book about the strategy of presidential aspirants, Lara Brown found that candidates who hold different government positions are more successful but that spending many years in one type of position can be an electoral detriment. Saladin Ambar’s 2012 book, “How Governors Built the Modern Presidency,” looked at the effect of the emergence of successful presidential candidates who had executive experience but limited time in Washington and claims to be outsider reformers — for example, Rutherford B. Hayes, Woodrow Wilson and both Roosevelts. Ambar argued that a not-of-Washington image became an advantage and that this has shaped what Americans expect of the modern presidency.

These arguments suggest that which offices and roles presidents have previously held matter in getting elected. The amount of experience is important, but so is the type, and neither work suggests that long years in Congress or in a previous president’s administration are an advantage.

But that’s political success; what about governing success?

First, let’s look at how many years of experience serving in Congress or as a governor, Cabinet member or head of a major federal agency each president brought to office. We can then compare that experience with an average of FiveThirtyEight editor-in-chief Nate Silver’s aggregation of rankings of presidents by scholars from 2013 and the results of an expert survey that came out in 2015. (That gives us five scholarly rankings of presidents in total, but the average below is weighted more toward the most recent one because I treated Nate’s aggregate as one rating in my average.)

RANK PRESIDENT YEARS OF EXPERIENCE 1 Abraham Lincoln 2 2 George Washington 0 2 Franklin D. Roosevelt 4 4 Theodore Roosevelt 2 5 Thomas Jefferson 14 6 Harry S. Truman 11 7 Dwight D. Eisenhower 0 8 Woodrow Wilson 2 9 Ronald Reagan 8 10 Andrew Jackson 6 11 John F. Kennedy 14 12 Lyndon B. Johnson 24 13 Bill Clinton 12 14 James Madison 19 15 James Monroe 17 15 James K. Polk 14 17 John Adams 7 18 Barack Obama 4 19 George H.W. Bush 14 20 William McKinley 19 21 John Quincy Adams 14 22 Grover Cleveland 2 23 William Howard Taft 7 24 Gerald Ford 26 25 Ulysses S. Grant 0 26 Jimmy Carter 4 27 Calvin Coolidge 5 28 Martin Van Buren 14 29 Chester A. Arthur 1 30 James Garfield 18 31 Rutherford B. Hayes 10 32 Benjamin Harrison 6 32 Richard Nixon 16 34 Zachary Taylor 0 35 John Tyler 18 36 Herbert Hoover 7 36 George W. Bush 6 38 Millard Fillmore 9 39 William Henry Harrison 20 40 Andrew Johnson 21 41 Franklin Pierce 10 42 Warren G. Harding 5 43 James Buchanan 26 Scholarly rankings of presidents and their high-level governing experience Rankings are based on five scholarly rankings. High-level governing experience includes time as a member of Congress, Cabinet member/federal agency head or governor. Sources: Brookings Institution, U.S. Congress, miller center

There’s a slight correlation between years of experience and a worse ranking. It’s hardly a clear trend, but it’s not a ringing endorsement for the importance of political experience, either.

So does having lots of national governing experience make you bad at being president? Here’s where the “correlation doesn’t equal causation” warning comes in. Lots of things could be driving the relationship between the kind of politicians that get elected and their success as president. Parties could gravitate toward more experienced politicians when the coalition has been in power awhile and is starting to fray. Also, two of the experienced-but-terrible presidents, John Tyler and Andrew Johnson, became president through succession (they weren’t elected). And for presidents who took office at times of crisis, like Franklin D. Roosevelt and Abraham Lincoln, it might have been an advantage to be unencumbered by political baggage.

The absence of a strong connection between experience and success also suggests that the experience gained in other government positions, especially Congress, may not cultivate the qualities that are necessary for presidential leadership. James Buchanan, who had a whopping 26 years of government experience before he was president from 1857 to 1861, is an instructive example. Scholars have concluded that he lacked the moral courage to lead the nation as tensions between North and South increased. More governing experience, to the best of our knowledge, does not increase moral courage.

But perhaps some of the trouble in drawing a connection between presidential success and experience is difficulty in assessing presidential success in the first place. Buchanan was sympathetic to Southern claims about states’ rights and slavery and is dead last in our aggregate rankings. But while we excoriate Buchanan, slave owners, including George Washington, Thomas Jefferson and Andrew Jackson (along with notorious racist Woodrow Wilson), grace the top 10. Evaluating presidential success often ends in tying oneself in moral knots over slavery, segregation, war or something else. Or it leads to the question, for conservatives looking at FDR or liberals looking at Ronald Reagan: Does effectiveness matter if he was effective at something you think harmed the nation?

In the modern era, the claim to outsider status, not experience, has become increasingly important. Trump is the culmination of this kind of political logic; Clinton is the antithesis of it. Trump’s central campaign appeals are about rhetoric and promises; Clinton’s are about experience and qualifications. Many have questioned Trump’s preparation for office, but his slogans are direct and seemed effective, at least in the GOP primary. Clinton’s policy knowledge is widely respected, but defining the message and purpose of her campaign and possible presidency has been a bigger challenge. This, perhaps, is where the disadvantage of experience becomes most evident: Politicians with long records can come to be defined by those decisions they made under political pressure or in concert with others, like Clinton’s Iraq War vote. Maybe politicians with shorter résumés — think Barack Obama in 2008 — have more flexibility to define themselves.

CORRECTION (June 19, 11:30 a.m.): A previous version of the table in this article misstated the number of years of governing experience for Richard Nixon. He had 14 years of experience before becoming president, not 16.