Coskewness and Cokurtosis John W. Fowler July 9, 2005

Similar documents
ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

Jim Lambers MAT 610 Summer Session Lecture 2 Notes

CHAPTER 6. Direct Methods for Solving Linear Systems

1 Determinants. 1.1 Determinant

Elementary Row Operations on Matrices

Phys 201. Matrices and Determinants

A Review of Matrix Analysis

Matrices. Chapter Definitions and Notations

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

A Piggybacking Design Framework for Read-and Download-efficient Distributed Storage Codes

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

4.2 Floating-Point Numbers

CLASS 12 ALGEBRA OF MATRICES

A matrix over a field F is a rectangular array of elements from F. The symbol

Solving Dense Linear Systems I

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

Reconstruction from projections using Grassmann tensors

1 Matrices and Systems of Linear Equations. a 1n a 2n

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

Chapter Two Elements of Linear Algebra

NUMERICAL MATHEMATICS & COMPUTING 7th Edition

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

MATH 320, WEEK 7: Matrices, Matrix Operations

Elementary Linear Algebra

Linear System of Equations

1.5 Gaussian Elimination With Partial Pivoting.

ELEMENTARY LINEAR ALGEBRA

ECE133A Applied Numerical Computing Additional Lecture Notes

Chapter 4. Matrices and Matrix Rings

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch

1 Introduction. 2 Determining what the J i blocks look like. December 6, 2006

MATH 521, WEEK 2: Rational and Real Numbers, Ordered Sets, Countable Sets

Optimizing the Dimensional Method for Performing Multidimensional, Multiprocessor, Out-of-Core FFTs

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

Direct Methods for Solving Linear Systems. Matrix Factorization

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Linear Algebra: Lecture notes from Kolman and Hill 9th edition.

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

x y B =. v u Note that the determinant of B is xu + yv = 1. Thus B is invertible, with inverse u y v x On the other hand, d BA = va + ub 2

DETERMINANTS, COFACTORS, AND INVERSES

Inverses and Elementary Matrices

B553 Lecture 5: Matrix Algebra Review

The Gauss-Jordan Elimination Algorithm

Math 123, Week 2: Matrix Operations, Inverses

MODEL ANSWERS TO THE THIRD HOMEWORK

LINEAR SYSTEMS (11) Intensive Computation

Fundamentals of Engineering Analysis (650163)

Polynomial functions over nite commutative rings

Algorithmic Approach to Counting of Certain Types m-ary Partitions

Tensor Decompositions for Machine Learning. G. Roeder 1. UBC Machine Learning Reading Group, June University of British Columbia

Matrices. Chapter What is a Matrix? We review the basic matrix operations. An array of numbers a a 1n A = a m1...

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)

2.1 Gaussian Elimination

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

Introduction to Groups

Matrices and Vectors

HOMEWORK 9 solutions

MULTIPLIERS OF THE TERMS IN THE LOWER CENTRAL SERIES OF THE LIE ALGEBRA OF STRICTLY UPPER TRIANGULAR MATRICES. Louis A. Levy

MTH 2032 Semester II

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Math 4242 Fall 2016 (Darij Grinberg): homework set 8 due: Wed, 14 Dec b a. Here is the algorithm for diagonalizing a matrix we did in class:


MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

= W z1 + W z2 and W z1 z 2

Discrete Applied Mathematics

Introduction Eigen Values and Eigen Vectors An Application Matrix Calculus Optimal Portfolio. Portfolios. Christopher Ting.

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Linear Algebra V = T = ( 4 3 ).

MATH 2030: MATRICES ,, a m1 a m2 a mn If the columns of A are the vectors a 1, a 2,...,a n ; A is represented as A 1. .

7.2 Linear equation systems. 7.3 Linear least square fit

Midterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015

1 GSW Sets of Systems

GROUP THEORY PRIMER. New terms: tensor, rank k tensor, Young tableau, Young diagram, hook, hook length, factors over hooks rule

