Revista de Matema´tica: Teor´ıa y Aplicaciones 2003 10(1–2) : 57–76 cimpa – ucr – ccss issn: 1409-2433 a comparison of approximations to percentiles of the noncentral chi2-distribution Hardeo Sahai∗ Mario Miguel Ojeda† Recibido: 26 Jun 2002 Abstract Various approximations to percentiles of the noncentral χ2-distribution are exam- ined for their accuracy over a wide range of values of the parameters of the distribution. Keywords: Distribucio´n de probabilidad, percentiles, aproximacio´n nume´rica. Resumen Se examinan varias aproximaciones de los percentiles de la distribucio´n χ2 no centrada, debido a su precisio´n en un amplio rango de valores de los para´metros de la distribucio´n. Palabras clave: Probability distribution, percentiles, numerical approximation. Mathematics Subject Classification: 62E17. 1 Introduction and summary It is widely recognized that the noncentral χ2-distribution is of considerable theoretical and practical importance in many mathematical and statistical applications. For instance, noncentral χ2 has applications in deriving expected values of quadratic forms in analysis of variance (Graybill, 1976, pp. 139-140), in approximating the nonnull distribution and power of the χ2-test of goodness of fit (Tiku, 1985), as well as certain other nonparametric tests (Andrews, 1954; Lehmann, 1975, p. 2 47). In addition, noncentral χ2 also appears in the derivation of asymptotic (n tends to infinity) nonnull distribution of the Hotelling’s ∗Department of Biostatistics and Epidemiology, University of Puerto Rico, San Juan, Puerto Rico 00936, USA. E-Mail: †Facultad de Estad´ıstica e Informa´tica, Universidad Veracruzana, Av. Xalapa s/n esquina A´vila Ca- macho, Xalapa, Veracruz, Me´xico. E-Mail: mojeda@uv.mx 57 58 h. sahai – m.m. ojeda T 2 (Anderson, 1984, pp.163-164; Tiku, 1985), and that of likelihood ratio-statistics for tests of multivariate linear hypotheses (Wilks, 1962, p. 419; Sugiura, 1968; Graybill, 1976, pp. 189-190). In many applications involving the noncentral χ2 one has to compute its percentiles involving the evaluation of the inverse probability functions (see, e.g., Bagui, 1996). How- ever, the evaluation of such inverse functions is extremely tedious involving slow and expensive techniques of numerical iteration such as the Newton-Raphson procedure (see, e.g., Ralston and Wilf, 1967; Carnahan et al., 1969). There are a number of approxima- tions for computing the percentage points of the noncentral χ2–distribution, at arbitrary probability levels, available in the literature. The applicability of several of these approx- imations is further enhanced by ease of their computational simplicity. The purpose of this paper is to compare many of these approximations to determine their accuracy. Some of these approximations were previously investigated by Patnaik (1949), Pearson (1959), Sankaran (1959, 1963), and Cox and Reid (1987). A brief description of each procedure is given and appropriate tables comparing their accuracy, calculated for each procedure, are presented. A more comprehensive set of tables is given in Sahai and Ojeda (1998). 2 Approximations The noncentral χ2-distribution was obtained by Fisher (1928, p. 663), as a limiting case of the distribution of the multiple correlation coefficient, who also gave upper 5% points of the distribution for certain selected values of the degrees of freedom and the noncentrality parameter. There are many approximations to the noncentral χ2-distribution discussed in the literature which can be used to compute the percentiles of the distribution. Some of the important ones are considered here. In this paper, χ ′2 ν (λ) will be used to denote a noncentral χ 2-variate with ν degrees of freedom and the noncentrality parameter λ. In addition, χ ′2 ν,α(λ) will denote its 100α-th percentile defined by Pr [ χ ′2 ν (λ) ≤ χ ′2 ν,α(λ) ] = α. (1) Patnaik (1949) suggested an approximation of χ ′2 ν (λ) by cχ2f where c and f , obtained by equating the first two moments of the two variables, are c = (ν + 2λ) / (ν + λ) and f = (ν + λ)2 / (ν + 2λ) . (2) Patnaik (1949) also proposed a normal approximation of χ ′2 ν (λ) which consists in first approximating χ′2ν (λ) by cχ2f and then approximating √ 2χ2f by a normal variate with mean √ 2f − 1 and variance 1. The resulting approximation is: { [2 (ν + λ) / (ν + 2λ)]χ′2ν }1/2 has a normal distribution with mean {[ 2(ν + λ)2/(ν + 2λ) ]− 1}1/2 and variance 1. We will refer the two Patnaik’s approximations as the Patnaik’s 1st and 2nd approximations, respectively. Pearson (1959) suggested an improvement to the approximation (2) which consists in approximating χ ′2 ν (λ) by b + cχ2f where b, c and f , obtained by equating the first three approximations to percentiles of the noncentral χ2-distribution 59 moments of the two variables, are b = −λ2/(ν + 3λ), c = (ν + 3λ)/(ν + 2λ) and f = (ν + 2λ)3/(ν + 3λ)2 (3) Abdel-Aty (1954) also considered a normal approximation which consists in first ap- proximating χ ′2 ν (λ) by cχ2f and then applying the Wilson-Hilferty (1931) approximation to the central χ2f . The resulting approximation is: { (ν + λ)−1 χ′2ν (λ) }1/3 has a normal distribution with mean 1−2 (ν + 2λ) /9(ν + λ)2 and variance 2 (ν + 2λ) / 9 (ν + λ)2. Sankaran (1959, 1963) discussed among others the following normal approximations of χ ′2 ν (λ): (i) [ χ′2ν (λ)− (ν − 1) /2 ]1)/2 has a normal distribution with mean [λ+ (ν − 1)) /2]]1/2 and variance 1. (ii) { χ ′2 ν (λ)−(ν−1)/3 ν+λ }1/2 has a normal distribution with mean 1− ν + 2 6r − ν 2 − 2ν + 10 72r2 − ν 3 − 12ν2 − 6ν + 44 432r3 −5ν 4 − 28ν3 + 24ν2 + 1112ν − 1028 10368r4 and variance 1− ν−16r − ν 2+ν−2 18r2 − 4ν 3−9ν2−228ν+233 216r3 r where r = ν + λ. (iii) [ χ ′2 ν λ/(ν + λ) ]h has a normal distribution with mean 1 + h(h − 1)(ν + 2λ) (ν + λ)2 − h(h − 1)(2− h)(1 − 3h)(ν + 2λ) 2 2(ν + λ)4 and variance [ 2h2(v + 2λ) (ν + λ)2 ] [ 1− (1− h)(1− 3h)(ν + 2λ) (ν + λ)2 ] , where h = 1− 2(ν + λ)(ν + 3λ) 3(ν + 2λ)2 . We will call these approximations as Sankaran’s 1st, 2nd and 3rd approximations, respectively. Johnson (1959) developed a simple normal approximation of χ′2ν (λ) via Pr [ χ ′2 ν (λ) ≤ t ] ≈ Pr { Z ≤ (t− ν − λ+ 1)/ [2 (ν + 2λ)]1/2 } (4) by applying a normal approximation to the right hand side of the equation Pr [ χ′2ν (λ) ≤ t ] = Pr [X1 −X2 ≥ ν/2] , 60 h. sahai – m.m. ojeda where X1 and X2 are independent Poisson variables with mean t/2 and λ/2, respectively. Johnson and Kotz (1970, p. 141) suggested a simple normal approximation of χ′2ν(λ) by its direct standardization via Pr [ χ′(νλ) ≤ t ] ≈ Pr { Z ≤ (t− ν − λ)/ [2(ν + 2λ)]1/2 } . (5) In both approximations (4) and (5) the error as (λ → ∞) is O(λ−1/2), uniformly in t. Approximations (4) and (5) although extremely simple are not very accurate and have been included here for the sake of completeness. Bol’shev and Kuznetzov (1963), using a method in which the distribution of χ′2ν(λ) is related to the distribution of central χ2ν with the same number of degrees of freedom, gave an approximation as (see also Johnson et al. 1995, pp. 465–466): Pr [ χ ′2 ν (λ) ≤ t ] ≈ Pr { χ2ν ≤ t [ 1− λ ν + 1 2 ( λ2/ν2 )( 1 + t ν + 2 ) O(λ3) ]} , (6) where O (λ3) is uniform in any finite interval of t, λ⇒ 0, leading to the approximation: χ′2ν,α(λ) ≈ χ2ν,α + (λ/ν)χ2ν,α + 1 2 (λ/ν)2 [ 1− 1 ν + 2 χ2ν,α ] χ2ν,α. (7) Approximation (7) is not very accurate, but has been included here for the sake of completeness. For small values of ν, the quality of the approximation deteriorates rapidly as λ increases. For very large values of ν, the approximation improves somewhat but is still not to be recommended. Cox and Reid (1987) considered the approximation Pr [ χ′2ν(λ) ≤ t ] ≈ Pr{χ2ν ≤ t/ (1+λ/ν)} . (8) Approximation (8) is valid for λ→ 0 as ν →∞. Note that ignoring the third term in the brackets in (6) gives an approximation which is asymptotically equivalent to (8). In addition, Cox and Reid (1987) proposed approximating χ′2ν(λ) by the linear com- bination (1− λ/2)χ2ν + (λ/2)χ2ν+2, prompted by a result given in Barndorff-Nielsen and Cox (1985, Equation 1.6). We will call these approximations as Cox-Reid’s 1st and 2nd approximations, respectively. Temme (1993) gave a simple and useful approximation, for large values of t and λ, as Pr [ χ′2ν(λ) ≤ t ] ≈  (t/λ) (ν−1)/4 [ 1− Φ (√ 2λ−√2t )] , t ≤ λ 1− (t/λ)(ν−1)/4 [ 1− Φ (√ 2t−√2λ )] , t > λ. (9) Although approximation (9) is quite simple for evaluating a probability expression, it requires the use of an iterative procedure to compute the corresponding percentile value and is not included in our comparative study. approximations to percentiles of the noncentral χ2-distribution 61 Finally, we note a simple empirical approximation, reported by Tukey (1957), to the 95th percentiles of χ′2ν(λ) given by χ ′2 ν,0.95(λ) ≈ [ 1.6449 + √ λ+ 0.51 ν − 1√ λ+ 1 − 0.024(ν − 5)(ν − 1)√ λ( √ λ+ 1) ]2 . (10) Although approximation (10) is limited to only 95th percentiles, it has been included here for detailed comparison in view of its usefulness, simplicity and accuracy. 3 Results The percentiles of χ′2ν(λ) calculated for various approximations as well as the exact values, for selected values of α, ν and λ, are shown in Table 2. For higher values of percentiles, the Patnaik’s central χ2 approximation is the most accurate, when ν and λ are small. In this situation, the 1st and 3rd approximations of Sankaran are also quite accurate. For lower percentiles, the 3rd approximation of Sankaran performs best; and for small values of ν and λ, the Patnaik’s central χ2 approximation is also quite accurate. Johnson and Johnson-Kotz type approximations differ by a percentile of one unit and give satisfactory results for higher percentiles and large values λ. Bol’shev-Kuznetzov and the two Cox- Reid approximations have extremely poor performance for simultaneously small values of ν and large values of λ. However, their accuracy improves dramatically for large values of ν, but are still not to be recommended. Tukey’s empirical approximation for the 95th percentile, although quite accurate for small values of ν progressively degenerates as ν increases. Acknowledgements The exact percentiles of the noncentral χ2-distribution were calculated using AMOSLIB, a special function library prepared at Sandia Laboratories, Albuquerque, New Mexico. We are indebted to Dr. Donald E. Amos for his courtesy in providing the pertinent information about the routines including the necessary software to perform the requisite computations. We also thank Professor Constance van Eeden for reading a preliminary draft of the manuscript and making some helpful comments and suggestions. This work would not have been possible without the generous dedication of time and efforts by Rafael Guajardo Panes and Lorena Lo´pez whose contributions are gratefully acknowledged. Referencias [1] Abdel-Aty, S.H. (1964) “Approximate formulae for the percentage points and the probability integral of the noncentral χ2 distribution”, Biometrika 41: 538–540. [2] Anderson, T. W. (1984) An Introduction to Multivariate Statistical Analysis, 2nd ed. John Wiley and Sons, New York. [3] Andrews, F. C. (1964) “Asymptotic behavior of some rank tests for analysis of variance”, Annals of Mathematical Statistics 25: 727–736. 62 h. sahai – m.m. ojeda [4] Bagui, S. C. (1996) CRC Handbook of Percentiles of Noncentral Distributions. CRC Press, Boca Raton, Florida. [5] Bol’shev, L. N.; Kuznetzov, P. I. (1963) “On the calculation of the integral p(x,y)=...”,. Computational and Mathematical Physics 3: 557–571. (English translation from Russian). [6] Carnahan, B.; Luther, H. A.; Wilkes, J. O. (1969) Applied Numerical Methods. John Wiley and Sons, New York. [7] Cox, D. R.; Reid, N. (1987) “Approximations to noncentral distributions”, Canadian Journal of Statistics 15: 105–114. [8] Fisher, R. A. (1928) “The general sampling distribution of the multiple correlation coefficient”, Proceedings of the Royal Society of London, Series A 121: 654–673. [9] Graybill, F. A. (1976) Theory and Application of the Linear Model. Duxbury Press, North Scituate, Massachusetts. [10] Johnson, N. L. (1959) “On the extension of the connection between Poisson and χ2 distribu- tions”, Biometrika 46: 352–363. [11] Johnson, N. L.; Kotz, S. (1970) Continuous Univariate Distributions, Vol.2. John Wiley and Sons, New York. [12] Johnson, N. L.; Kotz, S.; Balkrishnan, N. (1995) Continuous Univariate Distributions, Vol. 2, 2nd ed. John Wiley and Sons, New York. [13] Lehmann, E. L. (1975)Nonparametrics: Statistical Methods Based on Ranks.Holden-Day, Inc., Oakland, California. [14] Patnaik, P. B. (1949) “The noncentral χ2 and F -distributions and their applications”, Bio- metrika 36: 202–232. [15] Pearson, E. S. (1959) “Note on an approximation to the distribution of noncentral χ2”, Bio- metrika 46: 364. [16] Ralston, A.; Wilf, H. (1967) Mathematical Methods for Digital Computers. John Wiley and Sons, New York. [17] Sahai, H.; Ojeda, M. M. (1998) Approximations to percentiles of the noncentral t, χ2 and F Distributions. University of Veracruz Press, Xalapa, Me´xico. [18] Sankaran, M. (1959) “On the Noncentral Chi-Square Distribution”, Biometrika 46: 235–237. [19] Sankaran, M. (1963) “Approximations to the noncentral chi-square distribution”, Biometrika 50 199–204. [20] Temme, N. M. (1993) “Asymptotic and numerical aspects of the noncentral chi-square distri- bution”, Computers in Mathematics and Applications 25: 55–63. [21] Tiku, M. L. (1985) “Noncentral chi-square distribution”, In: S. Kotz & N. L. Johnson (Eds.) Encyclopedia of Statistical Science, Vol. 6. John Wiley and Sons, New York: 276–280. [22] Tukey, J. W. (1957) “Approximations to the upper 5% points of Fisher’s B distribution and noncentral χ2”, Biometrika 44: 528–530. [23] Wilks, S. S. (1962) Mathematical Statistics. John Wiley and Sons, New York. [24] Wilson, E. B.; Hilferty, M. M. (1931) “The distribution of chi-square”, Proceedings of the National Academy of Sciences (U. S. A.) 19: 684–688.