When Professor Sir Roy Meadow retired in 1998, the senate of Leeds University passed a resolution extolling the career of this "major figure in national and international child health". One of Britain's most eminent paediatricians, he was a distinguished academic knighted for his achievements, first president of the Royal College of Paediatrics and Child Health which he had been instrumental in founding, discoverer of a rare form of child abuse which he named Munchausen syndrome by proxy but which many dubbed simply "Meadow's syndrome".

No wonder the crown rushed to sign him up as an expert when parents were charged with killing their own babies. His credentials were unrivalled and he was a most persuasive prosecution witness, skilled at getting his points over simply and memorably to the jury.

He must wish now he had persevered with his original interest, treating children with kidney diseases, and had never branched out into child abuse. His reputation is in tatters, the tag "discredited" almost always attached to his name. Sally Clark, Angela Cannings and Donna Anthony, each convicted of killing two babies partly on his evidence, have been dramatically freed after their convictions were ruled unsafe. Any attempt by the crown nowadays to call Meadow as a witness would, as Michael Mansfield QC put it in his opening statement in Cannings' successful appeal, have to come with a health warning.

Today, 72-year-old Meadow, who has kept a low profile amid the vituperation heaped upon him, will appear before the General Medical Council to answer a charge of serious professional misconduct. But is he solely to blame for what went wrong? After Cannings was freed, some newspapers reported that the judgment on her appeal had spurred the attorney general to trawl through hundreds of cases in which Meadow's evidence had helped put a mother behind bars. Not so: the cases under scrutiny were all those where a parent or carer had been convicted of killing a child but where experts were in dispute and there was no other cogent evidence. Many did not involve Meadow at all. Where he did give evidence he was just one of an array of prosecution experts.

Munchausen syndrome by proxy, the bizarre form of child abuse in which carers, usually mothers, fabricate, exaggerate or induce symptoms of illness in their children to gain attention for themselves, has been dismissed by some of the media as a theory dreamed up by Meadow. Yet few child protection specialists doubt that MSBP, now rebranded as a "factitious or induced illness", actually exists, though it is undoubtedly rare. Mothers have been covertly recorded on videotape interfering with their children's breathing and some have eventually admitted making up or bringing on symptoms in their healthy children. The leading children's hospital, Great Ormond Street in London, sees 10 to 12 cases each year.

The GMC will not, as one tabloid promised last week, "investigate his ... child abuse theory of Munchausen syndrome by proxy". It will not look at his role in the Cannings case nor in that of Trupti Patel, who was swiftly acquitted by a jury of killing her three babies despite Meadow's evidence, or other cases, such as that of Donna Anthony, in which his testimony helped to secure a murder conviction. The GMC is accusing Meadow of straying beyond his expertise and giving erroneous statistical evidence in Sally Clark's case about the small chances of two cot deaths in a family like hers.

At the time, a government-funded research team, the Confidential Enquiry into Sudden Death in Infancy (Cesdi), was about to publish a new report. The jury was shown a table from the Cesdi report which showed a one-in-8,543 risk of cot death for a baby from a family where the mother was over 26, at least one parent was employed and neither was a smoker - a family, in other words, like the Clarks. To work out the risk of two cot deaths in such a family, Meadow told the jury, you would multiply 8,543 by 8,543 to reach a risk of one in 73 million. With 700,000 live births a year in England, Wales and Scotland, it was an event that would happen by chance "about once every hundred years".

The evidence was clearly wrong. It took no account of any possible genetic predisposition or any unrecognised environmental factors. The risk for a family which has already had a cot death is not the same as for a family which has never had one. If two cot deaths are so extraordinarily rare, what is the point of the Coni (Care of Next Infant) programme, designed to minimise the chances that a second infant might die like its sibling? The reality, as a study published last December in the Lancet found, is that second sudden infant deaths in the same family are much more likely to be from natural than unnatural causes. And, as the Royal Statistical Society later pointed out, the proper exercise would be to compare the chances of two cot deaths with the chances - also rare - of two murders in the same family.

There were no statistical experts in the Clark case, and the defence did not raise any objection to the evidence at the trial. Meadow later admitted: "I did not explain the limited significance and I regret I didn't. But in court, it was not a defining moment."

By the time the case first went to the appeal court in 2000, however, it was obvious that seriously misleading information had been put before the jury. The statistical error formed the main plank of Clark's first appeal. But the appeal court refused to allow evidence from statistical experts, arguing that it was "hardly rocket science". The three judges acknowledged that Meadow's evidence was incorrect, yet decided it was of "minimal significance" because there was an "overwhelming case" against Clark at her trial and the jury would still have convicted even without the misleading statistic. It was not until after the first appeal that Clark's legal team discovered that the Home Office pathologist Alan Williams had failed to disclose microbiology results on their second baby, Harry, raising the possibility of a death from natural causes. But surely there was an obvious danger that the jury, faced with the task of disentangling conflicting expert views about the significance of complex postmortem findings, would have seized upon the simple clarity of "one in 73 million". The judges who heard Clark's second appeal thought so. Although they quashed her convictions because of the failings by Williams, they said Meadow's error would have been enough to make the conviction unsafe.

Why weren't the flaws in the use of cot death statistics in murder cases picked up years ago? Meadow is not the only expert witness to have cited them, nor is Clark's the first case in which they were before a jury. In Donna Anthony's case, seven years ago, Meadow and another expert told the court that the chances of two cot deaths in a case like hers were one in 1 million - the main reason her conviction for killing her two babies was quashed last April, although the judges pointed out there was other "cogent and disturbing" evidence against her apart from the medical evidence.

But as the Commons science and technology committee noted last March in its report on forensic science, while Meadow has been almost universally vilified, lawyers and judges - who might have been able to prevent miscarriages of justice but failed to do so - have escaped criticism. Professor Sir Alec Jeffreys, the inventor of DNA fingerprinting, told the committee he was amazed that the flaws in the statistical evidence were "not tracked right at the beginning". It was, he said, "a failure not only of the experts but also of the courts".

The whole saga, the committee concluded, was nothing less than a "systems failure". But the failings go much deeper and wider than the use of dubious statistical evidence. The Clark and Cannings cases, and the "shaken baby" cases now being heard in the court of appeal, have exposed just how uncertain, given the state of scientific knowledge, is the task of diagnosing whether a baby was smothered or shaken. The problem has been compounded by cursory postmortems where deaths were not thought suspicious at the time. Yet some experts have been willing to pronounce themselves certain where, in reality, no certainty exists.

The royal colleges for pathologists and paediatricians are implementing reforms to try to minimise the risk of miscarriages of justice - skilled investigations and postmortems for every sudden infant death, insisting on training for expert witnesses, trying to firm up the evidence base on the signs and symptoms of abuse. But judges and lawyers must do their part too. As part of their witness training, doctors will be told "that it's very important not to stray beyond your level of expertise, to be aware of what your level of expertise is, and not to be pushed by pushy barristers into being more certain than you want to, given the evidence that you have," explains Sir Alan Craft, president of the Royal College of Paediatrics and Child Health. "That's been a big problem in the past, that lawyers have said, 'Come on, doctor, you can be more certain than that, that's not very helpful to us.'

"Doctors shouldn't be flying kites unless they say they are flying kites. And the judiciary should know that they have actually got to question where expert witnesses get their opinions from."