My high school clique in suburban San Mateo, Calif., included Danny, Lee, Francis and Jon. We were the tennis team nerds. We did our homework. We played poker for pennies on Saturday nights. We did not include girls, but were obsessed with British actress Hayley Mills, then 15 years old.

Our class had about 400 students. The school offered many electives and activities, just the sort of medium-to-large campus that is “more likely to be rank-ordered, cliquish and segregated by race, age, gender and social status,” according to a Stanford University summary of new research by Graduate School of Education professor Daniel A. McFarland and four other researchers.

“By contrast, pecking orders, cliques and self-segregation are less prevalent in schools and classrooms that limit social choices and prescribe formats of interaction,” the summary said. “Smaller schools inherently offer a small choice of potential friends, so the ‘cost’ of excluding people from a social group is higher. In addition, structured classrooms guide student interactions in prescribed routes and encourage students to interact on the basis of schoolwork rather than on the basis of their external social lives.”

This is, to me, rather startling. I have been studying high schools for 30 years. I thought cliques were common to all of them. Forming little peer groups is what adolescents do. But the American Sociological Review paper, “Network Ecology and Adolescent Social Structure,” shows that small high schools, like the private schools and public charters in the Washington region, inspire different kinds of cliques than the large public high schools that most area children attend.

The researchers used data on friendships from two sources — an in-depth study by McFarland of two unidentified, very different high schools and the National Longitudinal Study of Adolescent Health,which included about 80 high schools. “Large schools tend to accentuate the quest by adolescents for friends who are similar to themselves,” the summary said. There are more choices and greater exposure to people who are different, “a mixture of freedom and uncertainty that spurs students to cluster by race, gender, age and socioeconomic data,” the summary said.

In smaller schools with a stronger focus on academics, “teenagers are less likely to form friendships based on social attitudes imported from outside the school.” Instead, they bond over school classes or activities.

That doesn’t mean smaller is better. Bigger and more diverse schools might encourage self-segregation, but smaller schools often attract or accept only a narrow slice of the population, so are more segregated from the start.

I didn’t know many of my high school classmates well. Those who took our many shop and home economics courses didn’t see me in those classes, except the time I took a stab at mechanical drawing. The athletes, the drama wonks and the girls were mostly strangers to me. So were blacks and Hispanics, since there were almost none at my school.

Two of my children attended the other kind of school, very small. My daughter, who later majored in sociology, said by senior year at her private campus in the District, clique walls were breaking down in her class of about 110. “Small schools make dorks into athletes and allow socializing across social groups,” she said. She got to know people she had little in common with “because of softball and tennis.” My son said his class of 85 students at a Pasadena, Calif., school “was full of nice people. . . . I have no idea if that has to do with the school structure or just dumb luck.”

Both small and large schools have strengths and weaknesses. I prefer the larger ones. They seem to me more interesting and more American. But it is a matter of taste. The researchers’ discoveries of how different cliques evolve may help educators find ways to address whatever problems they create for our children.