Lindley's paradox
Lindley's paradox is a counterintuitive situation in statistics in which the Bayesian and frequentist approaches to a hypothesis testing problem give different results for certain choices of the prior distribution. The problem of the disagreement between the two approaches was discussed in Harold Jeffreys' 1939 textbook; it became known as Lindley's paradox after Dennis Lindley called the disagreement a paradox in a 1957 paper. Although referred to as a "paradox", the differing results from the Bayesian and frequentist approaches can be explained as using them to answer fundamentally different questions, rather than actual disagreement between  the two methods. Nevertheless, for a large class of priors the differences between the frequentist and Bayesian approach are caused by keeping the significance level fixed: as even Lindley recognized, "the theory does not justify the practice of keeping the significance level fixed<nowiki>"</nowiki> and even "some computations by Prof. Pearson in the discussion to that paper emphasized how the significance level would have to change with the sample size, if the losses and prior probabilities were kept fixed.<nowiki>"</nowiki> In fact, if the critical value increases with the sample size suitably fast, then the disagreement between the  frequentist and Bayesian approaches becomes negligible as the sample size increases. Description of the paradox. The result formula_1 of some experiment has two possible explanations, hypotheses formula_2 and formula_3, and some prior distribution formula_4 representing uncertainty as to which hypothesis is more accurate before taking into account formula_1. Lindley's paradox occurs when These results can occur at the same time when formula_2 is very specific, formula_3 more diffuse, and the prior distribution does not strongly favor one or the other, as seen below. Numerical example. The following numerical example illustrates Lindley's paradox. In a certain city 49,581 boys  and 48,870 girls have been born over a certain time period. The observed proportion formula_1 of male births is thus 49,581/98,451 ≈ 0.5036. We assume the fraction of male births is a binomial variable with parameter formula_17. We are interested in testing whether formula_18 is 0.5 or some other value. That is, our null hypothesis is formula_19 and the alternative is formula_20. Frequentist approach. The frequentist approach to testing formula_2 is to compute a p-value, the probability of observing a fraction of boys at least as large as formula_1 assuming formula_2 is true. Because the number of births is  very large, we can use a normal approximation for the fraction of male births formula_24, with formula_25 and formula_26, to compute We would have been equally surprised if we had seen 49,581 female births, i.e. formula_28, so a frequentist would usually perform a two-sided test, for which the p-value would be formula_29. In both cases, the p-value is lower than the significance level, α, of 5%, so the frequentist approach rejects formula_2 as it disagrees with the observed data. Bayesian approach. Assuming no reason to favor one hypothesis over the other, the Bayesian approach would be to  assign prior probabilities formula_31 and a uniform distribution to formula_18 under formula_33, and then to compute the posterior probability of formula_2 using Bayes' theorem, After observing formula_36 boys out of formula_37 births, we can compute the posterior probability of each hypothesis using the probability mass function for a binomial variable, where formula_39 is the Beta function. From these values, we find the posterior probability of formula_40, which strongly favors formula_2 over formula_3. The two approaches—the Bayesian and the frequentist—appear to be in conflict, and this is the "paradox". Reconciling the Bayesian and frequentist approaches. However, at least in  Lindley's example, if we take a sequence of significance levels, , such that with , then the posterior probability of the null converges to 0, which is consistent with a rejection of the null. In this numerical example, taking , results in a significance level of 0.00318, so the frequentist would not reject the null hypothesis, which is roughly in agreement with the Bayesian approach. If we use an uninformative prior and test a hypothesis more similar to that in the frequentist approach, the paradox disappears. For example, if we calculate the posterior distribution formula_43, using a uniform prior distribution on formula_17  (i.e. formula_45), we find If we use this to check the probability that a newborn is more likely to be a boy than a girl, i.e. formula_47, we find In other words, it is very likely that the proportion of male births is above 0.5. Neither analysis gives an estimate of the effect size, directly, but both could be used to determine, for instance, if the fraction of boy births is likely to be above some particular threshold. The lack of an actual paradox. The apparent disagreement between the two approaches is caused by a combination of factors. First, the  frequentist approach above tests formula_2 without reference to formula_3. The Bayesian approach evaluates formula_2 as an alternative to formula_3, and finds the first to be in better agreement with the observations. This is because the latter hypothesis is much more diffuse, as formula_17 can be anywhere in formula_54, which results in it having a very low posterior probability. To understand why, it is helpful to consider the two hypotheses as generators of the observations: Most of the possible values for formula_17 under formula_3 are very poorly supported by the observations. In essence, the apparent disagreement between the methods is not  a disagreement at all, but rather two different statements about how the hypotheses relate to the data: The ratio of the sex of newborns is improbably 50/50 male/female, according to the frequentist test. Yet 50/50 is a better approximation than most, but not "all", other ratios. The hypothesis formula_64 would have fit the observation much better than almost all other ratios, including formula_65. For example, this choice of hypotheses and prior probabilities implies the statement: "if formula_17 > 0.49 and formula_17 < 0.51, then the prior probability of formula_68 being exactly 0.5 is 0.50/0.51 formula_69 98%." Given such a  strong preference for formula_70, it is easy to see why the Bayesian approach favors formula_71 in the face of formula_72, even though the observed value of formula_73 lies formula_74 away from 0.5. The deviation of over 2 sigma from formula_71 is considered significant in the frequentist approach, but its significance is overruled by the prior in the Bayesian approach. Looking at it another way, we can see that the prior distribution is essentially flat with a delta function at formula_76. Clearly this is dubious. In fact if you were to picture real numbers as being continuous, then it would be  more logical to assume that it would impossible for any given number to be exactly the parameter value, i.e., we should assume formula_77. A more realistic distribution for formula_17 in the alternative hypothesis produces a less surprising result for the posterior of formula_2. For example, if we replace formula_3 with formula_81, i.e., the maximum likelihood estimate for formula_17, the posterior probability of formula_2 would be only 0.07 compared to 0.93 for formula_84 (Of course, one cannot actually use the MLE as part of a prior distribution). Recent discussion. The paradox continues to be a source of active discussion. Lindley