Far more black students in Montgomery County passed a statewide writing examination last spring than the year before, county school officials announced yesterday, and students at Montgomery Blair, a predominantly minority high school in Silver Spring, scored higher than students at Walt Whitman High in Bethesda, recognized as one of the best secondary schools in the nation.

The proportion of Montgomery County ninth graders failing the statewide minimum proficiency writing examination remained roughly the same as the year before, at about one third. Forty-one percent of the male students failed the exam, while only 28 percent of the females failed, proportions similar to the previous year.

School officials said yesterday that 74 percent of the students at Blair scored a passing grade on the two-part exam, up from 63 percent the year before. Only 70 percent of Whitman students passed, down 17 percentage points from 1983.

In addition, school officials said that 54 percent of all black students scored a passing grade of at least 5.5 points out of 8, up from 45 percent in 1983, indicating that recent efforts to improve minority performance in school may be working.

"We're baffled by all of it," said Sally Walsh, coordinator of English instruction for county secondary students.

The county's failure rate of 34 percent was better than the state average of 49 percent, released last week. The county's passing rate, though, was only one percentage point higher than the year before, despite an intensive effort throughout the county to focus on preparing students for the writing exam.

White students had a passing rate of 69 percent; Hispanic students 50 percent; Asian students 65 percent.

Prince George's County scores were not available, but school spokesman Brian Porter said the results were only slightly better than last year's failure rate of 57 percent.

At Blair, home to the county's largest number of minority students at the secondary level, elation, not bewilderment, set the mood yesterday.

"It's almost better than pay day," said Eileen Kyle, a 10th grade English teacher. "Everyone clapped when they heard."

Whitman English coordinator Bonita Connoley said confusion and unfamiliarty about a term in one of the questions might be partly responsible for the drop in Whitman's scores. In the two-part writing test, students were asked to write a letter to their principal requesting permission to put on a fair and to write about a memorable event.

"It was geared to a more rural population," said Connoley. "I don't want to sound like I'm offering lame excuses. But our kids are very suburban. They . . . have no idea about how one might go about organizing a fair at school."

Two scorers read each paper and graded them from one to four, with one being the worst score and four the best. Graders were told to read each paper and rate it on its total or "holistic" impression. Five areas were to be reviewed: content, organization, audience, sentence formation and grammar.

Efforts to improve students' writing abilities has become a major focus of school systems across the country since several national educational organizations reported a serious deterioration in this area.

As a result, a number of states, like Maryland, have added a writing test to their requirements for a high school diploma. To meet these new requirements, school districts like Montgomery have revised their curriculums to include intensive writing courses.

For the possible gender gap in the Montgomery test scores, Walsh blamed societal expectations.

"I think its part of a whole societal trend to expect girls to be little ladies and boys to be able to figure things out," she said. "You can see it in their writing. Girls tend to make transitions easier. They are flossier, a little more polished. I don't think we expect that of boys."