Gay, lesbian and bisexual teenagers 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 peers, the study suggests 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 E. W. Himmelstein, the study’s lead author, who initiated the research while an undergraduate student at Yale.

Ms. Himmelstein began the study, she said, after spending time working in the juvenile justice system and noticing a disproportionate number of gay and lesbian teenagers in court. After she could not find research evaluating whether gay teenagers were more likely to be involved in criminal activity, she conducted her own study for her senior thesis. She used data from 1994 to 2002 from the National Longitudinal Study of Adolescent Health, a continuing survey tracking the behavior and health issues of middle and high school students.