The chart used by the prosecution to "prove" Letby's guilt suffers from both the prosecutor's fallacy and the Texas sharpshooter fallacy.
The Texas sharpshooter fallacy refers to a man with no shooting skills at all takes a gun and fires a load of shots at a barn, finds a few that are clustered together, draws a bullseye around them and says that he is a sharpshooter. In this case, incidents that took place when Letby was present were viewed as suspicious. Similar incidents that took place when Letby was absent were ignored.
The prosecutor's fallacy is to say that something is so unlikely to happen by chance that it must have involved wrongdoing. To give a ludicrous example, applying the same logic would mean that anyone who won the Euromillions must have cheated since it is so unlikely they would have won by chance this can be ruled out. This is the same logic that was used to wrongly convict Sally Clarke of murdering two of her children.
As many statisticians have said, the only thing the chart actually proved is that Letby was on duty when she was on duty. And, given that we now know that one of the doors was incorrectly labelled so staff entering the unit were recorded as exiting and vice versa, it doesn't even prove that.
This case has a lot of similarities to that of Lucia de Berk, a Dutch nurse who was convicted of murdering a number of babies and attempting to murder others. As with Letby, her conviction relied on dodgy statistics, faulty medical evidence and the contents of her diary. Her convictions were eventually overturned and it was found that the deaths were natural, sometimes as a result of incorrect treatment, bad hospital management or incorrect diagnosis.