{'fraction_non_alphanumeric': 0.0224679029957204, 'fraction_numerical': 0.0046362339514978606, 'mean_word_length': 4.724489795918367, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bayes' theorem, and its role in the law

Most legal systems, at least in developed countries, acknowledge that guilt can rarely (if ever) be established beyond any doubt at all. Instead, phrases like ‘beyond all reasonable doubt’ or ‘on the balance of probabilities’ are widely used. The latter makes explicit reference to probability as a basis for judgement: the former is more ambiguous but is interpreted by many to imply that a high probability is required. If we accept that the evaluation of a probability of guilt is appropriate, then it is important to understand what probabilities are, and how to reason with them. A probability for a proposition is a number between 0 and 1, where probability 0 means that the proposition is certainly false and probability 1 means that it is certainly true. Probabilities between these limits measure different strengths of belief in the proposition. For the proposition of guilt to be established ‘on the balance of probabilities’ it is only necessary for its probability to be greater than one-half. For proof ‘beyond all reasonable doubt,’ it should be close to 1, but it is not clear how close; 0.999 is arguably high enough for most purposes, but 0.9 may be thought to leave more than a reasonable doubt. If the assessment of probabilities of guilt were to assume a central role in English criminal law, for instance, then some precedents would need to be established to put a value on ‘reasonable doubt.’ The theory of probability that most clearly has relevance for the determination of probabilities of guilt holds that probability is an opinion. There is no objective value for such a probability, and in particular in a trial by jury each juror would be entitled to his or her own opinion. Nevertheless, it is clear that such an opinion should only be reached through careful consideration of the evidence. A powerful tool in linking evidence to probability of guilt is Bayes’ theorem, named after the 18th century mathematician and clergyman Thomas Bayes. To determine the probability of guilt in the light of the evidence, which is known as the posterior probability, Bayes’ theorem combines two distinct aspects of opinion. The first is the prior probability, which is the probability of guilt before incorporating any of the evidence given at the trial. The second is the probability that the facts related in the evidence could have occurred in the case (a) of guilt and (b) of innocence. These two probabilities are the contribution of the evidence and are conventionally called likelihoods. If we denote the prior probability of guilt by PG, the likelihood for guilt from the evidence by LG and the likelihood for innocence from the evidence by LI, then Bayes’ theorem says that the posterior probability of guilt may be obtained as follows.