O Notation (Big Oh) We want to give an upper bound on the amount of time it takes to solve a problem.

arxiv: v1 [math.ra] 15 Dec 2015

Gaussian Elimination for Linear Systems

Extra Problems for Math 2050 Linear Algebra I

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

arxiv: v1 [cs.sc] 17 Apr 2013

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

Chapter Contents. A 1.6 Further Results on Systems of Equations and Invertibility 1.7 Diagonal, Triangular, and Symmetric Matrices

CS475: Linear Equations Gaussian Elimination LU Decomposition Wim Bohm Colorado State University

Eigenvalues by row operations

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

1 Matrices and Systems of Linear Equations

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27

Review of Vectors and Matrices

Lecture 2. Fundamentals of the Analysis of Algorithm Efficiency

Operations On Networks Of Discrete And Generalized Conductors

V C V L T I 0 C V B 1 V T 0 I. l nk

Lecture Notes in Linear Algebra

(VI.C) Rational Canonical Form

Transcription:

Coskewness and Cokurtosis John W. Fowler July 9, 2005 The concept of a covariance matrix can be extended to higher moments; of particular interest are the third and fourth moments. A very common application of covariance matrices is the error covariance matrix, which is defined as the matrix of expectation values for pairs of zero-mean random variables representing errors. A minimum of two random variables is required in order for nontrivial covariance to be manifested; any number of random variables greater than one can be accommodated in principle. For concreteness and brevity, we will consider five random variables denoted! i, i 1 to 5. The covariance matrix is comprised of the expectation values of all possible pairs of these random variables:! Ω " ε $ 1ε1 ε1ε2 ε1ε3 ε1ε4 ε1ε5 ε2ε1 ε2ε2 ε2ε3 ε2ε4 ε2ε5 ε ε ε ε ε ε ε ε ε ε 3 1 3 2 3 3 3 4 3 5 ε ε ε ε ε ε ε ε ε ε 4 1 4 2 4 3 4 4 4 5 ε ε ε ε ε ε ε ε ε ε % 5 1 5 2 5 3 5 4 5 5 An arbitrary element of the matrix is denoted " ij. Because multiplication is commutative, the matrix is symmetric, i.e., " ij " ji. The number of independent elements is N(N+1)/2, where N is the number of elements in a row or column, in this case 5. The diagonal elements are the variances of the random variables, commonly denoted 2 i " ii. The skewness of a random variable is defined as S <! 3 >/ 3, and the kurtosis is K <! 4 >/ 4. Sometimes 3 is subtracted from the kurtosis; when this is done, it is better to refer to the excess kurtosis; the relevance of 3 is that it is the value of the kurtosis for any Gaussian random variable (i.e., the excess kurtosis of a Gaussian random variable is zero). From here on we will ignore the normalization by powers of and concentrate on the higher moments. The generalization of skewness and kurtosis to coskewness and cokurtosis will involve the expectation values <! i! j! k > and <! i! j! k! m >, respectively, where we will use the subscript m rather than l to avoid confusion with the literal number 1. Note that the presence of up to four indices does not imply that more than two random variables are involved; each index runs from 1 to N, and N need only be at least 2 for the concepts of coskewness and cokurtosis to be nontrivial. Thus there are two coskewnesses for any two random variables, e.g., <! 1! 1! 2 > and <! 1! 2! 2 >, and one for any three random variables, e.g., <! 1! 2! 3 >. Similar remarks apply for the cokurtosis except that more distinct combinations occur. While the covariance matrix is a covariant tensor of rank 2, extending the matrix concept to these higher moments will require tensors of rank 3 and 4 for coskewness and cokurtosis, respectively. We will define the elements as S ijk <! i! j! k > and K ijkm <! i! j! k! m >. These are also strictly

