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


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

Integrated $\chi ^2$ probability

This subroutine gives the probability $P_\chi(\chi^2; \nu)$ of exceeding $\chi ^2$ for a given number of degrees of freedom $\nu$, i.e., the single-sided integrated probability, where $P_x(x^2; \nu)$ is the $\chi ^2$ probability distribution function (e.g., see Appendix C.4 in Bevington & Robinson (1992, “Data reduction and error analysis for the physical sciences”, 2nd edition)).

  subroutine integratedChi2Prob(chi2, degFree, probability, status)
    real(single), intent(in)            :: chi2
    integer,      intent(in)            :: degFree   ! or real(single)
    real(single), intent(out)           :: probability
    integer,      intent(out), optional :: status
  end subroutine integratedChi2Prob

The optional argument status is returned as follows;

Status Description
$n (n>0)$ (status in incompleteGammaQ; see math_utils, Section 19)
0 Normal end
-1 When the given chi2 $\leq 0$
-2 When the given degFree $\leq 0$
$n (n<-2)$ ((status in incompleteGammaQ) $- 2$; see math_utils, Section 19)



XMM-Newton SOC -- 2023-04-16