When child psychiatrist James P. Comer walked into inner-city schools in New Haven, Conn., 17 years ago, he was shocked at what he saw: children yelling and screaming, hitting each other, hurling insults at the staff.

"What I saw was almost unbelievable," he wrote in a 1980 book of his first impressions. " . . . I just could not bear to admit the extent of the problem we had."

The problems in those schools were severe: alarmingly low test scores, high absenteeism, frequent and serious disruptions. But Comer said he also detected a more subtle affliction: Teachers held lower expectations for these children because they were disadvantaged and black.

Comer, who instituted a new program for the New Haven school system, watched test scores rise slowly but significantly. Now, attracted by that success, Prince George's County school officials have hired Comer as a consultant to implement the same program there.

School officials revealed last week that black students in the county scored more than 20 points below their classmates on standardized tests. A study also showed that black youngsters receive lower grades and participate less often in extracurricular activities than other students.

Comer argues that this kind of problem can be traced in part to lower expectations for these children, which lead to a self-fulfilling prophecy of lower achievement and poor self-esteem. And these "underdeveloped" children, who lacked the social skills their middle-class counterparts had learned at home, are often misidentified as "bad" children and slow learners.

"If they've been made to feel dumb, then they have low expectations and little self-confidence," said Comer, associate dean of the Yale University Medical School. "All of that affects the performance of kids, the academic development, the behavior."

Comer's model will be introduced in Prince George's County this fall to 10 predominantly black schools designated for special funding and programs because officials say that they cannot be fully integrated. If successful, the plan is to expand the program in later years to other schools in the county, where enrollment is 57 percent black.

Superintendent John A. Murphy, who announced last week that he will focus on the disparity between achievement of black and white students, said he was impressed by national publicity about Comer's success with inner-city schools.

"Black and white teachers and administrators all come to work with a set of values that are middle-class values," said Murphy. "There are times when we don't understand the problems our less privileged youngsters bring to school."

While the program will be based on Comer's theories, it will be implemented almost entirely by existing staff. Principals will learn the model by meeting with Comer during the summer. He will be paid a $5,000 consulting fee.Comer's strategy is based on the "effective schools" theory that emphasizes strong leadership, goal-setting and careful monitoring of student achievement. His model calls for:

*Team management of each school by the principal, teachers and parents, who together identify problems and decide how they should be corrected.

*Increased parent involvement, by hiring parents as teacher aides, for example.

*A "mental health" team of school personnel to deal with attitudes, morale and other issues that affect teachers and the school environment.

*A new curriculum and a calendar of event designed to help low-income students learn the social skills that make them better able to participate and be accepted at school. Students read newspapers and telephone books and learn such things as how to participate in elections and how to write letters and speeches.

The program relies heavily on changing staff attitudes about disadvantaged children. "If a car rolls down the assembly line and doesn't have a wheel, you don't assume there's something wrong with the car and give it an 'F' or a 'D,' " Comer said in a recent interview at his office in the Yale Child Study Center in New Haven. "The assumption in his model is that all kids can do better."

Introduction of Comer's program in Prince George's comes at a time of upheaval for the system, with the implementation of an ambitious magnet-school plan aimed at resolving the county's 13-year-old desegregation lawsuit. Murphy, who has been at his job for a year, also has instituted a major administrative reorganization and announced his intention to push the school system of 105,000 students to the top quarter in national standardized test scores in the next four years. That is a goal he said depends largely on turning around the lowest scores in the county.

The 10 schools inside the Capital Beltway where Comer's model will be used have registered low test scores and, school officials say, cannot be desegregated because of their distance from predominantly white schools. As a result, they have been designated under the desegregation plan for additional staff, smaller class sizes, computer equipment and other special programs.

The county NAACP, which has pushed for more integration since it filed suit in 1972, has accepted arguments that these schools cannot be fully desegregated.

"We are in favor of integration," said Richard (Steve) Brown, executive secretary of the county organization. "But we were forced into the realization that the county has changed from white to largely black. We have to insist on quality education for the students who find themselves in these particular schools."

Both Murphy and Comer say they support integration wholeheartedly, but also argue that students in all-black schools can learn just as well as other children.

"The thing that makes a school effective is not the presence of black kids and white kids together," said Comer, who has written several books and received national attention for his success in raising performance levels in inner-city schools. "It is the creation of vitality . . . . Kids who are underdeveloped can achieve at a higher level. Kids want to learn."

That desire to learn, however, is often frustrated "because the assumption is that the kids don't have it," Comer said.

Bonnye Newkirk, whose daughter attends Berkshire Elementary, one of the compensatory-education schools, said she feels teachers ask less of children there. "They assume if you live in an apartment, you are poor, and that probably your parents are so busy trying to earn the bread and butter, they didn't have time to motivate you," she said.

Although academics say it is difficult to separate empirically whether teacher expectations are based on fact or preconceptions, there is wide acceptance of the notion that teachers expect less of poor, particularly minority, students.

"It's a very popular idea now, and it makes sense to so many people," said Denise Gottfredson, a researcher at the Center for Social Organization of Schools at Johns Hopkins University. Gottfredson has worked with inner-city schools in Baltimore and South Carolina.

"I can almost see [those attitudes] working, when teachers do something with one class and not with another," she said. For example, she said she has seen teachers unwilling to try a team-study method proved successful in other schools with inner-city students, because they believe the students lack the necessary maturity. "It must put a ceiling on achievement," she said.

Willis Hawley, dean of Peabody College of Education at Vanderbilt University in Nashville, said low-income children are shortchanged in other ways. Teachers, hesitant to burden already overworked parents, ask less of the families of disadvantaged children. As a result, said Hawley, who has worked extensively on desegregation issues, the children achieve less.

Administrators and teachers at the 10 pilot schools are generally optimistic about the Comer model. At the same time, some in the county caution against unrealistic expectations.

"We have to be very careful about artificially raising expectations," said Alvin Thornton, who has become active in the county's desegregation issue through his involvement in the predominantly black Ad Hoc Committee for Quality Education.

He said that while he had "great expectations" for the 10 schools, he was also skeptical about implementing Comer's program within the county's budget restrictions.

Valerie Preston, executive director of the Prince George's County Educators Association, the area teachers union, said some teachers are uneasy about "being on display," in the spotlight of a much-touted pilot program. But few teachers have asked to transfer out of these schools, officials said.

School officials in two districts where Comer's theories have been used are positive about the program.

"I saw a dramatic change as far as parent participation and student performance. I was a teacher . . . and I could feel the change," said Diane Garber, supervisor of early childhood programs for the New Haven schools.

The program, begun in 1968 in two schools there, has been expanded to 12 schools. Two of the earliest Comer schools, which initially ranked 32nd and 33rd in test scores among New Haven's 33 schools, now rank third and sixth, she said.

Comer, a graduate of Howard University Medical School and the son of an Indiana steel laborer, said he pays less attention to test scores and statistics as a measure of success than to the school climate itself.

"You know when a school works and when it doesn't," he said. "You feel it when you walk in the hallways."