Aim: Compute cumulative binomial distribution. cumulativeBinomial(Non,Noff,p) = Sum(Non to Non+Noff) PB(Non,Noff,p) PB(Non,Noff,p) is the probability to get Non source counts and Noff background counts, if p is the a priori probability that a count is attributed to the source (on assumption of no source)
The routine declaration is:
real(double) function cumulativeBinomial(Non, Noff, p) ! Input: ! Non : number of observed source counts ! Noff : number of observed background counts ! p : a priori probability that a count is attributed to the source real(double), intent(in) :: p integer, intent(in) :: Non, Noff