Trans. Tianjin Univ. 2013, 19: 381-384 DOI 10.1007/s12209-013-1978-8
Quadratic Radical Function Better Than Fisher z Transformation* Yang Zhengling (杨正瓴)1,2,Duan Zhifeng (段志峰)1,Wang Jingjing (王晶晶)1, Wang Teng (王 腾)1,Song Yanwen (宋延文)1,Zhang Jun (张 军)1,2 (1. School of Electrical Engineering and Automation, Tianjin University, Tianjin 300072, China; 2. Tianjin Key Laboratory of Process Measurement and Control, Tianjin 300072, China) © Tianjin University and Springer-Verlag Berlin Heidelberg 2013
Abstract:A new explicit quadratic radical function is found by numerical experiments, which is simpler and has only 70.778% of the maximal distance error compared with the Fisher z transformation. Furthermore, a piecewise function is constructed for the standard normal distribution: if the independent variable falls in the interval (-1.519, 1.519), the proposed function is employed; otherwise, the Fisher z transformation is used. Compared with the Fisher z transformation, this piecewise function has only 38.206% of the total error. The new function is more exact to estimate the confidence intervals of Pearson product moment correlation coefficient and Dickinson best weights for the linear combination of forecasts. Keywords:normal distribution; cumulative distribution function; error function; confidence interval; correlation coefficient; combination of forecasts
In mathematical statistics, the cumulative distribution function (cdf) of normal distribution is not an explicit elementary function. Gauss error function (erf) is used to calculate the accurate value of cdf of normal distribution. However, erf is not an elementary function (a special function) either, and it is usually computed by a Taylor series numerically. As an explicit elementary function, the Fisher z transformation can be used to approximate the cdf of standard normal distribution analytically[1-8], and estimate the confidence interval of Pearson product moment correlation coefficient[2-6]. The confidence interval of Pearson product moment correlation coefficient is one of the two keys to estimating the confidence intervals of Dickinson best weights for the linear combination of forecasts[9, 10]. The combination of forecasts is almost the only way to improve the forecasting accuracy and reliability of complex time series[11], such as expressway traffic flows[11-15], wind powers[16] and electrical powers[17, 18]. Although a numerical result can be accurate enough to find the causalities or functions among different variables in the complex systems, these causalities are given by implicit data. People need explicit causalities or functions to understand the complex systems.
The Fisher z transformation is a classical way to provide the interpretability. In this paper, we give a simple quadratic radical function to approximate the cdf of the standard normal distribution, which has only 70.778% of the maximal distance error, compared with the Fisher z transformation.
1
Brief review of Fisher z transformation The cdf of the standard normal distribution is x t2 1 Φ ( x) exp dt 2π 2
1 x 1 erf (1) 2 2 where x and t are the real numbers, x, t(-, +); [0,1]; and erf is as follows: 2 x erf x exp t 2 dt (2) π 0 Note the real number erf(x)[-1, 1]. Both Eq.(1) and Eq.(2) are special functions, i.e., non-elementary. In 1915, the Fisher z transformation[1] was proposed as follows: 1 1 r zr ln (3) arctanh(r ) 2 1 r
Accepted date: 2012-12-24. *Supported by Natural Science Foundation of Tianjin (No. 09JCYBJC07700). Yang Zhengling, born in 1964, male, Dr, associate Prof. Correspondence to Yang Zhengling, E-mail:
[email protected].
Transactions of Tianjin University
Vol.19 No. 5 2013
ax where both zr(-, +) and r[-1, 1] are real numz (6) b (cx) 2 bers. The corresponding distribution of z is approximately z is the candidate to substitute for the Fisher z transformanormal, with the following approximate mean, tion, where x(-, +) and z[-1, 1] are real numbers; 1 1 and a, b, and c are real number coefficients. To ensure z ln 2 1 that x -, z = -1, as well as that x +, z = 1, the where is the Pearson product moment correlation coef- coefficients must satisfy that a = c. Then Eq.(6) becomes ficient, and the variance ax 1 z z2 (7) n3 b (ax) 2 where n is the sample size[2,6]. b The Fisher z transformation can be employed to ap- Let k a 2 , then Eq.(7) becomes proximate Eqs.(1) and (2) respectively, i.e., x z (8) 2 r
r
Φ ( x)
1 x 1 erf 2 2
kx
The new real number function
1 exp(2 zr ) 1 1 2 exp(2 zr ) 1 erf(x)
2
(4)
exp(2 zr ) 1 exp(2 zr ) 1
(5)
New quadratic radical function
y
z 1 x k x2 Φ ( x) 2 2 k x2
(9)
y is suggested to approximate the cdf of standard normal distribution (x), where y[0, 1], and erf(x) can be approximated by yerf
x 0.5k x 2
erf(x)
(10)
If taking k = 1.010 019 038 949 07, Eq.(9) has only 70.778% of the maximal distance error compared 2.1 Explicit form The explicit elementary quadratic radical function with the Fisher z transformation, as shown in Fig.1.
(a)Comparison of curves
(b)Comparison of errors
(c)Details of Fig.1(a)
(d)Details of Fig.1(b)
Fig.1
—382—
Comparison among cdf and its approximations
Yang Zhengling et al: Quadratic Radical Function Better Than Fisher z Transformation
Fig.2 shows that the maximal distance 2.2 Optimization of coefficient k max( y (k , x) Φ ( x) ) is not differentiable with respect to k Two errors are employed to evaluate the approximation precision. The first is the maximal distance between at its minimum kB = 1.010 019 038 949 07. The optimiy(x) and (x), i.e., max( y (k , x) Φ ( x) ) , and the second zation of k by analytical derivation is not available. is the total error between the function y(x) and (x), i.e., 2.3 New piecewise function 2 From Fig.1 it can be seen that the new quadratic ( y(k , x) Φ( x)) dx . The first error max( y(k , x) radical function is better than the Fisher z transformation Φ ( x) ) is more important in practice, e.g., it is usually only if x(-1.519, 1.519). Therefore, a new piecewise used to estimate the confidence interval of Pearson prod- function is given as uct moment correlation coefficient. x k x2 Case 1 In the case of x=0.731 693 636 946, the , 1.519 x 1.519; 2 k x2 maximal distance of the Fisher z transformation to apy (11) 1 exp(2 x) 1 proximate the cdf of standard normal distribution (x) is 2 1 exp(2 x) 1 ,otherwise about 0.044 227 990 450 3. Case 2 The total error between Fisher’s Eq.(4) and
Eq.(11) is an optimal combination of the quadratic radical function and the Fisher z transformation, as can be 2 1 exp(2 x) 1 seen from Fig.3 and Tab.1. 2 1 exp(2 x) 1 Φ( x) dx = The numerical experiment parameters for Tab.1 are: 0.003 524 804 503 63 x(-25, 25), the step of x is 510 4 and the step of k is Fig.2 shows the relation between the maximal dis- 210-16. tance max( y (k , x) Φ ( x) ) and coefficient k.
(x) is
Fig.3 Optimal combination of the new function and Fisher z transformation
Fig.2 Relation between the maximal distance and coefficient k Tab.1
Comparison of errors among Fisher z transformation, the new function and their optimal combination Function
Total error for (x)
Maximal distance to (x)
Fisher z transformation
0.003 524 804 503 63
0.044 227 990 450 3
Quadratic radical function
0.004 966 064 258 28
0.031 303 884 628 9
Optimal combination
0.001 346 694 800 81
0.031 303 884 628 9
Compared with the Fisher z transformation, our new quadratic radical function has only 70.778% of the maximal distance error, and 140.89% of total error. If the optimal combination is used, the percentages are reduced to 70.778% and 38.206%, respectively. 2.4 Applications Eq.(9) has at least two important applications. First, it can replace the Fisher z transformation to estimate the confidence intervals of correlation coefficient more exactly[2-6]. Second, it can be used in the sorting algorithm
with the worst time O(n) for the independent and identically distributed random data[19]. The simpler the elementary function to approximate (x), the quicker the speed of the sorting algorithm. According to Knuth[20], the sorting algorithm spends more than 25% of computer operating time in the real world.
3
Conclusions To analytically approximate the cumulative distribu—383—
Transactions of Tianjin University
Vol.19 No. 5 2013
tion function of standard normal distribution, a new ex- [11] Xu Lunhui, Fu Hui. Intelligent Prediction Theory and plicit quadratic radical function is given, which has only Methods of Traffic Information [M]. Science Press, Bei70.778% of the maximal distance error compared with the jing, 2009 (in Chinese). Fisher z transformation. Compared with the Fisher z [12] Zhang Yang, Liu Yuncai. Analysis of peak and non-peak transformation, the combination of this new function with traffic forecasts using combined models [J]. Journal of the Fisher z transformation optimally has only 70.778% Advanced Transportation, 2011, 45(1): 21-37. of the maximal distance error and 38.206% of the total [13] Shen Guojiang, Kong Xiangjie, Chen Xiang. A short-term error, respectively. traffic flow intelligent hybrid forecasting model and its apReferences
plication [J]. Journal of Control Engineering and Applied Informatics, 2011, 13(3): 65-73.
[1] Fisher R A. Frequency distribution of the values of the
[14] Tan M C, Wong S C, Xu J M et al. An aggregation ap-
correlation coefficient in samples from an indefinitely large
proach to short-term traffic flow prediction [J]. IEEE
population [J]. Biometrika, 1915, 10(4): 507-521.
Transactions on Intelligent Transportation Systems, 2009,
[2] Bernstein R, Bernstein S. Schaum’s Outline of Elements of Statistics II: Inferential Statistics [M]. McGraw-Hill, USA, 1999. [3] Chatterjee S K. Statistical Thought: A Perspective and History [M]. Oxford University Press, USA, 2003.
10(1): 60-69. [15] Stathopoulos A, Dimitriou L, Tsekeris T. Fuzzy modeling approach for combined forecasting of urban traffic flow [J]. Computer-Aided Civil and Infrastructure Engineering, 2008, 23(7): 521-535.
[4] Riley K F, Hobson M P, Bence S J. Mathematical Methods
[16] Thordarson F O, Madsen H, Nielsen H A et al. Conditional
for Physics and Engineering: A Comprehensive Guide
weighted combination of wind power forecasts [J]. Wind
[M]. Cambridge University Press, UK, 2002. [5] Morrison D F. Multivariate Statistical Methods [M]. Brooks/Cole, Australia, 2005. [6] Kutner M H, Nachtsheim C J, Neter J. Applied Linear Regression Models [M]. McGraw-Hill, USA, 2005. [7] Härdle W K, Hlávka Z. Multivariate Statistics: Exercises and Solutions [M]. Springer, USA, 2007. [8] Olver F W J, Lozier D W, Boisvert R F et al. NIST Hand-
Energy, 2010, 13(8): 751-763. [17] Fay D, Ringwood J V. On the influence of weather forecast errors in short-term load forecasting models [J]. IEEE Transactions on Power Systems, 2010, 25(3): 1751-1758. [18] Taylor J W. Short-term load forecasting with exponentially weighted methods [J]. IEEE Transactions on Power Systems, 2012, 27(1): 458-464. [19] Yang Zhengling. A discussion about the relationship
book of Mathematical Functions [M]. Cambridge Univer-
among the serial algorithm complexities of sorting [J].
sity Press, USA, 2010.
Journal of Tianjin University, 1993, 32(6): 140-141(in
[9] Granger C W J. Combining forecasts—Twenty years later [J]. Journal of Forecasting, 1989, 8(3): 167-173. [10] Dickinson J P. Some statistical results in the combination of forecasts [J]. Operational Research Quarterly, 1973, 24(2): 253-260.
—384—
Chinese). [20] Knuth D E. The Art of Computer Programming Vol 3: Sorting and Searching [M]. Posts & Telecommunications Press, Beijing, 2010. (Editor: Wu Liyou)