Sen. Edward M. Kennedy told President Carter in their private lunch last Friday that he has changed his position and now is considering challenging Carter for the 1980 Democratic presidential nomination, it has been learned.

In an interview yesterday, Kennedy confirmed that he may run for president unless there is "improvement in the economy or at least a perception of improvement by the American people."

Kennedy said he will announce his decision before the end of this year so that, if he decides to run, he can campaign in Iowa and New Hampshire, the first presidential contests in 1980.

The Massachusetts Democrat said he reassessed his position and decided to consider running for president after "a number of Democratic colleagues in Washington and elsewhere" expressed concerns to him during July that many Democratic incumbents would be in jeopardy in 1980 if Carter heads the party presidential ticket. Kennedy said some of those who encouraged him to run are Democratic senators up for relection in 1980. Sources close to Kennedy said that 11 of the 24 Senate Democrats who face reelection had spoken to Kennedy about running.

Kennedy discussed his plans concerning the 1980 election with the president at the White House last Friday, according to an informed source. Neither the president nor Kennedy, nor their spokesmen, have been willing to discuss publicly what went on at the lunch meeting.

But one knowledgeable source gave this account of the meeting:

The president called Kennedy in Cape Cod about 10 days before the lunch and suggested that they get together when Kennedy returned to Washington. Kennedy returned the following week and Carter invited the senator to join him and the First Lady for lunch last Friday.

The president, Mrs. Carter and Kennedy lunched in the family dining room of the White House and several substantive issues were discussed, but presidential politics was not among them.

After lunch, the president escorted Kennedy out of the dining room and into a nearby sitting room, leaving Mrs. Carter behind. There the president raised the subject of the 1980 election. Kennedy told Carter that he had changed his position, which used to be a standard public line that he expected Carter to be renominated and he expected to support Carter for reelection.

Kennedy told the president he was concerned about the current economic situation and the overall state of the nation. And he said that he may run for president if the economic situation does not improve, or if the public does not at least perceive that the economy is improving.

In yesterday's interview, Kennedy characterized his discussion with the president as "frank but not unfriendly." Kennedy denied, as has the president, a report that Kennedy urged Carter not to run for reelection and that he suggested a bitter fight between them might lead to Republican gains in 1980.

Kennedy's assessment of a possible presidential candidacy came after not only his discussions with Democratic officeholders, but also after a private brain-trusting dinner with several leading liberal Democratic economists -- most of whom are predicting an economic situation by year's end that will be worse than the administration is predicting.

Kennedy met over dinner at his McLean home last July with the economists, including Arthur Okun, senior fellow at the Brookings Institution; George Perry, also a senior fellow at Brookings: Walter Heller of the University of Minnesota; Alice Rivlin, director of the Congressional Budget Office, and John Kenneth Galbraith, Heller served as chairman of the Council of Economic Advisers under President Kennedy; Okun held the same post under President Johnson.

Okun, Heller and Perry all believe that the nation is headed into a recession severe enough to require government action.

Heller and Perry, who regularly produce a joint economic forecast, have been predicting that unemployment will rise to at least 8 percent by the middle of next year. Okun thinks it will come close to that point. The administration officially is predicting that the recession will be brief and shallow, and that unemployment will not reach even 7 percent.

The economic forecast of Rivlin's Congressional Budget Office lies somewhere between that of the administration and that of the other three economists.

Okun and Heller, as former chairmen of the Council of Economic Advisers under Democratic presidents, traditionally have made themselves available to advise Democratic presidential hopefuls of moderate-to-liberal persuasions. Heller, for instance, met with California Gov. Edmund G. Brown Jr. this year at Brown's request.

The dinner meeting was described by one of the economists who was present as "a discussion of substantive economic issues." The source added: "It was hardly a campaign-planning session."

For months, Kennedy has led the president in public opinion polls by better than 2 to 1. On Monday, an ABC New-Louis Harris poll reported that 70 percent of those questioned believe Carter will not win reelection.

Kennedy said yesterday that he expects "heavy inflationary pressures will continue and that there will be an increase in the recession pressures."

He added:

"I intend to watch the steps that are being taken and will be taken [by the Carter administration]. I do not question that it takes time between steps being taken and actual improvement of the situation. But there needs to be a perception among people that the situation is being improved."

Kennedy said he is concerned that the public believes wage and price guidelines are not being applied fairly.

"In implementing wage and price guidelines, we have to give American businessmen and workers the impression that they are in fact being implemented fairly, across the board," Kennedy said. He said that he feels that "working people" are the ones who are being short-changed.

Inflation hurts those in the $15,000-a-year bracket more than it does those who make $50,000 a year. Kennedy said, and worsening unemployment makes the disparity even worse.

"An inflation-recession balance is the key," he said. "We have got to see what the administation does."

Kennedy conceded that he is in the position of expecting a worsening economy while also saying that unless the economy improves he may run for president. But he says it is possible there will be enough positive movement to cause him not to seek the presidency in 1980.

"I believe Carter would not be challenged and would be reelected if the economy were in better shape," Kennedy said. "The economy is the backbone of the Democratic Party. Now if it can just get moving -- just begin moving . . . ." And he stopped without finishing the sentence.

White House press secretary Jody Powell, asked about Kennedy's new position, said: "It seems to me that if someone says he intends to support the president you take him at his word. And if he says something different later on, you also take him at his word."

Carter's top-level advisers had come to believe in recent months that Kennedy might well challenge Carter despite his earlier statements that he expected to support the president. Some close to the president have complained privately that a challenge by Kennedy -- even talk of a challenge by him -- could hurt Democratic chances in 1980.

Asked about this concern, Kennedy said: "My point is that the shortage of home heating oil, the continuing inflation, the danger of recession -- all problems not of my making -- are the issues. People are interested in a resolution of these problems, and that is what is hurting."