As I wrote in Taki’s Magazine in 2009 in a review of Harry Potter and the Half-Blood Prince:
… Human races mean nothing in Rowling’s world. The student body of Hogwarts is strenuously multiracial, yet strikingly monocultural. In these tributes to two centuries of English children’s fiction, whatever their ancestry, they’e all very British.
Instead, the hereditary differences between wizards and Muggles are central to the books. All fans identify with the wizard minority rather than with the Muggle majority.
A 2005 letter in Nature entitled “Harry Potter and the Recessive Allele“ explains the Mendelian genetics of wizardry. According to the family trees in Rowling’s books, wizardry is apparently embodied in a recessive gene. Like blue eyes, possessing the power of magic requires inheriting a copy from both parents.
This is the Punnett Square, named after one of the four founders of the Cambridge Eugenics Society in 1910, along with Horace Darwin, Richard A. Fisher, and John Maynard Keynes.
Harry’s father was a pureblood wizard, while his mother was a witch born to Muggle parents who evidently each carried one recessive copy of the wizardry gene. Occasionally, witches such as Harry’s pal Hermione Granger are born to Muggle parents who each have wizard ancestors. …
Yet, because Muggles are so boring, the main impetus of the plot comes not from conflicts between Muggles and wizards, but from the war over race relations waged among wizards. On one side are our tolerant heroes. On the other are the evil Nazi purebloods — such as Voldemort and blond Draco Malfoy, Harry’s archrival from Slytherin House — who denigrate wizards of mixed-ancestry as “mudbloods.”
Although Rowling, who once worked for Amnesty International, makes her books ostentatiously anti-racist, there’s something fundamentally bogus about her facade of conventional modern politics. Wizardry turns out to feature a politically incorrect dependence upon nature rather than nurture. Blood will tell. As Chris Suellentrop scoffed in Slate at Rowling’s eugenic worldview: “Hogwarts is nothing more than a magical Mensa meeting.”