PowerPoint プレゼンテーション

A rotation matrix , which is useful to
interpret the restriction of marginal
counts of multi-way tables
Satoshi Kajimoto , Ryo Yamada
Unit of statistical genetics, Center for Genomic
Medicine ,Graduate School of Medicine, Kyoto University ,
Kyoto, Japan
Objective
We introduce how to make the matrix X,
that gives coordinates of df-dimensional
space to multi-way tables.
The chart of this presentation
• Step1 Introduction
• Step2 How to make the matrix X
– Simplex
– Simplex matrix
– Kronecker product
• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X
• Step4 Applications of the matrix X
The chart of this presentation
• Step1 Introduction
• Step2 How to make the matrix X
– Simplex
– Simplex matrix
– Kronecker product
• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X
• Step4 Applications of the matrix X
10
17
13
11
14
12
dimension
(k=) 2
(k=) 3
shape
2×3
2×3×4
shape vector
2
𝒓=
3
2
𝒓= 3
4
The number
of the cells
R= 6
R= 24
multi-way table
(k-dimensional table)
𝒓=
𝑟1
𝑟2
⋮
𝑟𝑘
R=
𝑘
𝑖=1
𝑟𝑖
10
17
13
11
14
12
2×3 table
one-to-one
The matrix X
shape vector
(square matrix)
1
6
1
2
𝒓=
3
6
1
3
1
3
1
−
6
1
1
−
6
3
1
3
0
0
0
0
−
−
1
1
1
6
1
6
1
6
1
6
1
6
1
6
1
2 3
1
2 3
1
2
1
2
−
−
2 3
1
2 3
1
2
1
−
2
−
−
2 3
1
1
−
−
1
6
1
6
1
2 3
2 3 2 3
1
1
−
−
2
2
1
1
−
2
2
The chart of this presentation
• Step1 Introduction
• Step2 How to make the matrix X
– Simplex
– Simplex matrix
– Kronecker product
• These three terms are needed to make the matrix X.
• Step3 The property of the matrix X
• Step4 Applications of the matrix X
Now, We will explain 3 terms ,
which need to make the matrix X
• Simplex
• Simplex matrix
• Kronecker product
Simplex
A simplex is a generalization of the notion of
a regular triangle or regular tetrahedron to
arbitrary dimension.
1-simplex
2-simplex
3-simplex
n-simplex
1-simplex
2-simplex
x
3-simplex
A 2-simplex is a regular triangle.
A 3-simplex is a regular tetrahedron.
(1,0,0)
z
(0,0,1)
(0,1,0)
y
An (n-1)-simplex can be put in ndimensional orthogonal coordinate
system.
2-simplex in 3 dimensional orthogonal coordinate system
Simplex matrix
An n-simplex matrix is a matrix whose column
vectors are the coordinates of vertices of the (n1)- simplex.
𝑣1 𝑣2 𝑣3 𝑣4 : coordinates of vertices
of 3-simplex
𝑣1
𝑣4
𝑣2
𝑣3
4-simplex matrix = 𝑣1
𝑣2
𝑣3
𝑣4
x
x
1
3
,0
𝑥=
(1,0,0)
1
3
z
(0,0,1)
1
3
(0,1,0)
y
1
y
Parallel to yz-plane
rotation
We can rotate an (n-1) simplex which is put in
n-dimensional orthogonal coordinate system
1
to plane whose x-axis is 𝑛.
3-simplex matrix
Our way to make n-simplex matrix
An n-simplex matrix is the n×n matrix and defined as below.
𝑗=1
𝑎𝑗𝑘 =
1
𝑛
𝑗>1
𝑎𝑗𝑘 = 0
𝑎𝑗𝑘 =
𝑎𝑗𝑘 = −
(𝑤ℎ𝑒𝑛 𝑘 ≦ 𝑗 − 2)
𝑛−𝑗+1
𝑛−𝑗+2
(𝑤ℎ𝑒𝑛 𝑘 = 𝑗 − 1)
1
𝑛−𝑗+1 𝑛−𝑗+2
(𝑤ℎ𝑒𝑛 𝑘 ≧ 𝑗)
Examples of n-simplex matrix
1
2
1
2
1
1
−
2
1
2
3
2
3
0
1
−
1
3
1
1
6
2
−
−
3
1
1
1
2
2
3
1
−
2
2 3
6
1
0
2
0
2
3
0
−
1
2
1
−
1
2
1
2 3
2 3
1
1
−
−
6
6
1
1
−
2
2
Kronecker product
𝐴=
𝑎11
𝑎21
⋮
𝑎𝑝1
𝑎12
𝑎22
⋮
𝑎𝑝2
⋯ 𝑎1𝑝
⋯ 𝑎2𝑝
⋱
⋮
⋯ 𝑎𝑝𝑝
𝐵=
𝑏12
𝑏22
⋮
𝑏𝑞2
⋯ 𝑏1𝑞
⋯ 𝑏2𝑞
⋱
⋮
⋯ 𝑏𝑞𝑞
𝑞 × 𝑞 𝑚𝑎𝑡𝑟𝑖𝑥
𝑝 × 𝑝 𝑚𝑎𝑡𝑟𝑖𝑥
𝐴⊗𝐵 =
𝑏11
𝑏21
⋮
𝑏𝑞1
𝑎11 𝐵 𝑎12 𝐵 ⋯ 𝑎1𝑝 𝐵
𝑎21 𝐵 𝑎22 𝐵 ⋯ 𝑎2𝑝 𝐵
⋮ ⋮
⋱
⋮
𝑎𝑝1 𝐵 𝑎𝑝2 𝐵 ⋯ 𝑎𝑝𝑝 𝐵
𝑝𝑞 × 𝑝𝑞 𝑚𝑎𝑡𝑟𝑖𝑥
How to make the matrix X
𝒓=
𝑟1
𝑟2
⋮
𝑟𝑘
𝑋𝑙 ≝ 𝑟𝑙 -𝑠𝑖𝑚𝑝𝑙𝑒𝑥 𝑚𝑎𝑡𝑟𝑖𝑥
𝑋 = 𝑋𝑘 ⊗𝑋𝑘−1 ⊗ ⋯ ⋯ ⊗𝑋1
(⊗ is the Kronecker product)
X is 𝑅 =
𝑟𝑙 × 𝑅 matrix
1
For example
1
𝒓=
2
3
2
1
𝑋1 =
𝑅 =2×3
=6
−
2
2
1
2
6
1
6
1
3
1
3
1
−
6
1
1
−
6
3
1
3
0
0
0
0
−
−
3
2
𝑋2 =
−
3
1
6
1
6
1
6
1
6
1
6
1
2 3
1
2
1
2
6
3
1
−
6
1
2
(the 3-simplex matrix)
1
2 3
1
−
2
1
6
1
1
3
1
1
0
(the 2-simplex matrix)
1
𝑋 = 𝑋2 ⊗𝑋1 =
1
1
−
−
2 3
1
2 3
1
2
1
−
2
−
−
2 3
1
1
−
−
1
6
1
6
1
2 3
2 3 2 3
1
1
−
−
2
2
1
1
−
2
2
R
The chart of this presentation
• Step1 Introduction
• Step2 How to make the matrix X
– Simplex
– Simplex matrix
– Kronecker product
• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X
• Step4 Applications of the matrix X
1. X is an R×R rotation matrix.
We vectorize multi-way tables into vectors in
R-dimensional space, and rotate them.
z
23
24
24
22
21
20
19
22
17
18
20 16
18 14
17
18
12 8
9
10 10 4 6
2
1
2
vectorize
𝑡
y
2×4×3 table
The contents of the table
x
23
24
21
22
19
20
17
18
15
16
13
14
11
12
9
10
7
8
5
6
3
4
1
2
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)
What does the rotation by X do ?
• When two table vectors a and b share marginal
counts,
• only df elements of rotated vectors a’ and b’
differ.
A
vectorize
• a’=Xa, b’ = Xb
• 𝒂′ − 𝒃′ =
𝒂
B
B
vectorize
𝒃
The relationship between the matrix X
and marginal counts of tables
vector 𝒂
vectorized
table A
3
7
11
9
26
44
40
10
20
70
100
11
12
17
53
35
23
70
110
7
10
17
table B
vectorized
60
75
40.82
3
−8.16
7
𝑋 11 = −72.17
9
11.55
26
−25.00
44
10.00
7
44.91
10
−16.33
𝑋 11 = −70.73
12
30.31
17
−23.50
53
17.50
vector 𝒃
vector 𝒂
vectorized
table A
3
7
11
9
26
44
40
10
20
70
100
11
12
17
43
35
23
60
100
7
10
17
table B
vectorized
60
65
40.82
3
−8.16
7
𝑋 11 = −72.17
9
11.55
26
−25.00
44
10.00
40.82
7
−12.25
10
𝑋 11 = −62.07
12
21.65
17
−18.50
43
12.50
vector 𝒃
vector 𝒂
vectorized
table A
3
7
11
9
26
44
40
10
20
70
100
11
12
22
38
40
23
60
100
7
10
17
table B
vectorized
60
60
40.82
3
−8.16
7
𝑋 11 = −72.17
9
11.55
26
−25.00
44
10.00
7
40.82
10
−8.16
𝑋 11 = −62.07
12
12.99
22
−18.50
38
7.50
vector 𝒃
vector 𝒂
vectorized
table A
3
7
11
9
26
44
40
10
20
70
100
7
3
11
9
17
53
35
10
20
70
100
table B
vectorized
60
65
40.82
3
−8.16
7
𝑋 11 = −72.17
9
11.55
26
−25.00
44
10.00
40.82
7
−12.25
3
𝑋 11 = −72.17
9
31.75
17
−25.00
53
19.00
vector 𝒃
3
7
11
9
26
44
40
10
20
70
100
7
3
11
9
22
48
40
10
20
70
100
60
60
40.82
3
−8.16
7
𝑋 11 = −72.17
9
11.55
26
−25.00
44
10.00
7
40.82
3
−8.16
𝑋 11 = −72.17
9
23.09
22
−25.00
48
14.00
The degrees of freedom of this table is 2.
So, 2 elements of these two vectors are different, and 4
elements are equal.
Now, by using X,
Tables are placed in df-dimensional space.
The chart of this presentation
• Step1 Introduction
• Step2 How to make the matrix X
– Simplex
– Simplex matrix
– Kronecker product
• These three terms are needed to make the matrix X.
• Step3 The properties of the matrix X
• Step4 Applications of the matrix X
Variations of df patterns in multi-way
table
“Lectures on Algebraic Statistics”
express a restriction of marginal
counts in simplicial complex.
The matrix X is useful to grasp such
a complex restriction.
Simplicial complex
Lectures on Algebraic Statics
ISBN-13: 978-3764389048
df = 2
Counter line of statistics
Association test with df=2
χ2 → p values
Ryo Yamada, Yukinori Okada, 2009, An
Optimal Dose-effect Mode Trend Test
for SNP Genotype Tables, Genetic
Epidemiology vol.33, p.114~127
χ2
p values
But, by reducing the degrees of a vector
and showing a diagram,
We can calculate p values computaionally.
Thank you for listening.