symmetric tensors. With N elements per row/column, the number of independent elements in a strictly symmetric tensor of rank M is L ( M + N 1)! M!( N 1)! This is just the number of ways to take N things M at a time with repetition. For M 2, this reduces to the common expression for an N N matrix L ( 2 + N 1)! 2!( N 1)! ( N + 1)! 2( N 1)! ( N + 1) N ( N 1)! 2( N 1)! N ( N + 1) 2 For M 3, L ( 3 + N 1)! 3!( N 1)! N ( N + 1) ( N + 2) 6 ( N + 2)! 6( N 1)! ( N + 2) ( N + 1) N ( N 1)! 6( N 1)! And for M 4, L ( 4 + N 1)! 4!( N 1)! ( N + 3)! 24( N 1)! N ( N + 1) ( N + 2) ( N + 3) 24 ( N + 3) ( N + 2) ( N + 1) N ( N 1)! 24( N 1)! For example, in the case M 3, N 5, the 35 independent elements are those with indices 1: 111 2: 112 3: 113 4: 114 5: 115 6: 122 7: 123 8: 124 9: 125 10: 133 11: 134 12: 135 13: 144 14: 145 15: 155 16: 222 17: 223 18: 224 19: 225 20: 233 21: 234 22: 235 23: 244 24: 245 25: 255 26: 333 27: 334 28: 335 29: 344 30: 345 31: 355 32: 444 33: 445 34: 455 35: 555

All other elements have indices which are permutations of those shown, and any such element is equal to the element with corresponding permuted indices above. In general, any indices can be permuted into an ascending or descending sequence, located in a list such as that above, and thereby mapped into a linear sequence usable for efficient storage in computer memory. The position in the linear sequence will be indicated by the index p. Numerical applications involve mapping in both directions between p and the set of indices of an element in the symmetric matrix. For M 2, these mappings are simple, as shown in Appendix A. The remainder of this paper will be concerned with developing mappings for M > 2 based on table lookup. For a tensor of rank M, each element has M indices I n, n 1 to M (we will consider only covariant indices, since this keeps the covariance-matrix analogy intact, and there is no need herein to distinguish between covariant and contravariant indices). For example, for p 22 (i.e., item 22) in the list above, we have I 1 2, I 2 3, I 3 5. There are L such index sets, i.e., p runs from 1 to L. We will use the doubly subscripted I np to denote the n th index value in the p th index set, i.e., in the p th position in the sorted list, where the list will be generated in a manner that produces the sort order we want in both in dimensions. For a given p, a number Q p in base N can be defined such that each index defines a digit of Q p with I 1p -1 being the least significant digit, I 2p -1 is the next least significant, and so on up to the most significant digit I Mp -1 (we subtract 1 because zero never occurs as an index value, so for the number base to be N rather than N +1, we must subtract 1 as indicated): M Qp ' ( Inp 1) N n 1 Q p is useful as a monotonically increasing function of p for table lookup purposes. Some such number is needed, and Q p is less likely to present integer overflow problems in typical applications than, for example, a decimal number simply constructed with digits equal to the indices themselves. For example, the case M 3, N 1000 has maximum values of p 167,167,000, Q p 999,999,999; a number constructed from the indices would have a maximum value of 100,010,001,000, which overflows a four-byte IEEE integer variable, whereas the maximum Q p value does not. The following algorithm will generate the list such that Q p increases with p and I np decreases with n. Thus if we read n as increasing from right to left in the example, the algorithm will generate the list as shown. The example of p 22 above then becomes I 1 5, I 2 3, I 3 2. The general algorithm will use a set of symbolic tokens T i, i 1 to N, where the tokens may be general objects (e.g., cat, dog, goldfish, etc.). Here, T i i. For the example above, this yields the set of tokens {1, 2, 3, 4, 5}. The algorithm then consists of generating the list of sets corresponding to N things taken M at a time with repetition; this will result in L sets, each consisting of M tokens, generated in order of increasing Q p. The algorithm uses a procedure which we will call RollOver, because the index sets are generated in a manner similar to an odometer increasing from 111...1 to NNN...N except that when a digit rolls over, it does not roll over to 1 but rather to the digit to its left. The procedure is as follows, where R is an array of M elements which serve as pointers into the array of tokens (in our case, each token is just equal to its pointer, so we have no specific need for the token array, but it is useful for more general cases). n 1

