XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

Poisson probability

This returns the probability $P(i)$ of the occurrence of an integer $i$ according to the Poisson distribution

$\displaystyle P(i) = \frac{a^i exp(-a)}{i!}
$

where $a$ is the average or expectation value of $i$.

Note that the argument may also be a real number. In this case what is returned is

$\displaystyle p(r) = \frac{a^r exp(-a)}{\Gamma(r+1)}
$

The value $p$ is not quite a probability density: it would need to be normalized by

$\displaystyle \int_{0}^{\inf} dr \; \frac{a^r exp(-a)}{\Gamma(r+1)}
$

in order for this to be true. However it does have the property that, if $r=i$, $p(r)=P(i)$.

  interface poissonProb
    real function poissonProbSingle(av, realI)
      real(single), intent(in) :: av, realI
    end function poissonProbSingle

    real function poissonProbInt32(av, i)
      real(single), intent(in) :: av
      integer(int32), intent(in) :: i
    end function poissonProbInt32
  end interface



XMM-Newton SOC -- 2023-04-16