This study investigates how teacher favoritism (i.e., systematically favoring students with a specific gender, ethnicity, or better previous class rank) affects the student achievement gap. Based on the practice of random class grouping within schools, a school fixed effect model is used to...