In Order of the Phoenix the Ministry passes Educational Decree 23 which gives Umbridge the following responsibility:
‘The Inquisitor will have powers to inspect her fellow educators and make sure that they are coming up to scratch.
Presumably Umbridge ended up inspecting every teacher at Hogwarts. We know of the following classes that Harry takes:
- Defense Against the Dark Arts
- History of Magic
- Care of Magical Creatures
I don't believe we are ever privy to an actual Astronomy class. They are sometimes mentioned in passing, and there is a long scene during the practical exam, but we don't actually see any classes in action.
Defense Against the Dark Arts is taught by Umbridge, so she obviously would not need to inspect it. This leaves us with seven classes in which we could potentially see Umbridge inspecting. However, since there are two different Care of Magical Creatures teachers (Hagrid and Grubbly-Plank) there are actually eight.
We don't find Umbridge inspecting any of Harry's Herbology classes, nor any of his History of Magic classes, nor any of his Charms classes. We do know that she inspected Fred and George's Charms class:
“You lot had an inspected lesson yet?” Fred asked them.
“No,” said Hermione at once, “have you?”
“Just now, before lunch,” said George. “Charms.”
We do find Umbridge inspecting all Harry's other classes:
Harry did not speak to Hermione all through Charms, but when they entered Transfiguration he forgot his anger; Professor Umbridge and her clipboard were sitting in a corner and the sight of her drove the memory of breakfast right out of his head.
He gestured toward the dim corner of the dungeon, and Harry saw Professor Umbridge sitting there, clipboard on her knee.
- Care of Magical Creatures (Grubbly-Plank)
He had thought that the next time he would see Umbridge would be in his detention that evening, but he was wrong. When they walked down the lawns toward the forest for Care of Magical Creatures, they found her and her clipboard waiting for them beside Professor Grubbly-Plank.
- Care of Magical Creatures (Hagrid)
Professor Umbridge had arrived. She was standing a few feet away from Harry, wearing her green hat and cloak again, her clipboard at the ready. Hagrid, who had never heard Umbridge ’s fake cough before, was gazing in some concern at the closest thestral, evidently under the impression that it had made the sound.
But Harry did not have to wait for Defense Against the Dark Arts to meet Professor Umbridge. He was pulling out his dream diary in a seat at the very back of the shadowy Divination room when Ron elbowed him in the ribs and, looking round, he saw Professor Umbridge emerging through the trapdoor in the floor.
Thus, out of eight classes where we could possibly have seen Umbridge inspecting, we find her in five of them. For Herbology and History of Magic we don't know if she inspected them but it's just not mentioned, or if she did not inspect them. (I.e. it could be that she actually inspected five, six, or seven, of the classes.) The only class we know that she inspected a different year is Charms.
It appears that there was extra emphasis placed on the fifth year classes, and particularly Harry's fifth year classes. There are seven years of Transfiguration classes, and at least in Harry's year Gryffindor has it's own class. If the numbers are consistent in the other years, there could be up to 28 transfiguration classes. Thus, the odds of Harry's class being the one to get inspected could be as small as 1/28.
When it comes to Potions, Harry's classes are with Slytherin. If the rest of the school is also taught Potions two houses at a time, there could be 14 Potions classes. Thus, the odds of Harry's class being the one to get inspected would be 1/14.
Care of Magical Creatures and Divination only start from third year. The former is taught to Harry with Slytherin, so there could be 10 Care of Magical Creatures classes. Thus, the odds of Umbridge inspecting Harry's class would be 1/10 for both Hagrid and Grubbly-Plank. Divination is taught to Harry without any other houses, so there could be as many as 20 Divination classes, making the odds of Harry's getting inspected 1/20.
As we can see, the odds of any class of Harry's being the one to get inspected are pretty small. The odds of all of the ones that got inspected getting inspected becomes astronomically tiny:
(1/28)*(1/14)*(1/10)*(1/10)*(1/20) = 0.00000127551
This means that the odds of this happening are a little more than one in a million. (If my calculation is incorrect please point it out.)
This seems to indicate that Umbridge's choice of which classes to inspect could not have been coincidental.
Therefore, the question to be addressed is:
Why did Umbridge specifically choose to inspect so many of Harry's classes when she could have inspected the teachers in their other classes?
I don't think there is any particular evidence that Harry's classes were more opportune for her schedule. I am also assuming that there would be no reason for her to inspect more than one class per teacher (I am not counting additional classes that she sat in on after the initial inspections).
What, then, led her to choose specifically Harry's classes?
Might it have something to do with her relationship with him, or some point she is trying to hint to him?