Appendix B The beta function is defined by β ( a , b ) = ∫ 0 1 t a − 1 ( 1 − t ) b − 1 d t       ( 70 ) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacqWFYoGycqGGOaakcqWGHbqycqGGSaalcqWGIbGycqGGPaqkcqGH9aqpdaWdXaqaaiabdsha0naaCaaaleqabaGaemyyaeMaeyOeI0IaeGymaedaaOGaeiikaGIaeGymaeJaeyOeI0IaemiDaqNaeiykaKYaaWbaaSqabeaacqWGIbGycqGHsislcqaIXaqmaaGccqWGKbazcqWG0baDcaWLjaGaaCzcaiabcIcaOiabiEda3iabicdaWiabcMcaPaWcbaGaeGimaadabaGaeGymaedaniabgUIiYdaaaa@4D5E@ for all a, b > 0. The incomplete beta function for all x ∈ [0,1] is then defined by β ( x , a , b ) = ∫ 0 x t a − 1 ( 1 − t ) b − 1 d t       ( 71 ) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaaiiGacqWFYoGycqGGOaakcqWG4baEcqGGSaalcqWGHbqycqGGSaalcqWGIbGycqGGPaqkcqGH9aqpdaWdXaqaaiabdsha0naaCaaaleqabaGaemyyaeMaeyOeI0IaeGymaedaaaqaaiabicdaWaqaaiabdIha4bqdcqGHRiI8aOGaeiikaGIaeGymaeJaeyOeI0IaemiDaqNaeiykaKYaaWbaaSqabeaacqWGIbGycqGHsislcqaIXaqmaaGccqWGKbazcqWG0baDcaWLjaGaaCzcaiabcIcaOiabiEda3iabigdaXiabcMcaPaaa@5037@ and β − ( x , a , b ) = β ( a , b ) − β ( x , a , b )       ( 72 ) = ∫ x 1 t a − 1 ( 1 − t ) b − 1 d t ( 73 ) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeGabaabfuaabmqaciaaaeaaiiGacqWFYoGydaahaaWcbeqaaiabgkHiTaaakiabcIcaOiabdIha4jabcYcaSiabdggaHjabcYcaSiabdkgaIjabcMcaPiabg2da9iab=j7aIjabcIcaOiabdggaHjabcYcaSiabdkgaIjabcMcaPiabgkHiTiab=j7aIjabcIcaOiabdIha4jabcYcaSiabdggaHjabcYcaSiabdkgaIjabcMcaPiaaxMaacaWLjaaabaWaaeWaaeaacqaI3aWncqaIYaGmaiaawIcacaGLPaaaaeaacqGH9aqpdaWdXaqaaiabdsha0naaCaaaleqabaGaemyyaeMaeyOeI0IaeGymaedaaaqaaiabdIha4bqaaiabigdaXaqdcqGHRiI8aOGaeiikaGIaeGymaeJaeyOeI0IaemiDaqNaeiykaKYaaWbaaSqabeaacqWGIbGycqGHsislcqaIXaqmaaGccqWGKbazcqWG0baDaeaadaqadaqaaiabiEda3iabiodaZaGaayjkaiaawMcaaaaaaaa@66A5@ Using a continued fraction representation, these functions can be quickly numerically evaluated in O(max⁡(a,b) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaGcaaqaaiGbc2gaTjabcggaHjabcIha4jabcIcaOiabdggaHjabcYcaSiabdkgaIjabcMcaPaWcbeaaaaa@3617@) in the worst case [15, Chapter 6]. A great interest of this function is that it is connected to the cumulative distribution function of a binomial distribution by the following relation: ℙ ( ℬ ( n , p ) ≥ k ) = β ( p , k , n − k + 1 ) β ( k , n − k + 1 )       ( 74 ) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBamrtHrhAL1wy0L2yHvtyaeHbnfgDOvwBHrxAJfwnaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaWaaeGaeaaakeaatuuDJXwAK1uy0HMmaeXbfv3ySLgzG0uy0HgiuD3BaGqbaiab=LriqjabcIcaOGWaaiab+XsicjabcIcaOiabd6gaUjabcYcaSiabdchaWjabcMcaPiabgwMiZkabdUgaRjabcMcaPiabg2da9maalaaabaacciGae0NSdiMaeiikaGIaemiCaaNaeiilaWIaem4AaSMaeiilaWIaemOBa4MaeyOeI0Iaem4AaSMaey4kaSIaeGymaeJaeiykaKcabaGae0NSdiMaeiikaGIaem4AaSMaeiilaWIaemOBa4MaeyOeI0Iaem4AaSMaey4kaSIaeGymaeJaeiykaKcaaiaaxMaacaWLjaGaeiikaGIaeG4naCJaeGinaqJaeiykaKcaaa@6AD6@ with (n, k) ∈ ℕ* × ℕ, 0 ≤ k ≤ n and p ∈ [0,1]. Finally, let us remark that the incomplete beta function is differentiable in x and that ∂ β ( x , a , b ) ∂ x = x a − 1 ( 1 − x ) b − 1       ( 75 ) MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaGGaciab=jGi2kab=j7aIjabcIcaOiabdIha4jabcYcaSiabdggaHjabcYcaSiabdkgaIjabcMcaPaqaaiab=jGi2kabdIha4baacqGH9aqpcqWG4baEdaahaaWcbeqaaiabdggaHjabgkHiTiabigdaXaaakiabcIcaOiabigdaXiabgkHiTiabdIha4jabcMcaPmaaCaaaleqabaGaemOyaiMaeyOeI0IaeGymaedaaOGaaCzcaiaaxMaacqGGOaakcqaI3aWncqaI1aqncqGGPaqkaaa@4D4F@