Abstract:
This invention proposed a new algorithm. By multiply the proposed weight coefficients of this invention, CSP and CSS can be computed without computing for the mean(s) of the data. After the proposed weight coefficients of this invention undergo factorization, it can promote a new recursive and real time updatable computation method. To test the accuracy of the new invention, the StRD data were separately tested using SAS ver 9.0, SPSS ver 15.0 and EXCEL 2007 for comparison. The results showed that the accuracy of the results of the proposed invention exceeds the level of accuracy of SAS ver 9.0, SPSS ver 15.0 and EXCEL 2007. Aside from an accurate computation, this new invented algorithm can also produce efficient computations.

Description:
TECHNICAL FIELD OF THE INVENTION 
       [0001]    This invention is related to a method to statistical analysis and data mining. It used hardware to compute for Corrected Sums of Products (CSP) and Corrected Sums of Squares (CSS) related algorithms and used a great deal of real-time updatable computations of the 5 ways of data analysis techniques:
   A. Univariate: the computation of the variance and the standard deviation   B. Bivariate: the computation of the covariance and the correlation coefficient   C. Computation of analysis of variance   D. Computation of regression analysis   E. Multivariate: Computation of the variance-covariance matrix and correlation matrix   
 
       DESCRIPTION OF THE PRIOR ART 
       [0007]    To analyze the related prior arts of this invention, this section was divided into 8 statements. The 8 statements are as follows: 1 st  statement: introduce CSP and its special case—Corrected Sum of Squares (CSS). 2 nd  statement: introduce of CSP computation algorithms. 3 rd  statement: introduce of CSS computation algorithms. 4 th  statement: indicate the previous algorithms which were used to compare accuracy with this invention. 5 th  statement: the new CSP algorithm proposed by the inventor. 6 th  statement: describe the application demands of updatable computations. 7 th  statement: describe the further development of the computation algorithm of the 5 th  statement for updatable computation for improvement. 8 th  statement: describe the accuracy problems produced by the mathematic functions of CSP method in the various softwares.
   1. In the computation of data analysis, n of two variables were considered as data where the 1 st  pair is (x 1 , y 1 ), the 2 nd  pair is (x 2 , y 2 ) and continuously go on to the n th  pair is (x n , y n ). The mean of n data is computed by adding the n data then divided by the total number of n. The mean of the two variables is separately shown as   
 
         [0000]    
       
         
           
             
               
                 
                   x 
                   _ 
                 
                 n 
               
               = 
               
                 
                   1 
                   n 
                 
                  
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     n 
                   
                    
                   
                     x 
                     i 
                   
                 
               
             
             , 
             
               
 
             
              
             
               
                 
                   y 
                   _ 
                 
                 n 
               
               = 
               
                 
                   1 
                   n 
                 
                  
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     n 
                   
                    
                   
                     
                       y 
                       i 
                     
                     . 
                   
                 
               
             
           
         
       
       
         
           
             Each of the data is separately subtracted to the mean, in other words, (x i , y i ) of the i data is separately subtracted to  x  and  y  then adding the total after multiplication. It is known as Corrected Sums of Products (CSP) with the equation: 
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     CSP 
                     n 
                   
                   = 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       
                         ( 
                         
                           
                             x 
                             i 
                           
                           - 
                           
                             
                               x 
                               _ 
                             
                             n 
                           
                         
                         ) 
                       
                        
                       
                         
                           ( 
                           
                             
                               y 
                               i 
                             
                             - 
                             
                               
                                 y 
                                 _ 
                               
                               n 
                             
                           
                           ) 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
       
         
           
             When CSP is divided by n−1, it is the covariance of (x 1 , y 1 ), (x 2 , y 2 ), . . . , (x n , y n ), and denote as σ XY . The equation is: 
           
         
       
     
         [0000]    
       
         
           
             
               σ 
               XY 
             
             = 
             
               
                 1 
                 
                   n 
                   - 
                   1 
                 
               
                
               
                 
                   CSP 
                   n 
                 
                 . 
               
             
           
         
       
       
         
           
             If the y i  in (1) is substituted by x i  and  y  is substituted by  x , it becomes single variable special case. This special case is called Corrected Sums of Squares (CSS), with the equation: 
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     CSS 
                     n 
                   
                   = 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       
                         ( 
                         
                           
                             x 
                             i 
                           
                           - 
                           
                             
                               x 
                               _ 
                             
                             n 
                           
                         
                         ) 
                       
                        
                       
                         
                           ( 
                           
                             
                               x 
                               i 
                             
                             - 
                             
                               
                                 x 
                                 _ 
                               
                               n 
                             
                           
                           ) 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
       
         
           
             To compute for the variance, divided CSS by n−1. The equation is: 
           
         
       
     
         [0000]    
       
         
           
             
               Var 
                
               
                 ( 
                 X 
                 ) 
               
             
             = 
             
               
                 1 
                 
                   n 
                   - 
                   1 
                 
               
                
               C 
                
               
                   
               
                
               S 
                
               
                   
               
                
               
                 
                   S 
                   n 
                 
                 . 
               
             
           
         
       
       
         
           
             To compute for the standard deviation, get the positive square root of the variance. The standard deviation is denoted as σ X . The equation is: 
           
         
       
     
         [0000]      σ X =√{square root over (Var( X ))}.       If the covariance of X and Y is divided by the standard deviation of the two variables, it is called correlation coefficient which is denoted as ρ XY . The equation is:         
         [0000]    
       
         
           
             
               ρ 
               XY 
             
             = 
             
               
                 
                   σ 
                   XY 
                 
                 
                   
                     σ 
                     X 
                   
                    
                   
                     σ 
                     Y 
                   
                 
               
               . 
             
           
         
       
       
           10  CSP and CSS are generally called Corrected Sums of Squares and Products (CSSP). In data analysis, many use the value of the variance and standard deviation of the data in determining cases of dispersion. Larger value of variance means data are more disperse, otherwise, the data are more centered closely to the mean. Correlation coefficient is used to determine the linear relationship between two variables. The correlation coefficient lies between +1 and −1. The closer the value is to 0, the linear relationship between the two variables is lesser, and otherwise, the linear relationship is greater. The computation of the Analysis of Variance (ANOVA) also uses CSP as the foundation. It is unnecessary to emphasize the importance of computing of CSP. For a long time, the accuracy and efficiency of computing CSP are given importance by both scholars and users alike. 
         2. The CSP algorithms proposed by scholars in the past were:
       (i) Welford (1962) Algorithm
           Welford (1962), using (1) as foundation, developed an algorithm to compute CSP. The mean of k data (x 1 , x 2 , . . . , x k ) is  x   k . The computation method of CSP of k data is denote as CSP Welford(k) . The algorithm is   
           
     
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     
                       C 
                        
                       
                           
                       
                        
                       S 
                        
                       
                           
                       
                        
                       
                         P 
                         
                           Welford 
                            
                           
                             ( 
                             k 
                             ) 
                           
                         
                       
                     
                     = 
                     
                       
                         C 
                          
                         
                             
                         
                          
                         S 
                          
                         
                             
                         
                          
                         
                           P 
                           
                             Welford 
                              
                             
                               ( 
                               
                                 k 
                                 - 
                                 1 
                               
                               ) 
                             
                           
                         
                       
                       + 
                       
                         
                           ( 
                           
                             
                               k 
                               - 
                               1 
                             
                             k 
                           
                           ) 
                         
                          
                         
                           ( 
                           
                             
                               x 
                               k 
                             
                             - 
                             
                               
                                 x 
                                 _ 
                               
                               
                                 k 
                                 - 
                                 1 
                               
                             
                           
                           ) 
                         
                          
                         
                           ( 
                           
                             
                               y 
                               k 
                             
                             - 
                             
                               
                                 y 
                                 _ 
                               
                               
                                 k 
                                 - 
                                 1 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     where 
                     , 
                     
                       
 
                     
                      
                     
                       
                         
                           x 
                           _ 
                         
                         k 
                       
                       = 
                       
                         
                           
                             
                               k 
                               - 
                               1 
                             
                             k 
                           
                            
                           
                             
                               x 
                               _ 
                             
                             
                               k 
                               - 
                               1 
                             
                           
                         
                         + 
                         
                           
                             1 
                             k 
                           
                            
                           
                             x 
                             k 
                           
                         
                       
                     
                     , 
                     
                       
 
                     
                      
                     
                       
                         
                           y 
                           _ 
                         
                         k 
                       
                       = 
                       
                         
                           
                             
                               k 
                               - 
                               1 
                             
                             k 
                           
                            
                           
                             
                               y 
                               _ 
                             
                             
                               k 
                               - 
                               1 
                             
                           
                         
                         + 
                         
                           
                             1 
                             k 
                           
                            
                           
                             y 
                             k 
                           
                         
                       
                     
                     , 
                     
                       
 
                     
                      
                     
                       
                         
                           x 
                           _ 
                         
                         
                           k 
                           - 
                           1 
                         
                       
                       = 
                       
                         
                           1 
                           
                             k 
                             - 
                             1 
                           
                         
                          
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             
                               k 
                               - 
                               1 
                             
                           
                            
                           
                             x 
                             i 
                           
                         
                       
                     
                     , 
                     
                       
 
                     
                      
                     
                       
                         
                           y 
                           _ 
                         
                         
                           k 
                           - 
                           1 
                         
                       
                       = 
                       
                         
                           1 
                           
                             k 
                             - 
                             1 
                           
                         
                          
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             
                               k 
                               - 
                               1 
                             
                           
                            
                           
                             y 
                             i 
                           
                         
                       
                     
                     , 
                     
                       k 
                       = 
                       2 
                     
                     , 
                     3 
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       n 
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
       
         
           
             (ii) Neely (1966) Algorithm
           Neely (1966) proposed an algorithm to improve the accuracy of computing CSP. Neely used (1) as the foundation. In the right hand side of equation (1), the equation is obtained by subtracting   
         
           
         
       
     
         [0000]    
       
         
           
             
               ∑ 
               
                 i 
                 = 
                 1 
               
               n 
             
              
             
               
                 ( 
                 
                   
                     x 
                     i 
                   
                   - 
                   
                     
                       x 
                       _ 
                     
                     n 
                   
                 
                 ) 
               
                
               
                 ( 
                 
                   
                     y 
                     i 
                   
                   - 
                   
                     
                       y 
                       _ 
                     
                     n 
                   
                 
                 ) 
               
                
               
                   
               
                
               to 
                
               
                   
               
                
               
                 1 
                 n 
               
                
               
                 ( 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     n 
                   
                    
                   
                     ( 
                     
                       
                         x 
                         i 
                       
                       - 
                       
                         
                           x 
                           _ 
                         
                         n 
                       
                     
                     ) 
                   
                 
                 ) 
               
                
               
                 
                   ( 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       ( 
                       
                         
                           y 
                           i 
                         
                         - 
                         
                           
                             y 
                             _ 
                           
                           n 
                         
                       
                       ) 
                     
                   
                   ) 
                 
                 . 
               
             
           
         
       
     
         [0000]    The CSP of n data in Neely&#39;s algorithm is denote as CSP Neely(n)  and 
         [0000]    
       
         
           
             
               
                 
                   
                     C 
                      
                     
                         
                     
                      
                     S 
                      
                     
                         
                     
                      
                     
                       P 
                       
                         Neely 
                          
                         
                           ( 
                           n 
                           ) 
                         
                       
                     
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         n 
                       
                        
                       
                         
                           ( 
                           
                             
                               x 
                               i 
                             
                             - 
                             
                               
                                 x 
                                 _ 
                               
                               n 
                             
                           
                           ) 
                         
                          
                         
                           ( 
                           
                             
                               y 
                               i 
                             
                             - 
                             
                               
                                 y 
                                 _ 
                               
                               n 
                             
                           
                           ) 
                         
                       
                     
                     - 
                     
                       
                         
                           
                             1 
                             n 
                           
                           [ 
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 1 
                               
                               n 
                             
                              
                             
                               ( 
                               
                                 
                                   x 
                                   i 
                                 
                                 - 
                                 
                                   
                                     x 
                                     _ 
                                   
                                   n 
                                 
                               
                               ) 
                             
                           
                           ] 
                         
                         [ 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             n 
                           
                            
                           
                             ( 
                             
                               
                                 y 
                                 i 
                               
                               - 
                               
                                 
                                   y 
                                   _ 
                                 
                                 n 
                               
                             
                             ) 
                           
                         
                         ] 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
       
         
           
             (iii) Youngs and Cramer (1971)
           Youngs and Cramer (1971) used (1) as the foundation in the developed an algorithm to compute CSP. In the n of two variables data, the 1 st  is (x 1 , y 1 ), the 2 nd  is (x 2 , y 2 ) and continuously go on to the n th  is (x n , y n ). When the 1 st  data of the 1 st  variable reached the total sum of k th  data x 1 , x 2 , . . . , x k , it is noted as t k , that is   
         
           
         
       
     
         [0000]    
       
         
           
             
               t 
               k 
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 k 
               
                
               
                 
                   x 
                   i 
                 
                 . 
               
             
           
         
       
     
         [0000]    When the 2 nd  variable of the 1 st  data reached the total sum of k th  data y 1 , y 2 , . . . , y k , it is noted as 
         [0000]    
       
         
           
             
               
                 t 
                 k 
                 ′ 
               
                
               
                   
               
                
               and 
                
               
                   
               
                
               
                 t 
                 k 
                 ′ 
               
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 k 
               
                
               
                 
                   y 
                   i 
                 
                 . 
               
             
           
         
       
     
         [0000]    The CSP of k data is denote as CSP YC(k) . The algorithm proposed by Youngs and Cramer (1971) is: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       C 
                        
                       
                           
                       
                        
                       S 
                        
                       
                           
                       
                        
                       
                         P 
                         
                           YC 
                            
                           
                             ( 
                             k 
                             ) 
                           
                         
                       
                     
                     = 
                     
                       
                         C 
                          
                         
                             
                         
                          
                         S 
                          
                         
                             
                         
                          
                         
                           P 
                           
                             YC 
                              
                             
                               ( 
                               
                                 k 
                                 - 
                                 1 
                               
                               ) 
                             
                           
                         
                       
                       + 
                       
                         
                           ( 
                           
                             
                               x 
                               k 
                             
                             - 
                             
                               t 
                               
                                 k 
                                 - 
                                 1 
                               
                             
                           
                           ) 
                         
                          
                         
                           ( 
                           
                             
                               y 
                               k 
                             
                             - 
                             
                               t 
                               
                                 k 
                                 - 
                                 1 
                               
                               ′ 
                             
                           
                           ) 
                         
                          
                         
                           1 
                           
                             k 
                              
                             
                               ( 
                               
                                 k 
                                 - 
                                 1 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   , 
                   
                     
 
                   
                    
                   
                     k 
                     = 
                     2 
                   
                   , 
                   3 
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     n 
                     . 
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
       
         
           
             (iv) Clarke (1971)
           The theory of Clarke&#39;s (1971) algorithm is similar with Welford&#39;s (1962) algorithm. With regards to the k data of the two variables, the 1 st  (x 1 , y 1 ), the 2 nd  is (x 2 , y 2 ) and continuously go on to the n th  is (x n , y n ). The CSP of k data is denote as CSP Clarke(k) . The algorithm developed by Clarke (1971) is   
         
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         C 
                          
                         
                             
                         
                          
                         S 
                          
                         
                             
                         
                          
                         
                           P 
                           
                             Clarke 
                              
                             
                               ( 
                               k 
                               ) 
                             
                           
                         
                       
                       = 
                       
                         
                           C 
                            
                           
                               
                           
                            
                           S 
                            
                           
                               
                           
                            
                           
                             P 
                             
                               Clarke 
                                
                               
                                 ( 
                                 
                                   k 
                                   - 
                                   1 
                                 
                                 ) 
                               
                             
                           
                         
                         + 
                         
                           
                             ( 
                             
                               1 
                               - 
                               
                                 1 
                                 k 
                               
                             
                             ) 
                           
                            
                           
                             ( 
                             
                               
                                 x 
                                 k 
                               
                               - 
                               
                                 
                                   x 
                                   _ 
                                 
                                 
                                   k 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                            
                           
                             ( 
                             
                               
                                 y 
                                 k 
                               
                               - 
                               
                                 
                                   y 
                                   _ 
                                 
                                 
                                   k 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                     , 
                     
                       
 
                     
                      
                     where 
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           x 
                           _ 
                         
                         k 
                       
                       = 
                       
                         
                           
                             x 
                             _ 
                           
                           
                             k 
                             - 
                             1 
                           
                         
                         + 
                         
                           
                             ( 
                             
                               
                                 x 
                                 k 
                               
                               - 
                               
                                 
                                   x 
                                   _ 
                                 
                                 
                                   k 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                            
                           
                             1 
                             k 
                           
                         
                       
                     
                     , 
                     
                       
 
                     
                      
                     and 
                   
                    
                   
                       
                   
                    
                   
                     
 
                   
                    
                   
                       
                   
                    
                   
                     
                       
                         
                           y 
                           _ 
                         
                         k 
                       
                       = 
                       
                         
                           
                             y 
                             _ 
                           
                           
                             k 
                             - 
                             1 
                           
                         
                         + 
                         
                           
                             ( 
                             
                               
                                 y 
                                 k 
                               
                               - 
                               
                                 
                                   y 
                                   _ 
                                 
                                 
                                   k 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                            
                           
                             1 
                             k 
                           
                         
                       
                     
                     , 
                     
                       k 
                       = 
                       2 
                     
                     , 
                     3 
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       n 
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
       
         3. Aside from the CSP algorithms enumerated in the 2 nd  statement, scholars have proposed various CSS algorithms based from the special case of CSP. According to the classification of Chan et al. (1983), it can be classified into two major kinds, two-pass algorithm and one-pass algorithm.
       (i) Two-Pass Algorithm
           Two-pass algorithm pointed out that all computed data should be read twice by the computing hardware. There were two types of two-pass algorithm developed in the past. The 1 st  type directly used equation (2) for computation. This type of algorithm was termed by Chan and Lewis (1979) and Chan et al. (1983) as “standard two-pass algorithm”. As for the 2 nd  type, a corrected term was subtracted to equation (2) as shown in the equation below:   
           
     
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     
                       C 
                        
                       
                           
                       
                        
                       S 
                        
                       
                           
                       
                        
                       
                         S 
                         n 
                       
                     
                     = 
                     
                       
                         
                           ∑ 
                           
                             i 
                             = 
                             1 
                           
                           n 
                         
                          
                         
                           
                             ( 
                             
                               
                                 x 
                                 i 
                               
                               - 
                               
                                 
                                   x 
                                   _ 
                                 
                                 n 
                               
                             
                             ) 
                           
                           2 
                         
                       
                       - 
                       
                         
                           1 
                           n 
                         
                          
                         
                           
                             ( 
                             
                               
                                 ∑ 
                                 
                                   i 
                                   = 
                                   1 
                                 
                                 n 
                               
                                
                               
                                 ( 
                                 
                                   
                                     x 
                                     i 
                                   
                                   - 
                                   
                                     
                                       x 
                                       _ 
                                     
                                     n 
                                   
                                 
                                 ) 
                               
                             
                             ) 
                           
                           2 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0000]    
       
         
           
             where 
              
             
                 
             
              
             
               1 
               n 
             
              
             
               
                 ( 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     n 
                   
                    
                   
                     ( 
                     
                       
                         x 
                         i 
                       
                       - 
                       
                         
                           x 
                           _ 
                         
                         n 
                       
                     
                     ) 
                   
                 
                 ) 
               
               2 
             
           
         
       
     
         [0000]    is the corrected term. Neely (1966) was the earliest scholar to proposed equation (7). This type of algorithm was termed as “corrected two-pass algorithm”. The discussion and applications of this algorithm can be found in Chan and Lewis (1979), Chan et al. (1979), Roberts (1985), Thisted (1988), Press et al. (2002) and Gentle et al.(2004). In mathematics, equation (7) is equivalent to equation (2) and the corrected term can be omitted since it is only for correction purposes because using computer in computing caused errors in the results. Aside from the two types of two-pass algorithm mentioned above, the book of Thisted (1988) also indicated another type where the data should be sorted in sequential order first then undergo standard two-pass algorithm afterward. Thisted (1988) pointed out that this type of algorithm is a type of three-pass algorithm.
       (ii) One-Pass Algorithm
           One-pass algorithm pointed out that all computed data should be read once by the computing hardware. Welford (1962), Van Reeken (1968), Youngs and Cramer (1971), Spicer (1972), Hanson (1975), Cotton (1975), Nelson (1979), West (1979) and Chan et al. (1979) all proposed different types of one-pass algorithm.   
           In the articles related to the accuracy of various CSS computation algorithms, the research results of West (1979) and Chan and Lewis (1979) pointed out that the most accurate one-pass algorithm is West&#39;s (1979) but it is not as accurate as “standard two pass algorithm”.   In addition, in the study of Chan et al. (1983), “error bound for relative error” was used to compare computation errors in different algorithms. The relative error indicated by Chan et al. (1983) is:       
 
         [0000]    
       
         
           
             
               R 
                
               
                   
               
                
               E 
             
             = 
             
                
               
                 
                   exact 
                   - 
                   output 
                 
                 exact 
               
                
             
           
         
       
       
         
           
             where RE represents “relative error” and “output” represents the computation result. Chan et al. (1983) pointed out that the relative error bounds of the “corrected two-pass algorithm” is smaller than the error bounds of “standard two-pass algorithm”. With regards to the conclusion proposed by Chan et al. (1983), Heiberger (1989) pointed out that when computing for CSS, the “corrected two-pass algorithm” should compute for the mean first and the accuracy in the computation of the mean should be limited to the result of the algorithm of the mean itself. The “corrected two-pass algorithm” was recommended by Press et al. (2002). 
             Up to the present, there are still no research reports that directly discuss about the accuracy in the computation of CSP but many scholars in the past discussed about the special univariate cases of CSP or in other words, the accuracy in the computation of CSS. 
           
         
         4. In the four types of CSP algorithms in the 2 nd  statement, the algorithm of Neely (1966) is a two-pass algorithm and the algorithm proposed by Welford (1962), Youngs and Cramer (1971) and Clarke (1971) belongs to one-pass algorithm. Although no studies discussed about the accuracy of CSP algorithms in the past, many studies discussed and compared on the accuracy of the different CSS algorithms. This invention used CSS to certify accuracy. In the comparison of accuracy, up until now, Chan et al. (1983), Thisted (1988), McCullough (1998) and Gentle et al. (2004) all believed that the accuracy of “corrected two-pass algorithm” is better than “standard two-pass algorithm&#39;s”. Therefore, this invention used the “corrected two-pass algorithm” for comparison. 
         5. This study proposed a successive difference as foundation, combined the developed weight coefficients (w ij ) and proposed a new CSP computation algorithm. The definition of successive difference can be found in the literature of Von Neumann et al. (1941) or Rao (1959). With regards to the n of two variables as data, the 1 st  is (x 1 , y 1 ) the 2 nd  is (x 2 , y 2 ) and continuously go on to the n th  is (x n , y n ). Defined x 0 =0, the i th  successive difference of variable x is to subtract i th  x i  to i−1 th  x i−1 , symbolized with the equation sdx i =x i −x i− , among which i=1, 2, . . . , n. Defined y 0= 0, the j th  successive difference of variable y is to subtract j th  y j  to j−1 th  y j−1 , symbolized with the equation sdy j =y j −y j−1 , among which j=1,2, . . . , n. The CSP of the n data can be shown as: 
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           C 
                            
                           
                               
                           
                            
                           S 
                            
                           
                               
                           
                            
                           
                             P 
                             n 
                           
                         
                         = 
                           
                          
                         
                           
                             1 
                             n 
                           
                            
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 1 
                               
                               n 
                             
                              
                             
                               
                                 ∑ 
                                 
                                   j 
                                   = 
                                   1 
                                 
                                 n 
                               
                                
                               
                                 
                                   w 
                                   ij 
                                 
                                  
                                 
                                   sdx 
                                   i 
                                 
                                  
                                 
                                   sdy 
                                   j 
                                 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           = 
                             
                            
                           
                             
                               1 
                               n 
                             
                              
                             
                               
                                 ∑ 
                                 
                                   i 
                                   = 
                                   1 
                                 
                                 n 
                               
                                
                               
                                 
                                   ∑ 
                                   
                                     j 
                                     = 
                                     1 
                                   
                                   n 
                                 
                                  
                                 
                                   
                                     
                                       w 
                                       ij 
                                     
                                      
                                     
                                       ( 
                                       
                                         
                                           x 
                                           i 
                                         
                                         - 
                                         
                                           x 
                                           
                                             i 
                                             - 
                                             1 
                                           
                                         
                                       
                                       ) 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       
                                         y 
                                         j 
                                       
                                       - 
                                       
                                         y 
                                         
                                           j 
                                           - 
                                           1 
                                         
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                         , 
                       
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
       
         
           
             where, 
           
         
       
     
         [0000]        w   ij =( i+j− 1)( n+ 1)−ij−n/2( i+j+|i−j |),  i= 1, 2,  . . . , n, j= 1, 2, . . . ,  n.    (9)       The detailed mathematical proof of equation (8) can be found in Appendix 1. Nevertheless, the result of the equation (8) can be expressed using matrix where the proof is shown in Appendix 1.   The successive difference vector of the 1 st  variable x is represented by d n×1  and the i th  element is represented by sdx i . The successive difference vector of the 2 nd  variable y is represented by e n×1  and the i th  element is represented by sdy i . The successive difference vector of the two variables is separately represented as:         
         [0000]    
       
         
           
             
               
                 d 
                 
                   n 
                   × 
                   1 
                 
               
               = 
               
                 
                   
                     [ 
                     
                       
                         
                           
                             sdx 
                             1 
                           
                         
                       
                       
                         
                           
                             sdx 
                             2 
                           
                         
                       
                       
                         
                           ⋮ 
                         
                       
                       
                         
                           
                             sdx 
                             n 
                           
                         
                       
                     
                     ] 
                   
                    
                   
                       
                   
                    
                   and 
                    
                   
                       
                   
                    
                   
                     e 
                     
                       n 
                       × 
                       1 
                     
                   
                 
                 = 
                 
                   [ 
                   
                     
                       
                         
                           sdy 
                           1 
                         
                       
                     
                     
                       
                         
                           sdy 
                           2 
                         
                       
                     
                     
                       
                         ⋮ 
                       
                     
                     
                       
                         
                           sdy 
                           n 
                         
                       
                     
                   
                   ] 
                 
               
             
             , 
           
         
       
       
         
           
             and equation (8) can be rewritten in matrix as: 
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     
                       C 
                        
                       
                           
                       
                        
                       S 
                        
                       
                           
                       
                        
                       
                         P 
                         n 
                       
                     
                     = 
                     
                       
                         1 
                         n 
                       
                        
                       
                         d 
                         
                           1 
                           × 
                           n 
                         
                         T 
                       
                        
                       
                         W 
                         
                           n 
                           × 
                           n 
                         
                       
                        
                       
                         e 
                         
                           n 
                           × 
                           1 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
       
         
           
             where, the element of row i and column j of matrix W is shown in equation (9), also 
           
         
       
     
         [0000]        nCSP   n   =d   1×n   T   W   n×n   e   n×1 ,   (11)   6. With regards to the sequence of the continuously collected data, the 1 st  data is represented as (x 1 , y 1 ), the 2 nd  data is represented as (x 2 , y 2 ), and continuously go on to the n th  data which is represented by (x n , y n ). The n+1 th  data was represented by (x n+1 , y n+1 ) and so on. The sequence of the continuously collected data is represented as:     
         [0000]      (x 1 , y 1 ), (x 2 , y 2 ), . . . , (x n , y n ), (x n+1 , y n+1 ), . . . .       Using CSP n  to represent the result of n data&#39;s computation, the updated computation is using CSP n  to add a new updating data in n+1 th  data (x n+1 , y n+1 ). The equation is shown as:         
         [0000]        CSP   n+1   =CSP   n +updating term.       With regards to the CSP method of the sequence of the continuously collected data, it should possess a highly accurate computation and updatable computation capabilities. Aside from economizing the use of hardware resources, it can also support the essential dynamic data analysis.       7. If equation (8) was directly express as a computer algorithm, aside from confirming the total number of data first, it also cannot provide real time updatable computations. The computer algorithm for equation (8) is:     
         [0000]      css:=0 
         [0000]      ncss:=0 
         [0000]      ss:=0 
         [0000]      X 0 :=0 
         [0000]      for i:=1 to n do 
         [0000]        sdx   i   :=X   i −X i−1    
         [0000]      for i:=1 to n do 
         [0000]      for j:=1 to n do 
         [0000]    
       
      
       ss:=w 
       ij 
       ×sdx 
       i 
       ×sdx 
       j  
      
     
         [0000]    
       
      
       ncss:=ncss+ss  
      
     
         [0000]    
       
      
       css:=ncss/n  
      
       
         8. Up until now, there are no past cases that directly discuss about the accuracy of CSP. Aside from the 3 rd  and 4 th  statement where the scholars discuss about special cases of CSP and the accuracy of CSS, many scholars also studied and discussed on the accuracy of the algorithms related to CSS in data analysis software packages. Past scholars discovered that inaccurate results occur when software were applied to CSS related algorithms. For example, the studies of Simon and Lesage (1989) and McCullough (1998, 1999) pointed out that the CSS computation of the software SAS, SPSS and BMDP will produce inaccurate results. McCullough (1998, 1999), Knüsel (2002), Cryer (2002), Keeling and Pavur (2004), Altman et al. (2004), McCullough and Wilson (1999, 2002, 2005) pointed out that the standard deviation or the variance computations of Micro-soft Excel will produce inaccurate results. 
       
     
       SUMMARY OF THE INVENTION 
       [0046]    Using equation (10) as a foundation and factorize the matrix W, this invention developed a new method that can real time update computations. The obtained results were used to improve the shortcoming of equation (8) which is the inability to real time update computations. 
         [0047]    This invention proposed a successive difference as foundation, combined the developed weight coefficient (w ij ) and proposed a new CSP computation algorithm. The characteristics of this invention are the factorization of the weight coefficient matrix W n×n . Aside from being recursive, the proposed algorithm can also do real time updatable computation. This new algorithm also has the quality of having a high level of accuracy. 
         [0048]    The accuracy of the proposed algorithm of this invention was compared with the accuracy of the Statistical Reference Datasets (StRD) provided by the National Institutes of Standards and Technology (NIST). The measurement of the accuracy of the computation was based on Altman et al. (2004), the study pointed out that “the so-called precision is the dissimilarity between exact value and result. It is represented by the gap between the exact value and the result”. With regards to the dissimilarity results, Altman et al. (2004) adopted log relative error (LRE) for measurement. Log relative error (LRE) is the log 10  of the absolute value of the difference between the exact value and the result divided by the exact value. The definition of LRE in the book of Altman et al. (2004) was: 
         [0000]    
       
         
           
             
               
                 
                   LRE 
                   = 
                   
                     { 
                     
                       
                         
                           
                             
                               
                                 - 
                                 
                                   log 
                                   10 
                                 
                               
                                
                               
                                  
                                 
                                   
                                     exact 
                                     - 
                                     result 
                                   
                                   exact 
                                 
                                  
                               
                             
                             , 
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               exact 
                                
                               
                                   
                               
                                
                               value 
                             
                             ≠ 
                             0 
                           
                         
                       
                       
                         
                           
                             
                               
                                 - 
                                 
                                   log 
                                   10 
                                 
                               
                                
                               
                                  
                                 
                                   result 
                                   - 
                                   exact 
                                 
                                  
                               
                             
                             , 
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               exact 
                                
                               
                                   
                               
                                
                               value 
                             
                             = 
                             0 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
         [0000]    When the result is equals to the exact value and it was marked by “exact”. The size of the LRE is used to represent the length of the significant digits of the accuracy of the data&#39;s computation. As for the measurement of the accuracy of hardware computation results of LRE, please refer to earlier publications like Wampler (1980) and Lesage and Simon (1985). In addition, Simon and Lesage (1988, 1989), McCullough (1998, 1999), McCullough and Wilson (1999, 2002, 2005) adopted LRE to measure the computation accuracy of the software applied by the computer. This study adopted LRE to test and compare for the accuracy of the computation results. 
         [0049]    The theorem adopted in this invention is to perform a two stage factorization on the matrix W n×n  of the equation (11). Then, propose a new CSP algorithm that is recursive and can be updated base on the results of the factorization. The two stage factorization of the matrix W n×n  is as follows: 
       Stage 1  
       [0050]    In matrix W n×n , the element of row i and column j is shown as w ij(n) , 
         [0000]    
       
         
           
             
               w 
               
                 ij 
                  
                 
                   ( 
                   n 
                   ) 
                 
               
             
             = 
             
               
                 
                   ( 
                   
                     i 
                     + 
                     j 
                     - 
                     1 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     n 
                     + 
                     1 
                   
                   ) 
                 
               
               - 
               ij 
               - 
               
                 
                   n 
                   2 
                 
                  
                 
                   ( 
                   
                     i 
                     + 
                     j 
                     + 
                     
                        
                       
                         i 
                         - 
                         j 
                       
                        
                     
                   
                   ) 
                 
               
             
           
         
       
     
         [0051]    Also, matrix W n×n  can be factorized into the sum of two matrices, as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           W 
                           
                             n 
                             × 
                             n 
                           
                         
                         = 
                           
                          
                         
                           [ 
                           
                             
                               
                                 
                                   w 
                                   11 
                                 
                               
                               
                                 
                                   w 
                                   12 
                                 
                               
                               
                                 
                                   w 
                                   13 
                                 
                               
                               
                                 … 
                               
                               
                                 
                                   w 
                                   
                                     1 
                                      
                                     n 
                                   
                                 
                               
                             
                             
                               
                                 
                                   w 
                                   21 
                                 
                               
                               
                                 
                                   w 
                                   22 
                                 
                               
                               
                                 
                                   w 
                                   23 
                                 
                               
                               
                                 … 
                               
                               
                                 
                                   w 
                                   
                                     2 
                                      
                                     n 
                                   
                                 
                               
                             
                             
                               
                                 
                                   w 
                                   31 
                                 
                               
                               
                                 
                                   w 
                                   32 
                                 
                               
                               
                                 
                                   w 
                                   33 
                                 
                               
                               
                                 … 
                               
                               
                                 
                                   w 
                                   
                                     3 
                                      
                                     n 
                                   
                                 
                               
                             
                             
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋰ 
                               
                               
                                 ⋮ 
                               
                             
                             
                               
                                 
                                   w 
                                   
                                     n 
                                      
                                     
                                         
                                     
                                      
                                     1 
                                   
                                 
                               
                               
                                 
                                   w 
                                   
                                     n 
                                      
                                     
                                         
                                     
                                      
                                     2 
                                   
                                 
                               
                               
                                 
                                   w 
                                   
                                     n 
                                      
                                     
                                         
                                     
                                      
                                     3 
                                   
                                 
                               
                               
                                 … 
                               
                               
                                 
                                   w 
                                   nn 
                                 
                               
                             
                           
                           ] 
                         
                       
                     
                   
                   
                     
                       
                         
                           = 
                             
                            
                           
                             
                               
                                 [ 
                                 
                                   
                                     
                                       
                                         W 
                                         
                                           
                                             ( 
                                             
                                               n 
                                               - 
                                               1 
                                             
                                             ) 
                                           
                                           × 
                                           
                                             ( 
                                             
                                               n 
                                               - 
                                               1 
                                             
                                             ) 
                                           
                                         
                                       
                                     
                                     
                                       
                                         0 
                                         
                                           
                                             ( 
                                             
                                               n 
                                               - 
                                               1 
                                             
                                             ) 
                                           
                                           × 
                                           1 
                                         
                                       
                                     
                                   
                                   
                                     
                                       
                                         0 
                                         
                                           1 
                                           × 
                                           
                                             ( 
                                             
                                               n 
                                               - 
                                               1 
                                             
                                             ) 
                                           
                                         
                                       
                                     
                                     
                                       0 
                                     
                                   
                                 
                                 ] 
                               
                               
                                 n 
                                 × 
                                 n 
                               
                             
                             + 
                             
                               G 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                         
                         , 
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where, the element of row i and column j of matrix W (n−1)×(n−1)  is represented with W ij(n−1) , thus 
         [0000]    
       
         
           
             
               w 
               
                 ij 
                  
                 
                   ( 
                   
                     n 
                     - 
                     1 
                   
                   ) 
                 
               
             
             = 
             
               
                 
                   ( 
                   
                     i 
                     + 
                     j 
                     - 
                     1 
                   
                   ) 
                 
                  
                 n 
               
               - 
               ij 
               - 
               
                 
                   
                     n 
                     - 
                     1 
                   
                   2 
                 
                  
                 
                   
                     ( 
                     
                       i 
                       + 
                       j 
                       + 
                       
                          
                         
                           i 
                           - 
                           j 
                         
                          
                       
                     
                     ) 
                   
                   . 
                 
               
             
           
         
       
     
         [0000]    The element of row i and column j of G n×n  is represented with g ij(n) , thus 
         [0000]    
       
         
           
             
               
                 g 
                 
                   ij 
                    
                   
                     ( 
                     n 
                     ) 
                   
                 
               
               = 
               
                 
                   1 
                   2 
                 
                  
                 
                   ( 
                   
                     i 
                     + 
                     j 
                     - 
                     
                        
                       
                         i 
                         - 
                         j 
                       
                        
                     
                     - 
                     2 
                   
                   ) 
                 
               
             
             , 
           
         
       
     
         [0000]    i=1,2, . . . , n, j=1,2, . . . , n, and 0 1×(n−1) =[0 0 . . . 0] 1×(n−1) , 
         [0000]    
       
         
           
             
               0 
               
                 
                   ( 
                   
                     n 
                     - 
                     1 
                   
                   ) 
                 
                 × 
                 1 
               
             
             = 
             
               
                 
                   [ 
                   
                     
                       
                         0 
                       
                     
                     
                       
                         0 
                       
                     
                     
                       
                         ⋮ 
                       
                     
                     
                       
                         0 
                       
                     
                   
                   ] 
                 
                 
                   
                     ( 
                     
                       n 
                       - 
                       1 
                     
                     ) 
                   
                   × 
                   1 
                 
               
               . 
             
           
         
       
     
         [0000]    Stage 2. Decompose the matrix G n×n  in stage 1, as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       G 
                       
                         n 
                         × 
                         n 
                       
                     
                     = 
                     
                       [ 
                       
                         
                           
                             
                               G 
                               
                                 
                                   ( 
                                   
                                     n 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                                 × 
                                 
                                   ( 
                                   
                                     n 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                               
                             
                           
                           
                             
                               M 
                               
                                 
                                   ( 
                                   
                                     n 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                                 × 
                                 1 
                               
                             
                           
                         
                         
                           
                             
                               M 
                               
                                 t 
                                 × 
                                 
                                   ( 
                                   
                                     n 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                               
                               T 
                             
                           
                           
                             
                               ( 
                               
                                 n 
                                 - 
                                 1 
                               
                               ) 
                             
                           
                         
                       
                       ] 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where, M 1×(n−1)   T =[0 1 . . . n−2] 1×(n−1) . 
         [0052]    The theorem used in this invention is to combine the two stages of the factorized matrix W n×n , equation (13) and (14), and plug into equation (11). The details of the process are shown in the two steps below: 
         [0000]    Step 1: substitute the factorization results of matrix W and get 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           nCSP 
                           n 
                         
                         = 
                           
                          
                         
                           
                             d 
                             
                               1 
                               × 
                               n 
                             
                             T 
                           
                            
                           
                             W 
                             
                               n 
                               × 
                               n 
                             
                           
                            
                           
                             e 
                             
                               n 
                               × 
                               1 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             
                               d 
                               
                                 1 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     [ 
                                     
                                       
                                         
                                           
                                             W 
                                             
                                               
                                                 ( 
                                                 
                                                   n 
                                                   - 
                                                   1 
                                                 
                                                 ) 
                                               
                                               × 
                                               
                                                 ( 
                                                 
                                                   n 
                                                   - 
                                                   1 
                                                 
                                                 ) 
                                               
                                             
                                           
                                         
                                         
                                           
                                             0 
                                             
                                               
                                                 ( 
                                                 
                                                   n 
                                                   - 
                                                   1 
                                                 
                                                 ) 
                                               
                                               × 
                                               1 
                                             
                                           
                                         
                                       
                                       
                                         
                                           
                                             0 
                                             
                                               1 
                                               × 
                                               
                                                 ( 
                                                 
                                                   n 
                                                   - 
                                                   1 
                                                 
                                                 ) 
                                               
                                             
                                           
                                         
                                         
                                           0 
                                         
                                       
                                     
                                     ] 
                                   
                                   
                                     n 
                                     × 
                                     n 
                                   
                                 
                                 + 
                                 
                                   G 
                                   
                                     n 
                                     × 
                                     n 
                                   
                                 
                               
                               ) 
                             
                           
                            
                           
                             e 
                             
                               n 
                               × 
                               1 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             
                               
                                 
                                   d 
                                   
                                     1 
                                     × 
                                     n 
                                   
                                   T 
                                 
                                  
                                 
                                   [ 
                                   
                                     
                                       
                                         
                                           W 
                                           
                                             
                                               ( 
                                               
                                                 n 
                                                 - 
                                                 1 
                                               
                                               ) 
                                             
                                             × 
                                             
                                               ( 
                                               
                                                 n 
                                                 - 
                                                 1 
                                               
                                               ) 
                                             
                                           
                                         
                                       
                                       
                                         
                                           0 
                                           
                                             
                                               ( 
                                               
                                                 n 
                                                 - 
                                                 1 
                                               
                                               ) 
                                             
                                             × 
                                             1 
                                           
                                         
                                       
                                     
                                     
                                       
                                         
                                           0 
                                           
                                             1 
                                             × 
                                             
                                               ( 
                                               
                                                 n 
                                                 - 
                                                 1 
                                               
                                               ) 
                                             
                                           
                                         
                                       
                                       
                                         0 
                                       
                                     
                                   
                                   ] 
                                 
                               
                               
                                 n 
                                 × 
                                 n 
                               
                             
                              
                             
                               e 
                               
                                 n 
                                 × 
                                 1 
                               
                             
                           
                           + 
                           
                             
                               d 
                               
                                 1 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               G 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                              
                             
                               e 
                               
                                 n 
                                 × 
                                 1 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             
                               ( 
                               
                                 n 
                                 - 
                                 1 
                               
                               ) 
                             
                              
                             
                               CSP 
                               
                                 n 
                                 - 
                                 1 
                               
                             
                           
                           + 
                           
                             
                               d 
                               
                                 1 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               G 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                              
                             
                               
                                 e 
                                 
                                   n 
                                   × 
                                   1 
                                 
                               
                               . 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Step 2: substitute the results of matrix G n×n  into (15).
       Define SP n =d 1×n   T G n×n e n×1  and SP n−1 =d 1×(n−1)   T G (n−1)×(n−1) e (n−1)×1  thus:       
 
         [0000]    
       
         
           
             
               
                 
                   
                     SP 
                     n 
                   
                   = 
                     
                    
                   
                     
                       d 
                       
                         1 
                         × 
                         n 
                       
                       T 
                     
                      
                     
                       G 
                       
                         n 
                         × 
                         n 
                       
                     
                      
                     
                       e 
                       
                         n 
                         × 
                         1 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       
                         
                           d 
                           
                             1 
                             × 
                             n 
                           
                           T 
                         
                          
                         
                           [ 
                           
                             
                               
                                 
                                   G 
                                   
                                     
                                       ( 
                                       
                                         n 
                                         - 
                                         1 
                                       
                                       ) 
                                     
                                     × 
                                     
                                       ( 
                                       
                                         n 
                                         - 
                                         1 
                                       
                                       ) 
                                     
                                   
                                 
                               
                               
                                 
                                   M 
                                   
                                     
                                       ( 
                                       
                                         n 
                                         - 
                                         1 
                                       
                                       ) 
                                     
                                     × 
                                     1 
                                   
                                 
                               
                             
                             
                               
                                 
                                   M 
                                   
                                     1 
                                     × 
                                     
                                       ( 
                                       
                                         n 
                                         - 
                                         1 
                                       
                                       ) 
                                     
                                   
                                   T 
                                 
                               
                               
                                 
                                   ( 
                                   
                                     n 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                               
                             
                           
                           ] 
                         
                       
                       
                         n 
                         × 
                         n 
                       
                     
                      
                     
                       e 
                       
                         n 
                         × 
                         1 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       
                         d 
                         
                           1 
                           × 
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                         
                         T 
                       
                        
                       
                         G 
                         
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                           × 
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                         
                       
                        
                       
                         e 
                         
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                           × 
                           1 
                         
                       
                     
                     + 
                   
                 
               
             
             
               
                 
                     
                    
                   
                     
                       
                         d 
                         
                           1 
                           × 
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                         
                         T 
                       
                        
                       
                         M 
                         
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                           × 
                           1 
                         
                       
                        
                       
                         sdy 
                         n 
                       
                     
                     + 
                     
                       
                         sdx 
                         n 
                       
                        
                       
                         M 
                         
                           1 
                           × 
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                         
                         T 
                       
                        
                       
                         e 
                         
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                           × 
                           1 
                         
                       
                     
                     + 
                   
                 
               
             
             
               
                 
                     
                    
                   
                     
                       
                         ( 
                         
                           n 
                           - 
                           1 
                         
                         ) 
                       
                        
                       
                         sdx 
                         n 
                       
                        
                       
                         sdy 
                         n 
                       
                     
                     , 
                   
                 
               
             
           
         
       
       
         
           
             Next, separately rewrite d 1×(n−1)   T M (n−1)×1  and M 1×(n−1)   T e (n−1)×1  as 
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   d 
                   
                     1 
                     × 
                     
                       ( 
                       
                         n 
                         - 
                         1 
                       
                       ) 
                     
                   
                   T 
                 
                  
                 
                   M 
                   
                     
                       ( 
                       
                         n 
                         - 
                         1 
                       
                       ) 
                     
                     × 
                     1 
                   
                 
               
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   
                     n 
                     - 
                     1 
                   
                 
                  
                 
                   
                     ( 
                     
                       n 
                       - 
                       1 
                     
                     ) 
                   
                    
                   
                     sdx 
                     i 
                   
                 
               
             
             , 
             
               
 
             
              
             
               
                 
                   M 
                   
                     t 
                     × 
                     
                       ( 
                       
                         n 
                         - 
                         1 
                       
                       ) 
                     
                   
                   T 
                 
                  
                 
                   e 
                   
                     
                       ( 
                       
                         n 
                         - 
                         1 
                       
                       ) 
                     
                     × 
                     1 
                   
                 
               
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   
                     n 
                     - 
                     1 
                   
                 
                  
                 
                   
                     ( 
                     
                       n 
                       - 
                       1 
                     
                     ) 
                   
                    
                   
                     
                       sdy 
                       i 
                     
                     . 
                   
                 
               
             
           
         
       
       
         
           
             To obtain 
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     SP 
                     n 
                   
                   = 
                   
                     
                       SP 
                       
                         n 
                         - 
                         1 
                       
                     
                     + 
                     
                       
                         ( 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             
                               n 
                               - 
                               1 
                             
                           
                            
                           
                             
                               ( 
                               
                                 i 
                                 - 
                                 1 
                               
                               ) 
                             
                              
                             
                               sdx 
                               i 
                             
                           
                         
                         ) 
                       
                        
                       
                         sdy 
                         n 
                       
                     
                     + 
                     
                       
                         ( 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             
                               n 
                               - 
                               1 
                             
                           
                            
                           
                             
                               ( 
                               
                                 i 
                                 - 
                                 1 
                               
                               ) 
                             
                              
                             
                               sdy 
                               i 
                             
                           
                         
                         ) 
                       
                        
                       
                         sdx 
                         n 
                       
                     
                     + 
                     
                       
                         ( 
                         
                           n 
                           - 
                           1 
                         
                         ) 
                       
                        
                       
                         sdx 
                         n 
                       
                        
                       
                         
                           sdy 
                           n 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
         [0056]    Lastly, merge the results of equation (15) and (16). The new computation algorithm of this invention is: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       nCSP 
                       n 
                     
                     = 
                     
                       
                         
                           ( 
                           
                             n 
                             - 
                             1 
                           
                           ) 
                         
                          
                         
                           CSP 
                           
                             n 
                             - 
                             1 
                           
                         
                       
                       + 
                       
                         SP 
                         n 
                       
                     
                   
                   , 
                   
                     
 
                   
                    
                   
                     
                       SP 
                       n 
                     
                     = 
                     
                       
                         SP 
                         
                           n 
                           - 
                           1 
                         
                       
                       + 
                       
                         
                           ( 
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 1 
                               
                               
                                 n 
                                 - 
                                 1 
                               
                             
                              
                             
                               
                                 ( 
                                 
                                   i 
                                   - 
                                   1 
                                 
                                 ) 
                               
                                
                               
                                 sdx 
                                 i 
                               
                             
                           
                           ) 
                         
                          
                         
                           sdy 
                           n 
                         
                       
                       + 
                       
                         
                           ( 
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 1 
                               
                               
                                 n 
                                 - 
                                 1 
                               
                             
                              
                             
                               
                                 ( 
                                 
                                   i 
                                   - 
                                   1 
                                 
                                 ) 
                               
                                
                               
                                 sdy 
                                 i 
                               
                             
                           
                           ) 
                         
                          
                         
                           sdx 
                           n 
                         
                       
                       + 
                       
                         
                           ( 
                           
                             n 
                             - 
                             1 
                           
                           ) 
                         
                          
                         
                           sdx 
                           n 
                         
                          
                         
                           
                             sdy 
                             n 
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The concrete steps of equation (17) executed in the computing hardware are: 
         [0057]    Step 1: Define the variables when the algorithm executed in the hardware
       First define the variables used in the computation. The initial value is 0, The variables are shown as follows:   The successive difference of the 1 st  variable is shown as sdx which is also sdx i  in equation (17). i=1 in the 1 st  turn, i=2 in the 2 nd  turn and so on.   The successive difference of the 2 nd  variable is shown as sdy which is also sdy i  in equation (17). i=1 in the 1 st  turn, i=2 in the 2 nd  turn and so on.   The iterated weighted sum of the successive difference of the 1 st  variable is shown as isum_sdx which is also       
 
         [0000]    
       
         
           
             ( 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 
                   n 
                   - 
                   1 
                 
               
                
               
                 
                   ( 
                   
                     i 
                     - 
                     1 
                   
                   ) 
                 
                  
                 
                   sdx 
                   i 
                 
               
             
             ) 
           
         
       
     
         [0000]    in equation (17). isum_sdx=0 in the 1 st  turn, n=2 in the 2 nd  turn and so on.
       The iterated weighted sum of the successive difference of the 2 nd  variable is shown as isum_sdy which is also       
 
         [0000]    
       
         
           
             ( 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 
                   n 
                   - 
                   1 
                 
               
                
               
                 
                   ( 
                   
                     i 
                     - 
                     1 
                   
                   ) 
                 
                  
                 
                   sdy 
                   i 
                 
               
             
             ) 
           
         
       
     
         [0000]    in equation (17). isum_sdy=0 in the 1 st  turn, n=2 in the 2 nd  turn and so on.
       Define sp, shown as SP n  in equation (17).   Define ncsp, shown as nCSP in equation (17).       
 
         [0065]    Step 2:
       Compute for the “successive difference” values of the two variables, sdx i  and sdy i          
 
         [0067]    Step 3:
       (i) multiply (i−1) with sdx i , then multiply again with sdy i      (ii) multiply isum_sdx with sdy and multiply isum_sdy with sdx   Add all the values of (i) and (ii), then add sp from the previous step and save it in sp       
 
         [0071]    Step 4:
       After adding ncsp to the sp of step 3, save in ncsp       
 
         [0073]    Step 5:
       Do the recursive computation of isum_sdx and isum_sdy   (i) multiply (i−1) with sdx i , add isum_sdx, then save in isum_sdx   (ii) multiply (i−1) with sdy i , add isum_sdy, then save in isum_sdy       
 
         [0077]    When entered the (i+1) th  data, return to step 1. 
         [0078]    The steps shown above can be written as the computation program executed in the hardware: 
         [0000]      csp:=0 
         [0000]      sp:=0 
         [0000]      isum_sdx:=0 
         [0000]      isum_sdy:=0 
         [0000]      X 0 =0 
         [0000]      Y 0 =0 
         [0000]      for i:=1 to n 
         [0000]    
       
      
       sdx:=X 
       i 
       −X 
       i−1  
      
     
         [0000]    
       
      
       sdy:=Y 
       i 
       −Y 
       i−1  
      
     
         [0000]        sp:=sp+i sum —   sdx*sdy+i sum_sdy*sdx+( i− 1)* sdx*sdy    
         [0000]    
       
      
       ncsp:=ncsp+sp  
      
     
         [0000]        i sum —   sdx:=i sum —   sdx +(i−1)* sdx    
         [0000]        i sum —   sdy:=i sum —   sdy +(i−1)* sdy    
         [0000]    
       
      
       csp:=ncsp/n  
      
     
         [0000]    Concrete Solutions of this Invention to the Problems:
       1. With a high accuracy, this invention improved the efficiency of equation (8) and the problem of not being able to perform a real time updatable computation.   2. The algorithm of CSP still can generalize to compute covariance, correlation coefficient and the computations of the variance-covariance matrices of multivariate and other related matrices which can solve the inefficiency of the computation.       
 
       BRIEF DESCRIPTION OF THE DRAWINGS 
       [0081]    None 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0082]    This invention used the data for quality control from Company xx&#39;s semiconductor processing as an example. In the etching process of semiconductor, the automatic measuring system automatically measures the width and depth of the four-point test in every semi-finished productions. The actual semi-finished productions data used in this invention are:
   Width: 237, 236, 235, 236   Depth: 128, 127, 126, 127   The steps of this invention&#39;s computation method are:   First, define the variable used in the computation and the initial value is 0   Define six variables sdx=0, sdy=0, isum_sdx=0, isum_sdy=0, sp=0, and ncsp=0   
 
       Input 1 st  Set of Data: 
       [0088]    Step 1:
       Compute the “successive difference” values of two variables,       
 
         [0000]        sdx   1 =237−0=237 
         [0000]        sdy   1 =128−0=128 
         [0090]    Step 2: 
         [0000]        sp= 0+0×237+0×128+(1−1)×237×128=0 
         [0091]    Step 3: 
         [0000]        ncsp =0+0=0 
         [0092]    Step 4: 
         [0000]        i sum —   sdx= 0+(1−1)×237=0 
         [0000]        i sum —   sdy= 0+(1−1)×128=0 
       Input 2 nd  Set of Data: 
       [0093]    Step 1:
       Compute the “successive difference” values of two variables,       
 
         [0000]        sdx   2 =236−237=−1 
         [0000]        sdy   2 =127−128=−1 
         [0095]    Step 2: 
         [0000]        sp= 0+0×(−1)+0×(−1)+(2−1)×(−1)×(−1)=1 
         [0096]    Step 3: 
         [0000]        ncsp= 0+1=1 
         [0097]    Step 4: 
         [0000]        i sum —   sdx= 0+(2−1)×(−1)=−1 
         [0000]        i sum —   sdy= 0+(2−1)×(−1)=−1 
       Input 3 rd  Set of Data: 
       [0098]    Step 1:
       Compute the “successive difference” values of two variables,       
 
         [0000]        sdx   3 =235−236=−1 
         [0000]        sdy   3 =126−127=−1 
         [0100]    Step 2: 
         [0000]        sp= 1+(−1)×(−1)+(−1)×(−1)+(3−1)×(−1)×(−1)=5 
         [0101]    Step 3: 
         [0000]        ncsp= 1+5=6 
         [0102]    Step 4: 
         [0000]        i sum —   sdx=− 1+(3−1)×(−1)=−3 
         [0000]        i sum_sdy=−1+(3−1)×(−1)=−3 
       Input 4 th  Set of Data: 
       [0103]    Step 1:
       Compute the “successive difference” values of two variables,       
 
         [0000]        sdx   4 =236−235=1 
         [0000]        sdy   4 =127−126=1 
         [0105]    Step 2: 
         [0000]        sp= 5+(−3)×1+(−3)×1+(4−1)×1×1=2 
         [0106]    Step 3: 
         [0000]        ncsp= 6+2=8 
         [0107]    Step 4: 
         [0000]        i sum —   sdx=− 3+(4−1)×1=0 
         [0000]        i sum —   sdy=− 3+(4−1)×1=0 
         [0000]    Last, compute CSP=ncsp/4=2. 
       Empirically Comparable Data: 
       [0108]    This invention used matrix decomposition to develop a new algorithm for computing CSP, which is executed in the hardware and that is recursive and can perform real time updates. Beside that it solved the inability to updates of equation (8), it also possesses high accuracy. In the empirical comparison, it was divided in two parts which is the computation of accuracy and the computation of efficiency. The comparable data used by this invention is the Statistical Reference Datasets (StRD) (http://www.nist.gov/itl/div898/strd (2007/12/01)) proposed by the National Institutes of Standards and Technology (NIST). 
       Information of StRD 
       [0109]    The empirical data used by this invention is the StRD provided by NIST. StRD is the benchmark datasets in the data library of NIST&#39;s Statistical Engineering and Mathematical and Computational Sciences Divisions. It was provided to diagnose the accuracy of the following 5 kinds of statistics: (a) univariate summary statistics, (b) Analysis of Variance (ANOVA), (c) linear regression, (d) Markov chain Monte Carlo and (e) nonlinear regression. StRD is recorded using ASCII code and certified values for 15 significant digits are provided in every empirical dataset. This invention cited two, among the five datasets, namely univariate summary statistics and ANOVA to test the computation accuracy of CSS algorithms. Below are the following explanations of the two datasets:
   (i) Univariate Summary Statistics
       The univariate summary statistics datasets is composed of nine datasets. Each dataset provide the mean, standard deviation and lag-1 autocorrelation coefficient of the 15 correct significant digits to certify the accuracy of the computation. The name, numbers and certified value of the standard deviation of the nine datasets are organized in the first three columns of Table 1. The certified value of CSS shown in the fourth column is the product of the “number of observed value subtracted by 1” after getting the square of the certified value of the standard deviation in column three. The certified value of CSS is used to compare the computation accuracy. These values are represented using the 15 significant digits. The empirical data of StRD can be downloaded from http://www.nist.gov/itl/div898/strd (2007/12/01).   
       
 
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 The certified value of StRD&#39;s univariate datasets 
               
             
          
           
               
                 Name of the 
                 Number of 
                 Certified value of the 
                 Certified 
               
               
                 datasets 
                 data 
                 standard deviation 
                 value of CSS 
               
               
                   
               
             
          
           
               
                 PiDidits 
                 5000 
                 2.86733906028871 
                 41099.9448000000 
               
               
                 Lottery 
                 218 
                 291.699727470969 
                 18464254.6284404 
               
               
                 Lew 
                 200 
                 277.332168044316 
                 15305713.1550000 
               
               
                 Mavro 
                 50 
                 0.000429123454003053 
                 0.000009023200000 
               
               
                 Michelso 
                 100 
                 0.0790105478190518 
                 0.618024000000000 
               
               
                 NumAcc1 
                 3 
                 1 
                 2.00000000000000 
               
               
                 NumAcc2 
                 1001 
                 0.1 
                 10.0000000000000 
               
               
                 NumAcc3 
                 1001 
                 0.1 
                 10.0000000000000 
               
               
                 NumAcc4 
                 1001 
                 0.1 
                 10.0000000000000 
               
               
                   
               
               
                 data source: the first three columns are organized from http://www.nist.gov/itl/div898/strd (2007/12/01) and the data in the 4th column is obtained through the transformation made by this invention 
               
             
          
         
       
       
         (ii) ANOVA Datasets
       ANOVA dataset is composed of 11 datasets. It is mainly used to test the accuracy of ANOVA&#39;s different parameters. Each dataset provide the sum of square, determine coefficient (R-square) and the standard error of mean (SEM) of the linear model in the ANOVA table. Each certified value provides 15 exact significant digits. The total sum of square (TSS) in the ANOVA table is the CSS computation indicated in this invention. Considering that the number of data of StRD&#39;s univariate summary statistics datasets is relatively few and even Pidigits datasets, with already the most number of data, has only 5000 data, it cannot reflect to the large amount of data collection and computation demand often seen in real world. In the computation of error, it irrefutably showed the accumulative errors in the CSS computation of large quantity data. Therefore, this invention cited the ANOVA datasets that has the most total amount of data, among which are three datasets SmLs03, SmLs06 and SmLs09 which all have 18009 data each. This invention made the ANOVA dataset into another dataset that test the computation accuracy. The names of the 11 datasets and the TSS of the 15 exact significant digits in the ANOVA dataset are the certified values indicated by this invention. The data are organized in Table 2.   
     
       
     
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 The certified value of StRD&#39;s ANOVA datasets 
               
             
          
           
               
                   
                 Name of the 
                 Number of 
                   
               
               
                   
                 datasets 
                 data 
                 Certified value of TSS 
               
               
                   
                   
               
             
          
           
               
                   
                 SirStv 
                 25 
                 0.26778282160000 
               
               
                   
                 SmLs01 
                 189 
                 3.480000000000000 
               
               
                   
                 SmLs02 
                 1809 
                 34.0800000000000 
               
               
                   
                 SmLs03 
                 18009 
                 340.080000000000 
               
               
                   
                 AtmWtAg 
                 48 
                 1.413351478166667e−8** 
               
               
                   
                 SmLs04 
                 189 
                 3.480000000000000 
               
               
                   
                 SmLs05 
                 1809 
                 34.0800000000000 
               
               
                   
                 SmLs06 
                 18009 
                 340.080000000000 
               
               
                   
                 SmLs07 
                 189 
                 3.480000000000000 
               
               
                   
                 SmLs08 
                 1809 
                 34.0800000000000 
               
               
                   
                 SmLs09 
                 18009 
                 340.080000000000 
               
               
                   
                   
               
               
                   
                 Data source: data are organized from http://www.nist.gov/itl/div898/strd (2007/12/01) 
               
               
                   
                 [note]: 
               
               
                   
                 e−8 means 10 −8 . 
               
             
          
         
       
     
       I. The Comparison of Computation Accuracy 
       [0114]    This invention executed a C++ program using a computer that has hardware of Intel Pentium M processor 1.73 GHz and RAM of 256 MB and Visual Studio.NET2003 platform of Windows XP. The executed computation program of this invention and the “corrected two-pass algorithm” is shown in Appendix 2. 
         [0115]    With regards to the comparison of computation accuracy, this invention used the suggested LRE value of Altman et al. (2004) as reference, as in equation (12). The size of the LRE value was used to represent the exact measure of significant digits of the decimal numbers. After computing using the program in Appendix 2, this invention transformed the results into LRE values using manual computation and the LRE values were rounded to the nearest tenths. If the 15 outputted significant digits and the certified value of StRD are similar or in other words, if the 15 significant digits are précised, it is noted with the word “exact”. 
         [0116]    In comparing accuracy, this invention separated the comparison into two parts: (1) compared with the existing most accuracy algorithm, “corrected two-pass algorithm” and (2) compared with the common data analysis software nowadays, SAS ver 9.0, SPSS ver15.0 and EXCEL 2007. The comparisons were separately explained below. 
         [0000]    (1.1) Compared with “Corrected Two-Pass Algorithm”
       (i) The comparison of univariate summary statistics dataset
           The results of univariate summary statistics dataset is organized in Table 3. As shown in Table 3, the datasets PiDidits, Lottery, Lew, NumAcc1 and NumAcc2 of this invention&#39;s algorithm were noted with the word “exact” while the NumAcc2 of the corrected two-pass algorithm” is 14.0. In addition, the LRE value of the dataset Michelso under this invention&#39;s algorithm is better than the “corrected two-pass algorithm” and the LRE value of the other datasets are similar with the “corrected two-pass algorithm”. According to the results in Table 3, it is shown that the computation accuracy of the algorithm proposed by this invention is at least similar with the results of the “corrected two-pass algorithm”.   
               
 
         [0000]    
       
         
               
             
               
               
               
               
             
           
               
                 TABLE 3 
               
             
             
               
                   
               
               
                 The LRE comparison of univariate summary statistics dataset 
               
             
          
           
               
                   
                   
                 The algorithm of this 
                 Corrected two-pass 
               
               
                   
                 Datasets 
                 invention 
                 algorithm 
               
               
                   
                   
               
               
                   
                 PiDidits 
                 exact 
                 exact 
               
               
                   
                 Lottery 
                 exact 
                 exact 
               
               
                   
                 Lew 
                 exact 
                 exact 
               
               
                   
                 Mavro 
                 12.8 
                 12.8 
               
               
                   
                 Michelso 
                 13.6 
                 13.5 
               
               
                   
                 NumAcc1 
                 exact 
                 exact 
               
               
                   
                 NumAcc2 
                 exact 
                 14.0 
               
               
                   
                 NumAcc3 
                 9.2 
                 9.2 
               
               
                   
                 NumAcc4 
                 8.0 
                 8.0 
               
               
                   
                   
               
               
                   
                 Data source: organized by this invention 
               
             
          
         
       
       
         
           
             (ii) The comparison of ANOVA Datasets
           The LRE values of the ANOVA datasets were organized in Table 4. It can be seen from Table 4 that the LRE values of the two datasets, SmLs01 and SmLs02, under this invention&#39;s algorithm are noted with the word “exact” while the LRE value of SmLs02 dataset under the “corrected two-pass algorithm” is 13.9 which shows that the computation accuracy of the “corrected two-pass algorithm” is not as good as this invention&#39;s. In addition, the LRE value of SmLs03 dataset under this invention&#39;s algorithm is greater than “corrected two-pass algorithm&#39;s” and the other LRE values are similar. From Table 4, the results showed that the accuracy of this invention&#39;s algorithm is at least similar with the accuracy of the “corrected two-pass algorithm”.   
         
           
         
       
     
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 4 
               
             
             
               
                   
               
               
                 The LRE comparison of ANOVA dataset 
               
             
          
           
               
                   
                   
                 The algorithm of 
                 Corrected two-pass 
               
               
                   
                 Datasets 
                 this invention 
                 algorithm 
               
               
                   
                   
               
             
          
           
               
                   
                 SirStv 
                 13.2 
                 13.2 
               
               
                   
                 SmLs01 
                 exact 
                 exact 
               
               
                   
                 SmLs02 
                 exact 
                 13.9 
               
               
                   
                 SmLs03 
                 13.8 
                 13.1 
               
               
                   
                 AtmWtAg 
                 9.2 
                 9.2 
               
               
                   
                 SmLs04 
                 10.2 
                 10.2 
               
               
                   
                 SmLs05 
                 10.1 
                 10.1 
               
               
                   
                 SmLs06 
                 10.1 
                 10.1 
               
               
                   
                 SmLs07 
                 4.1 
                 4.1 
               
               
                   
                 SmLs08 
                 4.1 
                 4.1 
               
               
                   
                 SmLs09 
                 4.1 
                 4.1 
               
               
                   
                   
               
               
                   
                 Data source: organized by this invention 
               
             
          
         
       
     
         [0121]    Combining the results of Table 3 and 4, it can be seen that the accuracy of this invention&#39;s algorithm is at least similar with the precision of the existing most accuracy algorithm, “corrected two-pass algorithm”. 
         [0000]    (1.2) Comparison of the Results Obtained using SAS ver9.0, SPSS ver15.0 and EXCEL 2007
       In comparing the accuracy of the application softwares, SPSS ver15.0 and EXCEL 2007 did not provide the function of CSS and only SAS ver9.0 provide CSS results which were used as a standard for comparison. With regards to the computation of SPSS ver15.0 and EXCEL2007, this invention used the results obtained from the variance calculation executed by the software after being multiplied to the “number of data subtracted by 1” for comparison. With regards to SAS ver9.0, this invention used the results directly produced by the most commonly used “proc univariate&#39;s” CSS for comparison. The comparison between the results of univariate summary statistics dataset and ANOVA dataset are separately stated below:   (i) Comparison of the univariate summary statistics dataset
           The comparison of the LRE values of the univariate summary statistics dataset was organized in Table 5. From Table 5, it can be seen that the accuracy of lottery dataset of this invention is better than of SAS ver9.0&#39;s. The LRE value of Mavro dataset is greater than the LRE value of SAS ver9.0 and SPSS ver15.0. The LRE value of Michelso dataset is greater than the three application software&#39;s. With regards to the LRE values of the other datasets, they are at least greater than or equal to the results of the other three software.   
               
 
         [0000]    
       
         
               
             
               
               
               
               
               
             
           
               
                 TABLE 5 
               
             
             
               
                   
               
               
                 The comparison among the LRE value of the univariate summary 
               
               
                 statistics dataset and three different application softwares 
               
             
          
           
               
                   
                 The algorithm 
                   
                   
                   
               
               
                   
                 of this 
                 UNIVARIATE 
                 SPSS 
               
               
                 Datasets 
                 invention 
                 of SAS ver9.0 
                 ver15.0 
                 EXCEL 2007 
               
               
                   
               
               
                 PiDidits 
                 exact 
                 exact 
                 exact 
                 exact 
               
               
                 Lottery 
                 exact 
                 14.3 
                 exact 
                 exact 
               
               
                 Lew 
                 exact 
                 exact 
                 exact 
                 exact 
               
               
                 Mavro 
                 12.8 
                 12.5 
                 11.8 
                 12.8 
               
               
                 Michelso 
                 13.6 
                 12.1 
                 12.1 
                 13.5 
               
               
                 NumAcc1 
                 exact 
                 exact 
                 exact 
                 exact 
               
               
                 NumAcc2 
                 exact 
                 exact 
                 exact 
                 11.3 
               
               
                 NumAcc3 
                 9.2 
                 9.1 
                 9.2 
                 9.2 
               
               
                 NumAcc4 
                 8.0 
                 8.0 
                 8.0 
                 8.0 
               
               
                   
               
               
                 Data source: organized by this invention 
               
             
          
         
       
       
         
           
             (ii) Comparison of ANOVA Dataset
           The comparison of the LRE values of the ANOVA datasets were organized in Table 6. Table 6 showed that the LRE value of SirStv dataset of this invention is greater than the value of SAS ver9.0 and SPSS ver15.0. The LRE value of SmLs01 dataset is greater than EXCEL 2007&#39;s. The LRE value of SmLs02 dataset is greater than SAS ver9.0&#39;s and EXCEL 2007&#39;s. The LRE value of SmLs03 data set is smaller than SPSS ver15.0&#39;s but greater than SAS ver9.0&#39;s and EXCEL 2007&#39;s. The accuracy of AtmWtAg, SmLs04, SmLs05 and SmLs06 are all higher than SAS ver9.0&#39;s and SPSS ver15.0&#39;s. With regards to the three datasets SmLs07, SmLs08 and SmLs09, the LRE values of this invention&#39;s algorithm are greater than the values of the three data analysis software. Last, what should be specially mentioned is that the computation of SmLs09 dataset in SAS ver9.0 and EXCEL 2007, the 15 significant digits computed by SAS ver9.0 and EXCEL 2007 were not exact.   
         
           
         
       
     
         [0000]    
       
         
               
             
               
               
               
               
               
             
               
               
               
               
               
             
           
               
                 TABLE 6 
               
             
             
               
                   
               
               
                 The comparison among the LRE value of ANOVA 
               
               
                 dataset and application software 
               
             
          
           
               
                   
                 The 
                   
                   
                   
               
               
                   
                 algorithm of 
               
               
                   
                 this 
                 UNIVARIATE 
               
               
                 Datasets 
                 invention 
                 of SAS ver9.0 
                 SPSS 15.0 
                 EXCEL 2007 
               
               
                   
               
             
          
           
               
                 SirStv 
                 13.2 
                 13.0 
                 12.8 
                 13.2 
               
               
                 SmLs01 
                 exact 
                 exact 
                 exact 
                 12.9 
               
               
                 SmLs02 
                 exact 
                 14.1 
                 exact 
                 12.3 
               
               
                 SmLs03 
                 13.8 
                 13.1 
                 14.2 
                 10.3 
               
               
                 AtmWtAg 
                 9.2 
                 8.8 
                 9.1 
                 9.2 
               
               
                 SmLs04 
                 10.2 
                 9.0 
                 9.4 
                 10.2 
               
               
                 SmLs05 
                 10.1 
                 8.1 
                 9.8 
                 10.1 
               
               
                 SmLs06 
                 10.1 
                 7.5 
                 1.1 
                 10.1 
               
               
                 SmLs07 
                 4.1 
                 1.1 
                 1.0 
                 4.0 
               
               
                 SmLs08 
                 4.1 
                 1.1 
                 2.2 
                 2.2 
               
               
                 SmLs09 
                 4.1 
                 Error in the 15 
                 1.1 
                 Error in the 
               
               
                   
                   
                 significant 
                   
                 15 significant 
               
               
                   
                   
                 digits 
                   
                 digits 
               
               
                   
               
               
                 Data source: organized by this invention 
               
             
          
         
       
     
         [0127]    Combining the results of Table 5 and 6, it showed that the accuracy of this invention&#39;s algorithm is better than the accuracy of the three different application softwares. 
       II. Comparison of the Efficiency of Computation 
       [0128]    In the efficiency of the computation, to solve the computation problem of large amount of data, this invention copied the 2 nd  to 1001 st  set of NumAcc4 of StRD&#39;s univariate summary statistics datasets 1000 times and used the total amount of 1000001 data as the comparison of computation efficiency. The efficiency of computation was compared through the length of time used in computation. The program for the length of the computation time period is shown in Appendix 1 and the result of the time of the computation period is organized in Table 7. From the result of the test using 1000001 data, it showed that the length of computation period of the updating algorithm proposed by this invention is evidently shorter than the corrected two-pass algorithm&#39;s. 
         [0000]                                      TABLE 7                   The comparison of computation period of this invention&#39;s       algorithm and the corrected two-pass algorithm                    The updating                   algorithm of this   Corrected two-pass           Algorithm   invention   algorithm                       Length of the   5 sec.   9 sec.           computation           period                       Data source: organized by this invention            
Appendix 1 The mathematical equivalent proof of equation (8) and (1)
 
         [0129]    The n pair datasets of two variables: {X, Y}={(x 1 , y 1 ), (x 2 , y 2 ), . . . ,(x n , y n )}, d and e separately represent the successive difference vectors of two variables, as 
         [0000]      d T =[d 1  d 2  . . . d n ] 
         [0000]      e T =[e 1  e 2  . . . e n ] 
         [0000]      where, 
         [0000]        d   1   =x   1   , d   i   =x   i   −x   i−1   , i= 1,2, . . . ,  n,    
         [0000]        e   1   =y   1   , e   j   =y   j   −y   j−1   , j= 1,2, . . . ,  n.    
         [0000]      Set 
         [0000]      W=[w ij ] n×n , 
         [0000]    where 
         [0000]    
       
         
           
             
               
                 w 
                 ij 
               
               = 
               
                 
                   
                     ( 
                     
                       i 
                       + 
                       j 
                       - 
                       1 
                     
                     ) 
                   
                    
                   
                     ( 
                     
                       n 
                       + 
                       1 
                     
                     ) 
                   
                 
                 - 
                 ij 
                 - 
                 
                   
                     n 
                     2 
                   
                    
                   
                     ( 
                     
                       i 
                       + 
                       j 
                       + 
                       
                          
                         
                           i 
                           - 
                           j 
                         
                          
                       
                     
                     ) 
                   
                 
               
             
             , 
             i 
             , 
             
               j 
               = 
               1 
             
             , 
             2 
             , 
             … 
              
             
                 
             
             , 
             
               n 
               . 
               
                 
 
               
                
               Thus 
             
           
         
       
       
         
           
             
               
                 
                   CSP 
                   = 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       d 
                       T 
                     
                      
                     We 
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         n 
                       
                        
                       
                         
                           ∑ 
                           
                             j 
                             = 
                             1 
                           
                           n 
                         
                          
                         
                           
                             
                               w 
                               ij 
                             
                              
                             
                               ( 
                               
                                 
                                   x 
                                   i 
                                 
                                 - 
                                 
                                   x 
                                   
                                     i 
                                     - 
                                     1 
                                   
                                 
                               
                               ) 
                             
                           
                            
                           
                             
                               ( 
                               
                                 
                                   y 
                                   j 
                                 
                                 - 
                                 
                                   y 
                                   
                                     j 
                                     - 
                                     1 
                                   
                                 
                               
                               ) 
                             
                             . 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
       Prove: 
       [0130]    The data of the two variables (X, Y) separately represented by vectors as 
         [0000]      x=[x 1  x 2  . . . x n ] T , 
         [0000]      y=[y 1  y 2  . . . y n ] T , 
         [0000]    Thus, the data of the two variables x and y can be represented by successive differences as 
         [0000]    
       
         
           
             
               
                 x 
                 
                   n 
                   × 
                   1 
                 
               
               = 
               
                 
                   [ 
                   
                     
                       d 
                       1 
                     
                      
                     
                         
                     
                      
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         2 
                       
                        
                       
                         
                           d 
                           i 
                         
                          
                         
                             
                         
                          
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             3 
                           
                            
                           
                             
                               d 
                               i 
                             
                              
                             
                                 
                             
                              
                             … 
                              
                             
                                 
                             
                              
                             
                               
                                 ∑ 
                                 
                                   i 
                                   = 
                                   1 
                                 
                                 n 
                               
                                
                               
                                 d 
                                 i 
                               
                             
                           
                         
                       
                     
                   
                   ] 
                 
                 T 
               
             
             , 
             
               
 
             
              
             
               
                 y 
                 
                   n 
                   × 
                   1 
                 
               
               = 
               
                 
                   
                     [ 
                     
                       
                         e 
                         1 
                       
                        
                       
                           
                       
                        
                       
                         
                           ∑ 
                           
                             i 
                             = 
                             1 
                           
                           2 
                         
                          
                         
                           
                             e 
                             i 
                           
                            
                           
                               
                           
                            
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 1 
                               
                               3 
                             
                              
                             
                               
                                 e 
                                 i 
                               
                                
                               
                                   
                               
                                
                               … 
                                
                               
                                   
                               
                                
                               
                                 
                                   ∑ 
                                   
                                     i 
                                     = 
                                     1 
                                   
                                   n 
                                 
                                  
                                 
                                   e 
                                   i 
                                 
                               
                             
                           
                         
                       
                     
                     ] 
                   
                   T 
                 
                 . 
               
             
           
         
       
     
         [0000]    Then, x n×1  and y n×1  are written as 
         [0000]        x   n×1   =P   n×n d n×1  and y n×1   =P   n×n e n×1 , 
         [0000]    where 
         [0000]    
       
         
           
             P 
             = 
             
               
                 
                   [ 
                   
                     
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         … 
                       
                       
                         0 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         … 
                       
                       
                         0 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         … 
                       
                       
                         0 
                       
                     
                     
                       
                         … 
                       
                       
                         … 
                       
                       
                         … 
                       
                       
                         ⋰ 
                       
                       
                         … 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         … 
                       
                       
                         1 
                       
                     
                   
                   ] 
                 
                 
                   n 
                   × 
                   n 
                 
               
               . 
             
           
         
       
     
         [0000]    The element of P&#39;s row i and column j is 
         [0000]    
       
         
           
             
               p 
               ij 
             
             = 
             
               { 
               
                 
                   
                     
                       
                         1 
                         , 
                       
                     
                     
                       
                         j 
                         ≤ 
                         i 
                       
                     
                   
                   
                     
                       
                         0 
                         , 
                       
                     
                     
                       
                         j 
                         &gt; 
                         i 
                       
                     
                   
                 
                 , 
                 i 
                 , 
                 
                   j 
                   = 
                   1 
                 
                 , 
                 2 
                 , 
                 … 
                  
                 
                     
                 
                 , 
                 
                   n 
                   . 
                 
               
             
           
         
       
     
         [0000]    The mean of the two variables can be represented as 
         [0000]    
       
         
           
             
               
                 x 
                 _ 
               
               = 
               
                 
                   
                     1 
                     2 
                   
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       x 
                       i 
                     
                   
                 
                 = 
                 
                   
                     1 
                     2 
                   
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       
                         ( 
                         
                           n 
                           - 
                           i 
                           + 
                           1 
                         
                         ) 
                       
                        
                       
                         d 
                         i 
                       
                     
                   
                 
               
             
             , 
             
               
 
             
              
             
               
                 y 
                 _ 
               
               = 
               
                 
                   
                     1 
                     2 
                   
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       y 
                       i 
                     
                   
                 
                 = 
                 
                   
                     1 
                     2 
                   
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       
                         ( 
                         
                           n 
                           - 
                           i 
                           + 
                           1 
                         
                         ) 
                       
                        
                       
                         
                           e 
                           i 
                         
                         . 
                       
                     
                   
                 
               
             
           
         
       
     
       Therefore, 
       [0131]          x     n×1   =Q   n×n   d   n×1 , 
         [0000]          y     n×1   =Q   n×n   e   n×1 , 
         [0000]    where, 
         [0000]    
       
         
           
             
               Q 
               = 
               
                 
                   
                     1 
                     2 
                   
                    
                   
                     [ 
                     
                       
                         
                           n 
                         
                         
                           
                             n 
                             - 
                             1 
                           
                         
                         
                           
                             n 
                             - 
                             2 
                           
                         
                         
                           
                             n 
                             - 
                             3 
                           
                         
                         
                           … 
                         
                         
                           1 
                         
                       
                       
                         
                           n 
                         
                         
                           
                             n 
                             - 
                             1 
                           
                         
                         
                           
                             n 
                             - 
                             2 
                           
                         
                         
                           
                             n 
                             - 
                             3 
                           
                         
                         
                           … 
                         
                         
                           1 
                         
                       
                       
                         
                           ⋮ 
                         
                         
                           ⋮ 
                         
                         
                           ⋮ 
                         
                         
                           ⋮ 
                         
                         
                           ⋰ 
                         
                         
                           ⋮ 
                         
                       
                       
                         
                           n 
                         
                         
                           
                             n 
                             - 
                             1 
                           
                         
                         
                           
                             n 
                             - 
                             2 
                           
                         
                         
                           
                             n 
                             - 
                             3 
                           
                         
                         
                           … 
                         
                         
                           1 
                         
                       
                     
                     ] 
                   
                 
                 
                   n 
                   × 
                   n 
                 
               
             
             , 
           
         
       
     
         [0000]    The element of Q&#39;s row i and column j is 
         [0000]    
       
         
           
             
               
                 q 
                 ij 
               
               = 
               
                 
                   [ 
                   
                     
                       1 
                       2 
                     
                      
                     
                       ( 
                       
                         n 
                         - 
                         j 
                         + 
                         1 
                       
                       ) 
                     
                   
                   ] 
                 
                 
                   n 
                   × 
                   n 
                 
               
             
             , 
             i 
             , 
             
               j 
               = 
               1 
             
             , 
             2 
             , 
             … 
              
             
                 
             
             , 
             
               n 
               . 
               
                 
 
               
                
               Therefore 
             
           
         
       
       
         
           
             
               
                 
                   CSP 
                   = 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       n 
                     
                      
                     
                       
                         ( 
                         
                           
                             x 
                             i 
                           
                           - 
                           
                             x 
                             _ 
                           
                         
                         ) 
                       
                        
                       
                         ( 
                         
                           
                             y 
                             i 
                           
                           - 
                           
                             y 
                             _ 
                           
                         
                         ) 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         ( 
                         
                           
                             x 
                             
                               n 
                               × 
                               1 
                             
                           
                           - 
                           
                             
                               x 
                               _ 
                             
                             
                               n 
                               × 
                               1 
                             
                           
                         
                         ) 
                       
                       T 
                     
                      
                     
                       ( 
                       
                         
                           y 
                           
                             n 
                             × 
                             1 
                           
                         
                         - 
                         
                           
                             y 
                             _ 
                           
                           
                             n 
                             × 
                             1 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         [ 
                         
                           
                             ( 
                             
                               
                                 P 
                                 
                                   n 
                                   × 
                                   n 
                                 
                               
                               - 
                               
                                 Q 
                                 
                                   n 
                                   × 
                                   n 
                                 
                               
                             
                             ) 
                           
                            
                           
                             d 
                             
                               n 
                               × 
                               1 
                             
                           
                         
                         ] 
                       
                       T 
                     
                      
                     
                       [ 
                       
                         
                           ( 
                           
                             
                               P 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                             - 
                             
                               Q 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                           ) 
                         
                          
                         
                           e 
                           
                             n 
                             × 
                             1 
                           
                         
                       
                       ] 
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         
                           d 
                           
                             1 
                             × 
                             n 
                           
                           T 
                         
                          
                         
                           ( 
                           
                             
                               P 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                             - 
                             
                               Q 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                           ) 
                         
                       
                       T 
                     
                      
                     
                       ( 
                       
                         
                           P 
                           
                             n 
                             × 
                             n 
                           
                         
                         - 
                         
                           Q 
                           
                             n 
                             × 
                             n 
                           
                         
                       
                       ) 
                     
                      
                     
                       e 
                       
                         n 
                         × 
                         1 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         d 
                         
                           1 
                           × 
                           n 
                         
                         T 
                       
                        
                       
                         ( 
                         
                           
                             
                               P 
                               
                                 n 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               P 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                           - 
                           
                             
                               P 
                               
                                 n 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               Q 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                           - 
                           
                             
                               Q 
                               
                                 n 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               P 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                           + 
                           
                             
                               Q 
                               
                                 n 
                                 × 
                                 n 
                               
                               T 
                             
                              
                             
                               Q 
                               
                                 n 
                                 × 
                                 n 
                               
                             
                           
                         
                         ) 
                       
                     
                      
                     
                       e 
                       
                         n 
                         × 
                         1 
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    Next, compute P n×n   T P n×n , P n×n   T Q n×n , Q n×n   T P n×n  and Q n×n   T Q n×n  separately. 
         [0132]    (1) Compute P n×n   T n×n 
         [0000]    
       
         
           
             
               
                 
                   
                     Set 
                      
                     
                         
                     
                      
                     
                       L 
                       
                         n 
                         × 
                         n 
                       
                     
                   
                   = 
                   
                     
                       P 
                       
                         n 
                         × 
                         n 
                       
                       T 
                     
                      
                     
                       P 
                       
                         n 
                         × 
                         n 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         
                           [ 
                           
                             
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                             
                               
                                 0 
                               
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                             
                               
                                 0 
                               
                               
                                 0 
                               
                               
                                 1 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                             
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋰ 
                               
                               
                                 ⋮ 
                               
                             
                             
                               
                                 0 
                               
                               
                                 0 
                               
                               
                                 0 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                           
                           ] 
                         
                         
                           n 
                           × 
                           n 
                         
                       
                        
                       
                         [ 
                         
                           
                             
                               1 
                             
                             
                               0 
                             
                             
                               0 
                             
                             
                               … 
                             
                             
                               0 
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               0 
                             
                             
                               … 
                             
                             
                               0 
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               1 
                             
                             
                               … 
                             
                             
                               0 
                             
                           
                           
                             
                               ⋮ 
                             
                             
                               ⋮ 
                             
                             
                               ⋮ 
                             
                             
                               ⋰ 
                             
                             
                               ⋮ 
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               1 
                             
                             
                               … 
                             
                             
                               1 
                             
                           
                         
                         ] 
                       
                     
                     
                       n 
                       × 
                       n 
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       [ 
                       
                         
                           ∑ 
                           
                             k 
                             = 
                             1 
                           
                           n 
                         
                          
                         
                           
                             p 
                             ik 
                           
                            
                           
                             p 
                             kj 
                           
                         
                       
                       ] 
                     
                     
                       n 
                       × 
                       n 
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         ⌊ 
                         
                           l 
                           ij 
                         
                         ⌋ 
                       
                       
                         n 
                         × 
                         n 
                       
                     
                     . 
                   
                 
               
             
           
         
       
       
         
           
             where 
             , 
             
               
 
             
              
             
               
                 
                   
                     
                       l 
                       ij 
                     
                     = 
                     
                       { 
                       
                         
                           
                             
                               
                                 n 
                                 - 
                                 j 
                                 + 
                                 1 
                               
                               , 
                             
                           
                           
                             
                               i 
                               ≤ 
                               j 
                             
                           
                         
                         
                           
                             
                               
                                 n 
                                 - 
                                 i 
                                 + 
                                 1 
                               
                               , 
                             
                           
                           
                             
                               i 
                               &gt; 
                               j 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   
                     
                       = 
                       
                         n 
                         - 
                         
                           
                             1 
                             2 
                           
                            
                           
                             ( 
                             
                               i 
                               + 
                               j 
                               + 
                               
                                  
                                 
                                   i 
                                   - 
                                   j 
                                 
                                  
                               
                               - 
                               2 
                             
                             ) 
                           
                         
                       
                     
                     , 
                     i 
                     , 
                     
                       j 
                       = 
                       1 
                     
                     , 
                     2 
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       n 
                       . 
                     
                   
                 
               
             
           
         
       
     
         [0133]    (2) Compute P n×n   T Q n×n  and Q n×n   T P n×n   
         [0000]    
       
         
           
             
               
                 
                   
                     Set 
                      
                     
                         
                     
                      
                     
                       C 
                       
                         n 
                         × 
                         n 
                       
                     
                   
                   = 
                   
                     
                       P 
                       
                         n 
                         × 
                         n 
                       
                       T 
                     
                      
                     
                       Q 
                       
                         n 
                         × 
                         n 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       
                         [ 
                         
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               … 
                             
                             
                               1 
                             
                             
                               1 
                             
                           
                           
                             
                               0 
                             
                             
                               1 
                             
                             
                               … 
                             
                             
                               1 
                             
                             
                               1 
                             
                           
                           
                             
                               ⋮ 
                             
                             
                               ⋮ 
                             
                             
                               ⋰ 
                             
                             
                               ⋮ 
                             
                             
                               ⋮ 
                             
                           
                           
                             
                               0 
                             
                             
                               0 
                             
                             
                               ⋰ 
                             
                             
                               1 
                             
                             
                               1 
                             
                           
                           
                             
                               0 
                             
                             
                               0 
                             
                             
                               … 
                             
                             
                               0 
                             
                             
                               1 
                             
                           
                         
                         ] 
                       
                       
                         n 
                         × 
                         n 
                       
                     
                      
                     
                       
                         
                           1 
                           n 
                         
                          
                         
                           [ 
                           
                             
                               
                                 n 
                               
                               
                                 
                                   n 
                                   - 
                                   1 
                                 
                               
                               
                                 
                                   n 
                                   - 
                                   2 
                                 
                               
                               
                                 
                                   n 
                                   - 
                                   3 
                                 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                             
                               
                                 n 
                               
                               
                                 
                                   n 
                                   - 
                                   1 
                                 
                               
                               
                                 
                                   n 
                                   - 
                                   2 
                                 
                               
                               
                                 
                                   n 
                                   - 
                                   3 
                                 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                             
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋮ 
                               
                               
                                 ⋰ 
                               
                               
                                 ⋮ 
                               
                             
                             
                               
                                 n 
                               
                               
                                 
                                   n 
                                   - 
                                   1 
                                 
                               
                               
                                 
                                   n 
                                   - 
                                   2 
                                 
                               
                               
                                 
                                   n 
                                   - 
                                   3 
                                 
                               
                               
                                 … 
                               
                               
                                 1 
                               
                             
                           
                           ] 
                         
                       
                       
                         n 
                         × 
                         n 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       [ 
                       
                         
                           ∑ 
                           
                             k 
                             = 
                             1 
                           
                           n 
                         
                          
                         
                           
                             p 
                             ik 
                           
                            
                           
                             p 
                             kj 
                           
                         
                       
                       ] 
                     
                     
                       n 
                       × 
                       n 
                     
                   
                 
               
             
             
               
                 
                   
                     = 
                     
                       
                         ⌊ 
                         
                           c 
                           ij 
                         
                         ⌋ 
                       
                       
                         n 
                         × 
                         n 
                       
                     
                   
                   , 
                 
               
             
           
         
       
       
         
           where 
         
       
       
         
           
             
               
                 c 
                 ij 
               
               = 
               
                 
                   1 
                   n 
                 
                  
                 
                   ( 
                   
                     n 
                     - 
                     j 
                     + 
                     1 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     n 
                     - 
                     i 
                     + 
                     1 
                   
                   ) 
                 
               
             
             , 
             i 
             , 
             
               j 
               = 
               1 
             
             , 
             2 
             , 
             … 
              
             
                 
             
             , 
             
               
                 n 
                 . 
                 
                   
 
                 
                  
                 and 
               
                
               
                   
               
                
               also 
             
           
         
       
       
         
           
             
               c 
               ij 
             
             = 
             
               
                 c 
                 ij 
               
               = 
               
                 
                   1 
                   n 
                 
                  
                 
                   ( 
                   
                     n 
                     - 
                     i 
                     + 
                     1 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     n 
                     - 
                     j 
                     + 
                     1 
                   
                   ) 
                 
               
             
           
         
       
     
         [0000]    that is, P n×n   T Q n×n =(P n×n   T Q) T Q n×n   T P n×n . 
         [0134]    (3) Compute Q T Q 
         [0000]    
       
         
           
             
               
                 
                   
                     Set 
                      
                     
                         
                     
                      
                     
                       R 
                       
                         n 
                         × 
                         n 
                       
                     
                   
                   = 
                     
                    
                   
                     Q 
                     
                       n 
                       × 
                       n 
                     
                     T 
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       [ 
                       
                         
                           
                             n 
                           
                           
                             n 
                           
                           
                             … 
                           
                           
                             n 
                           
                           
                             n 
                           
                         
                         
                           
                             
                               n 
                               - 
                               1 
                             
                           
                           
                             
                               n 
                               - 
                               1 
                             
                           
                           
                             … 
                           
                           
                             
                               n 
                               - 
                               1 
                             
                           
                           
                             
                               n 
                               - 
                               1 
                             
                           
                         
                         
                           
                             ⋮ 
                           
                           
                             ⋮ 
                           
                           
                             … 
                           
                           
                             ⋮ 
                           
                           
                             ⋮ 
                           
                         
                         
                           
                             2 
                           
                           
                             2 
                           
                           
                             … 
                           
                           
                             2 
                           
                           
                             2 
                           
                         
                         
                           
                             1 
                           
                           
                             1 
                           
                           
                             … 
                           
                           
                             1 
                           
                           
                             1 
                           
                         
                       
                       ] 
                     
                   
                 
               
             
             
               
                 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       [ 
                       
                         
                           
                             n 
                           
                           
                             
                               n 
                               - 
                               1 
                             
                           
                           
                             
                               n 
                               - 
                               2 
                             
                           
                           
                             
                               n 
                               - 
                               3 
                             
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                         
                           
                             n 
                           
                           
                             
                               n 
                               - 
                               1 
                             
                           
                           
                             
                               n 
                               - 
                               2 
                             
                           
                           
                             
                               n 
                               - 
                               3 
                             
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                         
                           
                             ⋮ 
                           
                           
                             ⋮ 
                           
                           
                             ⋮ 
                           
                           
                             ⋮ 
                           
                           
                             ⋰ 
                           
                           
                             ⋮ 
                           
                         
                         
                           
                             n 
                           
                           
                             
                               n 
                               - 
                               1 
                             
                           
                           
                             
                               n 
                               - 
                               2 
                             
                           
                           
                             
                               n 
                               - 
                               3 
                             
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                       
                       ] 
                     
                   
                 
               
             
           
         
       
       
         
           
             
               
                 
                   
                     r 
                     ij 
                   
                   = 
                   
                     
                       ∑ 
                       
                         k 
                         = 
                         i 
                       
                       n 
                     
                      
                     
                       
                         q 
                         ik 
                       
                        
                       
                         q 
                         kj 
                       
                     
                   
                 
               
             
             
               
                 
                   
                     = 
                     
                       
                         ⌊ 
                         
                           r 
                           ij 
                         
                         ⌋ 
                       
                       
                         n 
                         × 
                         n 
                       
                     
                   
                   , 
                 
               
             
           
         
       
       
         
           where 
         
       
       
         
           
             
               
                 r 
                 ij 
               
               = 
               
                 
                   1 
                   n 
                 
                  
                 
                   ( 
                   
                     n 
                     - 
                     j 
                     + 
                     1 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     n 
                     - 
                     i 
                     + 
                     1 
                   
                   ) 
                 
               
             
             , 
             i 
             , 
             
               j 
               = 
               1 
             
             , 
             2 
             , 
             … 
              
             
                 
             
             , 
             
               n 
               . 
             
           
         
       
     
         [0000]    It can be seen that P T Q=Q T P=Q T Q, 
         [0135]    Therefore, (P−Q) T (P−Q)=P T P−P T Q−Q T P+Q T Q=P T P−P T Q. 
         [0136]    Next, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       Prove 
                        
                       
                           
                       
                        
                       
                         P 
                         
                           n 
                           × 
                           n 
                         
                         T 
                       
                        
                       
                         P 
                         
                           n 
                           × 
                           n 
                         
                       
                     
                     - 
                     
                       
                         P 
                         
                           n 
                           × 
                           n 
                         
                         T 
                       
                        
                       
                         Q 
                         
                           n 
                           × 
                           n 
                         
                       
                     
                   
                   = 
                   
                     
                       [ 
                       
                         
                           l 
                           ij 
                         
                         - 
                         
                           c 
                           ij 
                         
                       
                       ] 
                     
                     
                       n 
                       × 
                       n 
                     
                   
                 
               
             
             
               
                 
                   
                     = 
                     
                       w 
                       
                         n 
                         × 
                         n 
                       
                     
                   
                   , 
                 
               
             
           
         
       
       
         
           
             
               
                 
                   
                     
                       l 
                       ij 
                     
                     - 
                     
                       c 
                       ij 
                     
                   
                   = 
                     
                    
                   
                     n 
                     - 
                     
                       
                         1 
                         2 
                       
                        
                       
                         ( 
                         
                           i 
                           + 
                           j 
                           + 
                           
                              
                             
                               i 
                               - 
                               j 
                             
                              
                           
                           - 
                           2 
                         
                         ) 
                       
                     
                     - 
                     
                       
                         1 
                         n 
                       
                        
                       
                         ( 
                         
                           n 
                           - 
                           i 
                           + 
                           1 
                         
                         ) 
                       
                        
                       
                         ( 
                         
                           n 
                           - 
                           j 
                           + 
                           1 
                         
                         ) 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       ( 
                       
                         
                           n 
                           2 
                         
                         - 
                         
                           
                             n 
                             2 
                           
                            
                           
                             ( 
                             
                               i 
                               + 
                               j 
                               + 
                               
                                  
                                 
                                   i 
                                   - 
                                   j 
                                 
                                  
                               
                             
                             ) 
                           
                         
                         - 
                         n 
                         - 
                         
                           
                             ( 
                             
                               n 
                               - 
                               i 
                               + 
                               1 
                             
                             ) 
                           
                            
                           
                             ( 
                             
                               n 
                               - 
                               j 
                               + 
                               1 
                             
                             ) 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               i 
                               + 
                               j 
                               - 
                               1 
                             
                             ) 
                           
                            
                           
                             ( 
                             
                               n 
                               + 
                               1 
                             
                             ) 
                           
                         
                         - 
                         ij 
                         - 
                         
                           
                             n 
                             2 
                           
                            
                           
                             ( 
                             
                               i 
                               + 
                               j 
                               + 
                               
                                  
                                 
                                   i 
                                   - 
                                   j 
                                 
                                  
                               
                             
                             ) 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       1 
                       n 
                     
                      
                     
                       
                         w 
                         ij 
                       
                       . 
                     
                   
                 
               
             
           
         
       
     
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
             
           
               
                 APPENDIX 2 
               
               
                   
               
             
             
               
                 1 st  program: Corrected two-pass algorithm program 
               
             
          
           
               
                 /*************Corrected two pass algorithm 
                 *************************/ 
               
             
          
           
               
                 /************ author:inventors of this invention ****** date: 2007/12/01 
                 ******/ 
               
             
          
           
               
                 /************ 
                 *********/ 
               
             
          
           
               
                 /******************************************************************************/ 
               
               
                 #include “stdafx.h” 
               
               
                 #using &lt;mscorlib.dll&gt; 
               
               
                 using namespace System; 
               
               
                 using namespace std; 
               
               
                 #include &lt;stdio.h&gt; 
               
               
                 #include &lt;cMath&gt; 
               
               
                 #include &lt;time.h&gt; 
               
               
                 #define n 1000001 
               
               
                 int 
               
               
                 main(void) 
               
               
                    { 
               
               
                   FILE *input_file; 
               
               
                   FILE *output_file; 
               
               
                   time_t start, end;   /*define the variable for the length of computation period */ 
               
               
                   double x,y,t=0.0,ss=0.0,c=0.0,d=0,css=0.0,average=0.0,sum=0.0, var=0.0, std=0.0; /*declare 
               
               
                 variable*/ 
               
               
                   int i ; 
               
               
                   input_file = fopen(“10_7.txt”,“r”); 
               
               
                 /******************************************************************************/ 
               
               
                 /*** read data for the first time, compute mean *******************************/ 
               
               
                 /******************************************************************************/ 
               
               
                    start =time(NULL); 
               
               
                   for (i=1;i&lt;= n;i++) 
               
               
                    { 
               
               
                    fscanf(input_file,“%1f”, &amp;x); 
               
               
                    sum = sum + x;  /*compute the total of all the data*/ 
               
               
                    } 
               
               
                   average =sum/n;  /* compute the mean of all the data*/ 
               
               
                   fclose(input_file); 
               
               
                 /******************************************************************************/ 
               
               
                 /*** read data for the second time, compute CSS and corrected CSS *************/ 
               
               
                 /******************************************************************************/ 
               
               
                   input_file = fopen(“10_7.txt”,“r”); 
               
               
                   for (i=1;i&lt;=n;i++) 
               
               
                    { 
               
               
                     fscanf(input_file,“%1f”,&amp;y); 
               
               
                     c =y−average; 
               
               
                     ss=ss + c*c; 
               
               
                    d = d+c; 
               
               
                    } 
               
               
                   css = ss− d*d/n; 
               
               
                   var = css/(n−1); 
               
               
                   std = sqrt(var); 
               
               
                  end=time(NULL); 
               
               
                   output_file = fopen(“timeout_10_7.txt”,“w”); 
               
               
                   fprintf(output_file ,“%15.14e \n”,css); 
               
               
                   fprintf(output_file ,“time= %.10f second.\n”,difftime(end,start)); 
               
               
                   fclose(input_file); 
               
               
                   system(“PAUSE”); 
               
               
                  } 
               
               
                 2 nd  program: This invention&#39;s recursive and updatable algorithm program 
               
               
                 /******************** This invention&#39;s algorithm program ********************/ 
               
               
                 /******* author: inventors of this invention ****** date: 2007/12/01 **************/ 
               
               
                 /******* The filename of “filename.TXT” in the program is named as StRD dataset **/ 
               
               
                 /******* The “StRD dataset” should be set first when executing different datasets ****/ 
               
               
                 /**********************************************************************/ 
               
               
                 #include “stdafx.h” 
               
               
                 #using &lt;mscorlib.dll&gt; 
               
               
                 using namespace System; 
               
               
                 #include &lt;stdio.h&gt; 
               
               
                 #include &lt;Math.h&gt; 
               
               
                 #include &lt;cmath&gt; 
               
               
                 #include &lt;time.h&gt; 
               
               
                 #define n 1001 
               
               
                 int 
               
               
                 main(void) 
               
               
                  { 
               
               
                    FILE *input_file; 
               
               
                   FILE *output_file; 
               
               
                   double data=0.0, sd = 0.0, ss=0.0, css=0.0, dd=0.0, w=0.0; 
               
               
                    int i ; 
               
               
                    time_t start,end; 
               
               
                    input_file = fopen(“10_7.txt”,“r”); 
               
               
                  output_file = fopen(“timeout_107.txt”,“w”); 
               
               
                   start =time(NULL); 
               
               
                   for (i=1;i&lt;=n; i++) 
               
               
                   { 
               
               
                   fscanf(input_file, “%1f”, &amp;data); 
               
               
                    sd = data−dd ; 
               
               
                    css += (ss=ss+2*w*sd+(i−1)*sd*sd); 
               
               
                    w = w+(i−1)*sd; 
               
               
                    dd = data; 
               
               
                   } 
               
               
                    css=css/n; 
               
               
                    end =time(NULL); 
               
               
                 fprintf(output_file ,“%15.14e \n”,css); 
               
               
                  fprintf(output_file, “time= %.10f second.\n”, difftime(end,start)); 
               
               
                   system(“PAUSE”); 
               
               
                  }