There aren't any general rules. The university has some guidelines as to the proportion of each grade that would be expected in a large class (see previous post), but lecturers can ignore that if they have a particularly good/bad/unusual class. Apparently they run some sort of analysis of the marks before they are handed out to check whether any lecturer is trying to give HDs to a class of students that are failing all their other subjects (or vice-versa!). In maths, the Higher subjects have lots more high grades than the ordinary level subjects.