Procedure RollOver(R,M,N) i 0 repeat i! i + 1 if R(i) < N then begin R(i)! R(i) + 1 for j 1 to i-1 do R(j) R(i) exit end until i M end procedure It is assumed that if i 1, the loop from j 1 to i-1 does not execute. The program that uses this procedure is as follows, where the I array corresponds to I np above. for k 2 to M do R(k) 1 R(1) 0 P 0 repeat RollOver(R,M,N) rsum 0 for k 1 to M do rsum! rsum + R(k) P! P + 1 for k 1 to M do I(k,P) R(k) until rsum M*N The repeat loop ends when the sum of the indices in R is equal to M N, i.e., when all the index values in the set are N. At this point the L index sets have been generated. For any one set contained in R, Q p can be computed by the following function. Function Qp(R,M,N) Itmp 0 N2k 1 for k 1 to M do begin Itmp! Itmp + (R(k)-1)*N2k N2k! N2k*N end Qp Itmp end function Note that Q p increments with occasional jumps because when the odometer rolls over, the digit rolling over does not start again at 1. An example with N 3, M 5 is shown below, where Q p is shown as a decimal (not base 3) number.

P R Q p 1 11111 0 2 11112 1 3 11113 2 4 11122 4 5 11123 5 6 11133 8 7 11222 13 8 11223 14 9 11233 17 10 11333 26 P R Q p 11 12222 40 12 12223 41 13 12233 44 14 12333 53 15 13333 80 16 22222 121 17 22223 122 18 22233 125 19 22333 134 20 23333 161 21 33333 242 The mapping from p to the index set is straightforward; for example, if one wishes to know the indices for p 10, one simply looks in the 10 th location in the table and reads them out. The inverse mapping requires a table search; we assume that binary search is as good a method as any. The first step is to sort the indices in an ascending sequence. Given an index set I, for example, (3,1,2,3,2), this is sorted into (1,2,2,3,3). Then Q p is computed; the algorithm results in Q p 44. A binary search of the table will then find this value at p 13. The value stored in the one-dimensional array at location 13 is then the desired element in the symmetric rank-5 tensor. In principle, since Q p is a monotonic function of p, an invertible functional form Q p (p) could be fit to sufficient accuracy for the inverse to be used directly instead of resorting to table lookup. This is the case for M 2, as discussed in the appendix. It is not clear that this would be computationally more efficient, however, given the complications involved in inverting polynomials of order higher than 2 and the fact that in most applications N is not a gigantic number. The example mentioned above of M 3, N 1000, a coskewness tensor with 1000 variables, involves 167,167,000 independent elements; once the table is generated, any element could be found by a binary search in at most 28 steps with relatively simple code.

Appendix: Index Mapping for Symmetric 2-Dimensional Matrices The case of 2-dimensional matrices is the most frequently encountered in most applications involving symmetric tensors (e.g., error covariance matrices). For this case, table lookup is not required. The forward mapping, which has the nice feature of not depending on the size of the matrix, was first pointed out to the author by E. L. Kopan (1974, private communication); the inverse mapping simply employs the quadratic formula. Given the index pair (i,j), swap values if necessary to force j!i. The one-dimensional index p is then given by p j(j-1)/2 + i. One may notice the presence of the formula for the number of elements in an upper triangular matrix of size j in this expression, which is no coincidence. The inverse mapping is based on the idea that for a given value of p, j is the largest number that yields a j(j-1)/2 less than p. So we can set i temporarily to 1 and solve the expression above for j. We have p j(j-1)/2 + 1. Since p is known, the value of j can be obtained via the quadratic formula, ignoring the solution with the negative square root because it yields negative results for j. The resulting algorithm is (* j ) +* i p 8 p 7 + 1, * - 2.* ( 1) j j 2 truncated