Gay, lesbian and bisexual teens in the United States are far more likely to be harshly punished by schools and courts than their straight peers, even though they are less likely to engage in serious misdeeds, according to a study published on Monday in the medical journal Pediatrics.

The findings, based on a national sample of more than 15,000 middle and high school students, come at a time of heightened attention to the plight of homosexual and bisexual teens. While several high-profile bullying and suicide cases around the country have highlighted the harassment of these adolescents by their peers, the new data suggest they also suffer a hidden bias when judged by school and legal authorities.

“Gay, lesbian and bisexual kids are being punished by police, courts and by school officials, and it’s not because they’re misbehaving more,’’ said Kathryn Himmelstein, the study’s lead author, who initiated the research while an undergraduate student at Yale University.

Ms. Himmelstein, now a high school math teacher in New York City, began the study after spending time working in the juvenile justice system during a leave of absence from college. She noticed a disproportionate number of gay and lesbian teens in juvenile court but could find no studies in the scientific literature evaluating whether gay teens were more likely to be involved in criminal activity or to be more severely punished.

As a result, she began conducting her own study for her senior thesis at Yale University. She used data collected between 1994 and 2002 for the National Longitudinal Study of Adolescent Health, an ongoing survey tracking the behavior and health issues of middle and high school students.

Researchers asked teens about nonviolent misdeeds like alcohol use, lying to parents, shoplifting and vandalism, as well as more serious crimes like using a weapon, burglary or selling drugs.

Lesbian, gay and bisexual youths were only slightly more likely to report minor and moderate non-violent misbehavior, like running away, lying to parents or shoplifting, compared to straight peers. These teens were less likely to engage in serious crimes and violence than their straight peers.

But after controlling for differences in behavior, lesbian, gay and bisexual teens overall were far more likely to be stopped by police, arrested or convicted of a crime than other adolescents, Ms. Himmelstein found.

In addition, teens who said they had experienced feelings of same-sex attraction were more likely to have been expelled from school than other teens.

Girls who labeled themselves as lesbian or bisexual appeared to be at highest risk for punishment, experiencing 50 percent more police stops and about twice the risk of arrest and conviction as heterosexual girls who reported similar levels of misconduct.

The study wasn’t designed to determine the reasons that behavior by lesbian, gay and bisexual teens is more likely to be punished or criminalized. The authors speculated that the more severe punishments meted out to these teens may reflect a bias by school and court officials, or that they may be less likely to receive educational and child welfare support services than their straight peers.

“Our youth tell us this kind of thing all the time,’’ said Betsy Pursell, vice president for public education and outreach for Human Rights Campaign, a Washington-based advocacy group.

Ms. Pursell notes that while teens obviously don’t wear labels, teens who are struggling with same sex attraction or who have self-identified as gay may be perceived to be more difficult if they adopt various behaviors that set them apart from straight peers.

For instance, a gay teen may feel victimized or ostracized, or may be more likely to step outside traditional gender roles or be more guarded in interactions with peers and adults.

“I think adults who work with young people, for better or worse, tend to quickly categorize kids,’’ says Ms. Pursell. “They may not be categorizing them as L.G.B.T., but as mainstream or out of the mainstream, a potential troublemaker or not a potential troublemaker.’’