Skip to content

komm.marcum_q

Computes the Marcum Q-function. It is given by $$ \mathrm{Q}_m(a; x) = \int_x^\infty u \left( \frac{u}{a} \right)^{m-1} I_{m-1}(a x) \exp \left( -\frac{u^2 + a^2}{2} \right) \mathrm{d}u, $$ where $I_{m-1}$ is the modified Bessel function of the first kind. This corresponds to the complementary cumulative distribution function of the non-central chi distribution with $2m$ degrees of freedom and non-centrality parameter $a$. For more details, see Wikipedia: Marcum Q-function.

Parameters:

  • m (int)

    The order of the Marcum Q-function. Should be a positive integer.

  • a (ArrayLike)

    The value of $a$. Should be a float or array of floats.

  • x (ArrayLike)

    The input to the function. Should be a float or array of floats.

Returns:

  • y (NDArray[floating] | floating)

    The value $y = \mathrm{Q}_m(a; x)$.

Examples:

>>> komm.marcum_q(1, 1, 1)
np.float64(0.7328798037968204)
>>> komm.marcum_q(2, 0.5, [1.2, 1.4, 1.6])
array([0.85225816, 0.76472056, 0.66139663])