Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2017;32(2):763-779.
doi: 10.1007/s00180-016-0701-3. Epub 2016 Dec 8.

Computing the noncentral- F distribution and the power of the F-test with guaranteed accuracy

Affiliations

Computing the noncentral- F distribution and the power of the F-test with guaranteed accuracy

Ali Baharev et al. Comput Stat. 2017.

Abstract

The computations involving the noncentral-F distribution are notoriously difficult to implement properly in floating-point arithmetic: Catastrophic loss of precision, floating-point underflow and overflow, drastically increasing computation time and program hang-ups, and instability due to numerical cancellation have all been reported. It is therefore recommended that existing statistical packages are cross-checked, and the present paper proposes a numerical algorithm precisely for this purpose. To the best of our knowledge, the proposed method is the first method that can compute the noncentrality parameter of the noncentral-F distribution with guaranteed accuracy over a wide parameter range that spans the range relevant for practical applications. Although the proposed method is limited to cases where the the degree of freedom of the denominator of the F test statistic is even, it does not affect its usefulness significantly: All of those algorithmic failures and inaccuracies that we can still reproduce today could have been prevented by simply cross-checking against the proposed method. Two numerical examples are presented where the intermediate computations went wrong silently, but the final result of the computations seemed nevertheless plausible, and eventually erroneous results were published. Cross-checking against the proposed method would have caught the numerical errors in both cases. The source code of the algorithm is available on GitHub, together with self-contained command-line executables. These executables can read the data to be cross-checked from plain text files, making it easy to cross-check any statistical software in an automated fashion.

Keywords: ANOVA; Interval arithmetic; Minimal detectable differences; Noncentrality parameter; Self-validating numerical method.

PubMed Disclaimer

References

    1. Alefeld G, Herzberger J. Introduction to interval computations. New York: Academic Press; 1983.
    1. Baharev A (2016) Rigorous enclosures of minimal detectable differences for general anova models. https://github.com/baharev/mindiffver
    1. Baharev A, Kemény S. On the computation of the noncentral F and noncentral beta distribution. Stat Comput. 2008;18:333–340. doi: 10.1007/s11222-008-9061-3. - DOI
    1. Benton D, Krishnamoorthy K. Computing discrete mixtures of continuous distributions: noncentral chisquare, noncentral t and the distribution of the square of the sample multiple correlation coefficient. Comput Stat Data Anal. 2003;43(2):249–267. doi: 10.1016/S0167-9473(02)00283-9. - DOI
    1. Berz M, Bischof C, Corliss G, Griewank A. Computational differentiation: techniques, applications, and tools. Philadelphia: SIAM; 1996.

LinkOut - more resources