[Paper Review] Computation of the Marcum Q-function
This paper presents a robust, high-accuracy algorithm for computing the generalized Marcum Q-function and its complementary P-function over a wide parameter range. It combines series expansions, integral representations, asymptotic approximations, and recurrence relations to achieve relative accuracy near 10⁻¹² for parameters up to 200, with improved accuracy and reliability over MATLAB's marcumq function, especially for non-integer μ and small P-values.
Methods and an algorithm for computing the generalized Marcum $Q-$function ($Q_μ(x,y)$) and the complementary function ($P_μ(x,y)$) are described. These functions appear in problems of different technical and scientific areas such as, for example, radar detection and communications, statistics and probability theory, where they are called the non-central chi-square or the non central gamma cumulative distribution functions. The algorithm for computing the Marcum functions combines different methods of evaluation in different regions: series expansions, integral representations, asymptotic expansions, and use of three-term homogeneous recurrence relations. A relative accuracy close to $10^{-12}$ can be obtained in the parameter region $(x,y,μ) \in [0,\,A] imes [0,\,A] imes [1,\,A]$, $A=200$, while for larger parameters the accuracy decreases (close to $10^{-11}$ for $A=1000$ and close to $5 imes 10^{-11}$ for $A=10000$).
Motivation & Objective
- To develop a reliable and accurate algorithm for computing the Marcum Q-function and its complementary P-function for real μ ≥ 1, extending beyond integer-only support.
- To address numerical instability and accuracy loss in existing implementations, particularly when computing P = 1 - Q for small P-values.
- To provide a comprehensive computational framework valid across a large parameter range, including high values of μ, x, and y.
- To improve upon MATLAB’s marcumq function by enabling non-integer μ and avoiding catastrophic cancellation in P-function evaluation.
- To deliver a Fortran 90 module with verified performance and accuracy across diverse parameter regions.
Proposed method
- The algorithm uses a hybrid approach combining series expansions in terms of incomplete gamma functions, integral representations, asymptotic expansions, and three-term recurrence relations for stability.
- It applies series expansions for small x and y, asymptotic approximations for large μ, and numerical quadrature in intermediate regions to ensure accuracy.
- The method dynamically selects the optimal evaluation strategy based on the parameter region (x, y, μ), ensuring robustness across the full domain.
- The algorithm leverages known efficient routines for computing incomplete gamma function ratios P_μ(y) and Q_μ(y), which are key components in the series expansions.
- It uses recurrence relations to propagate values efficiently and reduce computational cost, especially for large μ.
- The implementation is encapsulated in a Fortran 90 module, designed for high performance and numerical stability.
Experimental results
Research questions
- RQ1How can the Marcum Q-function be computed with high relative accuracy across a broad range of real parameters μ, x, and y?
- RQ2What are the limitations of existing implementations like MATLAB’s marcumq, particularly for non-integer μ and small P-values?
- RQ3Can a unified algorithm combining multiple analytical methods achieve both high accuracy and computational efficiency?
- RQ4How does the accuracy of the proposed algorithm compare to MATLAB’s marcumq in problematic parameter regions?
- RQ5What are the dominant sources of error in existing implementations, and how can they be mitigated?
Key findings
- The algorithm achieves a relative accuracy of approximately 10⁻¹² for parameters in the region (x, y, μ) ∈ [0, 200] × [0, 200] × [1, 200].
- For larger parameters, such as A = 1000 and A = 10000, the accuracy degrades to about 10⁻¹¹ and 5×10⁻¹¹, respectively, but remains reliable above the underflow threshold of 10⁻²⁹⁰.
- The algorithm outperforms MATLAB’s marcumq function in both speed and accuracy, with evaluation times about 40 times faster (2×10⁻⁴ s vs. 8×10⁻³ s) in the [0,200]³ region.
- MATLAB’s marcumq exhibits severe errors, including incorrect jumps, machine-epsilon outputs, and underflow artifacts, especially near y ≈ x + μ for large μ, with some results deviating by over 100%.
- For μ = 800, x = 0.4, y = 810, MATLAB returns Q ≈ 0.0053 while the correct value is approximately 0.3632, indicating critical failure in that region.
- The proposed algorithm avoids such errors entirely and maintains accuracy even in the underflow region, with errors only arising from series truncation when values are extremely small.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.