DOWNGRADING the exam results of almost 125,000 pupils in Scotland has been defended by many – not least John Swinney, the Cabinet Secretary for Education. It was necessary to protect the integrity and credibility of the overall marking system. Wales and England are having to do the same, defenders argue, and you’ve always got your appeal.

Really? This is cold and meaningless comfort for those young Scots whose dreams of being a doctor, architect, engineer or securing their university place have slipped away like tears in the rain because of arbitrary downgrading.

We were told that teacher estimates were too high in relation to past years. In the parlance of hedge fund trading everyone had to “take a haircut” – an across-the-board markdown in value. Of course, that was never true.

Traders rarely take a hit; and those from prosperous schools were marked down marginally or not at all. Those from the least advantaged communities were much more likely to be downgraded or fail because of a statistical formula applied by the Scottish Qualifications Authority (SQA).

It’s a secret recipe. No-one has seen the detailed formula – the general approach was only published the day awards were given to students.

Over the weekend, the Scottish Government signalled a change of heart. A welcome rethink. Today, thousands of parents and pupils across the country will be listening intently to the new solution Mr Swinney will reveal to the Scottish Parliament.

Whatever his plan, it has to be more than a political fudge. More than lip-service or “I feel your pain”. He has to fess up. Admit that he got this wrong. And fix it across the board. No excuses.

Treating a school pupil as an arbitrary statistic; removing their opportunity and freedom to do well; judging a generation of young people not because of what they had achieved at school, but because of where they lived, was rank discrimination.

It’s the kind of gaffe that would get you sent to the back of the class. It’s true to say this boorach wouldn’t have happened but for the pandemic – although the pandemic wasn’t the cause of the SQA’s approach.

It was back in March that the Scottish Government decided to cancel school exams due to Covid-19. It asked the SQA to develop an alternative certification model based on prelim results, coursework and the assessment of pupils by teachers. So far so good.

The fact that anyone can criticise teachers for doing what was asked of them is beyond me. The injustice comes into the equation because the estimates overall were too high, so the SQA downgraded almost one quarter of all results. It did so disproportionately and unfairly by looking at the past performance of each school over the last four years.

If your school had insufficient historical data, the teacher’s estimate was accepted as was. Historically, schools in poorer communities have performed with lower results overall.

So, you got downgraded because of your school’s historic data – even if you had a belter of a year and excelled. Tough luck. Suck it up and appeal – albeit your school has to appeal for you, and given the fixed marking criteria how will an appeal help?

In law, we call such treatment indirect discrimination. It is generally unlawful. There are two sources of legal duties on the Scottish ministers not to discriminate against pupils based on their postcode or “socio-economic” profile. These are the 2010 Equality Act and the 2016 Education (Scotland) Act.

Many independent and leading education and statistical academics have criticised the SQA’s moderation scheme as unfair and quite frankly rubbish. Professor Guy Nason of the Department of Mathematics at Imperial College can’t understand its logic as the “full algorithmic details about what is going on here” haven’t been published.

Professor Nason said: “The problem at the heart of the statistical standardisation is that it can be simultaneously unfair to individuals, but also maintain the integrity of the system. However, if system integrity damages the life chances of individuals it is not much of a system.”

Professor Lindsay Paterson of Edinburgh University has lambasted the SQA for refusing to discuss its methodology until it was too late and failing pupils on its three criteria of “fairness, integrity and safety”.

What we need is the equivalent of a “section 404” redress scheme that the Financial Conduct Authority applies where consumers have been ripped off en masse or on a large systemic scale.

There should be no need to appeal – the SQA and Mr Swinney have the power to fix this. In my view they have a moral, ethical, legal and political duty to do so. And to do so quickly.