An election-year riddle:

What is it that did John B. Connally and Howard H. Baker Jr. no good whatsoever, gave George Bush several big boosts, has both helped and failed Jimmy Carter, baffled Edward M. Kennedy, enhanced Ronald Reagan and left John B. Anderson about where it found him?

An election-year answer: television advertising -- more than $15 million worth so far.

May is an early season to be reaching final conclusions about any aspect of the presidential campaign, including the role of "paid media," as the politicians now refer to political advertising. But already this most expensive single element of a modern presidential race has left a strong imprint on the course of the contest this year.

The evidence of 1980 dispels the most cynical pessimism that money and advertising can buy an election, but the same evidence confirms that political commercials win votes. The fact that the commercials sometimes succeed is probably enough to continue persuading presidential candidates to spend more on advertising than any other aspect of their campaigns.

One of the biggest spenders this year has been George Bush, and in his campaign there is a strong belief that the money has been well used. According to Robert Teeter, Bush's pollster, the impact of his paid media in the Pennsylvania primary was dramatic.

In the Philadelphia suburbs, Teeter said, Reagan led Bush 58 to 42 on March 30. In mid-April the first of a series of half-hour Bush "town meetings" -- really 30-minute commercials -- appeared on Philadelphia television. In these shows, Bush answered questions from a live audience of his supporters. A couple of days later Teeter's figures showed Bush ahead of Reagan in the same neighborhoods by 55 to 45.

The same show was rerun four times before primary day, and Bush beat Regan in the Philadelphia suburbs by 60 to 40.

At the other extreme lies Connally, who predicated his campaign partly on the theory that national television exposure would compensate for the lack of a strong national organization. The theory might still be true, but not for Connally, who spent millions on television to no -- literally no -- effect. Baker and Bob Dole both spent less on television than Connally, but spent a lot and benefited not at all.

Of course the mere act of spending is insignificant if the commercials are not effective. Here the issue becomes a matter of art, and in a curious way, it is often a matter of unseen art.

The people who run campaigns, and the candidates themselves, often remain igorant of what is appearing on the airwaves -- for their opponents and even for themselves or their own candidates. So Bob Strauss, chairman of the Carter campaign, said in an interview last week that he had not seen all the controversial anti-Kennedy commercials shown on his candidate's behalf in Pennsylvania. Paul Kirk, one of Kennedy's prinicipal strategists, said he hadn't seen them either.

The question is further muddled by the inescapable fact that the same commercial can do a candidate a lot of good in one context, and a lot of harm in another. Messages conveyed on the news shows can undermine the niftiest ads. The Bush campaign includes abundant evidence of this phepnomenon, too.

In Iowa in January, exultant Bush commercials featuring uplifting music and contrived enthusiasm for the candidate apparently contributed to his suprising victory over Reagan. The same ad helped make Bush an early leader in New Hamshire

But two public debates, one a disappointment for Bush, the second a disaster, created an impression of the real George Bush that clashed sharply with the image in his commercials. New Hamppshire Republicans abandoned him in droves in the last days of the campaign, and Reagan won a big victory.

Anderson's commercials were another interesting example. Politicians both in Anderson's camp and with other candidates seem generally to agree that his initial public exposure this year, in the Iowa League of Women Voter's debate among Republicans, thrust Anderson into the race as a serious factor. Early press coverage helped him enormously, the same sources agreed.

That initial appeal seemed based on a perception that Anderson was a new kind of candidate, outspoken and willing to take unpopular positions. His ads made the same point with the theme "The Anderson Difference." Bob Sann, president of the ad agency that made these commercials, insistedd in an interview last week that he was not a television watcher, and didn't realize that this echoed the "Anacin Difference" ad campaign for that pain reliever, but lots of viewers made the connection.

Anderson's ads were stiff and sometimes awkward, but they apparently helped establish his independent image. Yet by late March, when he began to fade in the Republican primaries the ads had somehow lost their impact, or so it seemed.

Regan has made good use of television since he first entered American politics, and he continues to do so this year. Whether in one of his simple, direct commercials or on n ews shows, Reagan tends to look "vital," "robust" and like a man "with a good sense of humor" on television. The words in quotation marks were all used by Bush's pollster, Robert Teeter, to describe Reagan's television appearances.

But Reagan has not always been able to put his TV skills to the best use, primarily because of the federal spending limits for primary campaigns. Reagan spent heavily in 1979 and in the first weeks of 1980. The Florida primary in March was the last time the Reagan camp felt it could mount a serious media campaign. Reagan spent $400,000 on commercials in Florida, and swept the primary.

Reagan campaign aides theorize that the commercials work well only in conjunction with effective personal campaigning, but that neither of those is fully effective in the absence of the other. Connecticut is cited as an example, where Reagan made good personal appearances, but did not advertise on television (despite the wishes of his local campaign officials), and lost to Bush.

The Kennedy campaign's experience with television ads could be a metaphor for the entire Kennedy effort this year. At the out set the Kennedy camp could not settle on a single advertising man nor on a media strategy. The initial Kennedy commercials, made by adman Charles Guggenheim with strong direction from campaign officials, were so weak that they may have done more harm than good, according to many in the trade.

Those commercials tried to compensate for Kennedy's "negatives," as revealed in opinion polls. They raised the so-called "personal" issue, sometimes clumsily, and generally in ways that tended to reinforce rather than dispel public concern about the senator's worthiness as a presidential contender.

Just before the New York primary the Kennedy camp switched from Guggenheim to David Sawyer of New York. Sawyer made two commercials featuring actor Carroll O'Connor, better known to television viewers as Archie Bunker, delivering a sharp anti-Carter message. By that time, according to sources involved in formulating the new commercials, the Kennedy camp realized that its best tactic was to encourage a protest vote against Carter. On election day, Kennedy swept New York.

That loss jolted the Carter camp out of what had been a largely positive advertising campaign intended to emphasize Carter's truthfulness, family life and sincerity -- qualities that Americans like in the president, according to the polls.

Kennedy's victory in New York coincided with a general decline in President Carter's national popularity. In April the gloss on Carter's image produced by the Iran and Afghanistan crises was beginning to wear thin, and the economic news was getting steadily worse.

The Carter camp's polls showed that just as Kennedy's best shot was to encourage a protest against Carter the president's best chance lay in reminding voters of their doubts about Kennedy's personality. So Gerald Rafshoon, Carter's ad man tossed out his positive Carter ads, and made new anti-Kennedy commercials for Pennsylvania.

The new ads were people-on-the street interviews showing ordinary Pennsylvanians expressing various doubts about Kennedy's suitability for the presidency. The ads clashed disconcertingly with the presidential image Carter's Rose Garden campaign tried to create, and may have done Carter more harm than good in Pennylvania, where Kennedy narrowly beat him.

"I think those ads helped Kennedy" observed Elliot Curson, the ad man who makes Reagan commercials, and who lives in Philadelphia where he could see all the Pennsylvania commercials. "People said, "Who the hell is Carter to criticize?' Those spots were awfully nasty. I think the public didn't like it.

Curson's ads for Reagan are the longest-running commercials of 1980. Half a dozen spots made in January, all featuring Reagan in a stark setting talking directly into a camera, have remained in use since the New Hampshire primary. Perhaps the length of Curson's run entitles him to the last word here:

"Like the boss says," Curson observed, speaking of Regan. "It pays to Advertise."