Professional Documents
Culture Documents
HW9
HW9
http://beam.to/statistics
HW Chapter 8
8.6. Data on x1 = sales and x2 = profits for the 10 largest U.S. industrial
corporations were listed in Exercise 1.4 of Chapter 1.
From Example 4.12
⎡62309 ⎤ ⎡1000520000 25576000 ⎤
x=⎢ ⎥ , S=⎢
⎣ 2927 ⎦ ⎣ 25576000 1430000 ⎥⎦
a) Determine the sample principal components and their variances for these
data.
⎡0.9997 ⎤ ⎡ −0.9997 ⎤
λˆ1 = 1.0012 x109 , eˆ1 = ⎢ ⎥ or eˆ1 = ⎢ ⎥
⎣ 0.0256 ⎦ ⎣ −0.0256 ⎦
⎡ −0.0256 ⎤ ⎡ 0.0256 ⎤
λˆ2 = 7.7570x105 , eˆ2 = ⎢ ⎥ or eˆ2 = ⎢ ⎥
⎣ 0.9997 ⎦ ⎣ −0.9997 ⎦
yˆi = eˆi′x = eˆi1 x1 + eˆi 2 x2
yˆ 2 = −0.0256 x1 + 0.9997 x2
Notice here that the variable x1 , with coefficient 0.9997 , receives the greatest
weight in the component ŷ1 . It also has the largest correlation (in absolute value) with
ŷ1 [see Part d]. That x1 contributes more to the determination of ŷ1 than does x2
Their variances:
Notice because of its large variance, x1 completely dominates the first sample
principal component. Moreover, this first sample principal component explains
completely. [see Part b]
⎛ the proportion of ⎞
⎜ ⎟ λˆ1
⎜ the total sample variance ⎟ λˆ + λˆ = 0.9992 or 99.92%
=
⎜ ⎟ 1 2
⎝ explained by yˆ1 ⎠
1
นาย วฐา มินเสน รหัส 48850226
http://beam.to/statistics
c) Sketch the constant density ellipse ( x − x )′S ( x − x ) = 1.4 , and indicate
−1
60,000
50,000
40,000
30,000
ŷ2
20,000
10,000
(62282,3969) (99735,3884) ŷ1
0 (62309,2927)
20,000 40,000 60,000 80,000 100,000 120,000
Sales (x1)
รูปที่ 1 Sketch the constant density ellipse ( x − x )′S −1 ( x − x ) = 1.4
กําหนดใหแกนนอน และแกนตั้งมีชวงหางที่เทากัน
9,000
8,000
7,000
6,000 ŷ2
5,000
(62282,3969) (99735,3884) ŷ1
4,000
3,000
(62309,2927)
2,000
1,000
0
20,000 40,000 60,000 80,000 100,000 120,000
Sales (x1)
รูปที่ 2 Sketch the constant density ellipse ( x − x )′S −1 ( x − x ) = 1.4
กําหนดใหแกนนอน และแกนตั้งมีชวงหางไมเทากัน
2
นาย วฐา มินเสน รหัส 48850226
http://beam.to/statistics
Note1: รูปที่ 2 เนื่องจาก แกนนอนและแกนตั้งมี Scale ตางกันจึงทําใหแกนของวงรี(Sample principal
components ŷ1 and ŷ2 ) วาดไมเปนเสนตั้งฉากกัน ซึ่งถากําหนดใหแกนนอน และแกนตั้งมีชวงหางที่เทากันจะทํา
ใหพิจารณารูปรางวงรีไดยากดังรูปที่ 1 ดังนั้นการวาดรูปวงรีที่ขจัด Scale ของแกนตั้งและแกนนอนออกไปใหเปนแกน
ที่ไรหนวยนั้นจะทําให แกนของวงรี(Sample principal components ŷ1 and ŷ2 ) วาดเปนเสนตั้งฉากกัน และ
พิจารณารูปไดงายกวา สามารถจัดทําไดโดยการ Standardizing the sample principal components ดังรูปที่
3 [see 8.7]
⎡ −0.0256 ⎤ ⎡ −26.7 ⎤
ŷ2 หาจาก λˆi ที่มีคาถัดมา 7.7570 x105 1.4 ⎢ ⎥=⎢ ⎥
⎣ 0.9997 ⎦ ⎣1041.8⎦
3
นาย วฐา มินเสน รหัส 48850226
http://beam.to/statistics
d) Compute the correlation coefficients ryˆ1 , xk , k = 1, 2. What interpretation, if
any, can you give to the first principal component?
⎡0.9997 ⎤ ⎡ −0.0256 ⎤
เมื่อ eigenvectors คือ eˆ1 = ⎢ ⎥ , eˆ2 = ⎢ ⎥
⎣ 0.0256 ⎦ ⎣ 0.9997 ⎦
eˆ λˆ 0.9997 1.0012 x109
ryˆ1 , x1 = 11 1 = =1
s11 1000520000
Interpretation
The variable x1 , with coefficient 0.9997 [see part a], receives the greatest weight in
the component ŷ1 . It also has the largest correlation (in absolute value) with ŷ1 ,
( ryˆ1 , x1 = 1 ). The correlation of x1 with ŷ1 = 1 is the largest of correlation with ŷ1 . That
x1 contributes more to the determination of ŷ1 than does x2 . However, that x2 has
coefficient 0.0256 and the correlation = 0.6767 with ŷ1 , in this case, both variables aid
in the interpretation of ŷ1 .
Note: อยางไรก็ตามถึงแมวา x2 จะสามารถอธิบาย ŷ1 ได เพราะมีคาสัมประสิทธิ์ 0.0256 ในสมการของ ŷ1
แตคานี้เมื่อเทียบกับ x1 = 0.9997 แลวมีคานอยมากๆ จนอาจจะกลาวไดวา ŷ1 นั้นถูกอธิบายไดจากตัว x1 อยาง
มาก โดยจะอธิบายอีกครั้งในขอ 8.7
4
นาย วฐา มินเสน รหัส 48850226
http://beam.to/statistics
8.7. Convert the covariance matrix S in Exercise 8.6 to a sample
correlation
2.0 Profits (z2)
ŷ1
(1.0832,1.0832)
ŷ2 1.0
(-0.4761,0.4761)
0.0
-2.0 -1.0 0.0 (0,0) 1.0 2.0 3.0 4.0 5.0
Sales (z1)
-1.0
-2.0
-3.0
matrix R .
⎡ 1 0.6762 ⎤
(V ) S (V )
1/ 2 −1 1/ 2 −1
=R=⎢
1 ⎥⎦
⎣ 0.6762
⎡0.7071⎤ ⎡ −0.7071⎤
λˆ1 = 1.6762 , eˆ1 = ⎢ ⎥ or eˆ1 = ⎢ ⎥
⎣0.7071⎦ ⎣ −0.7071⎦
⎡ −0.7071⎤ ⎡ 0.7071 ⎤
λˆ2 = 0.3238 , eˆ2 = ⎢ ⎥ or eˆ2 = ⎢ ⎥
⎣ 0.7071 ⎦ ⎣ −0.7071⎦
yˆi = eˆi′z = eˆi1 z1 + eˆi 2 z2
yˆ 2 = −0.7071z1 + 0.7071z2
5
นาย วฐา มินเสน รหัส 48850226
http://beam.to/statistics
Their variances:
⎛ the proportion of ⎞
⎜ ⎟ λˆ1 λˆ1 λˆ1
⎜ the total sample variance ⎟ p tr ( R) λˆ + λˆ = 0.8381
= = = or 83.81%
⎜ ⎟ 1 2
⎝ explained by yˆ1 ⎠
⎡0.7071⎤ ⎡ −0.7071⎤
เมื่อ eigenvectors คือ eˆ1 = ⎢ ⎥ , eˆ2 = ⎢ ⎥
⎣0.7071⎦ ⎣ 0.7071 ⎦
Interpretation
The variable z1 and z2 , with same coefficient 0.7071 , receive great weight in the
component ŷ1 . They also have large correlation (in absolute value) with ŷ1 ,
( ryˆ1 , x1 = 0.9155 , ryˆ1 , x2 = 0.9155 ). The correlation of z1 is as large as that for z2 ,
indicating that the variables are about equally important to the first sample principal
component. Further, in this case, both coefficients are reasonably large and they have
same sign, we would argue that both variables aid in the interpretation of ŷ1 .
6
นาย วฐา มินเสน รหัส 48850226
http://beam.to/statistics
d) Compare the components obtained in Part a with those obtained in
Exercise 8.6(a). Given the original data displayed in Exercise 1.4, do you
feel that it is better to determine principal components from the sample
covariance matrix or sample correlation matrix? Explain.
การหา The sample principal components จาก S ดังในขอ 8.6 ถึงแมวา x2 จะสามารถอธิบาย ŷ1
ได เพราะมีคาสัมประสิทธิ์ 0.0256 ในสมการของ ŷ1 แตคานี้เมื่อเทียบกับ x1 = 0.9997 แลวมีคานอยมากๆ จน
อาจจะกลาวไดวา ŷ1 นั้นถูกอธิบายไดจากตัว x1 อยางมากแตเพียงตัวแปรเดียว แตในการหา The sample
principal components จาก R ดังในขอ 8.7 นั้นแตกตางกันเพราะทั้งตัวแปร z1 และ z2 สามารถอธิบายตัว
แปร ŷ1 ไดดีเทาเทียมกัน ไมสามารถตัดตัวแปรใดทิ้งไปได(พิจารณาจาก correlation coefficients ทั้งคู
เทากับ 0.9155) ซึ่งการตัดสินใจเลือกใชแบบใดนั้นขึ้นอยูกับเหตุผลดังนี้ (ประกอบการใหเ หตุผ ลจาก
Richard A. Johnson and Dean W. Wichern, Applied multivariate statistics analysis,
fifth edition, page 435.)
“Variables should probably be standardized if they are measured on scales with
widely differing ranges or if the units of measurement are not commensurate. For
example, if x1 represents annual sales in the the $10,000 to $350,000 range and x2 is
the ratio (net annual income)/(total assets) that falls in the .01 to .60 range, then the
total variation will be due almost exclusively to dollar sales. In this case, we would
expect a single (important) principal component with a heavy weighting of x1 .
Alternatively, if both variables are standardized, their subsequent magnitudes will be
of the same order, and x2 (or z2 ) will play a larger role in the construction of the
principal components.”
ดังนั้นเมื่อพิจารณาขอมูล Exercise 1.4 พบวา ตัวแปรทั้ง 2 มีชวงของขอมูลแตกตางกันอยางมาก การ
พิจารณาหาคาดวย The sample principal components จาก Sample correlation matrix จึงมี
ความเหมาะสมกวา ดังนั้นอธิบาย The first sample principal component of ŷ1
ดวย yˆ1 = 0.7071z1 + 0.7071z2 โดยจะพบวาคาของชวงขอมูลที่มากกวาในตัวแปร x1 ที่มีคาความ
แปรปรวนมาก จะถูกนํามาลดคาสัมประสิทธิ์ของ The sample principal components มากกวาตัวแปร
x2 เมื่อแปลง z ⇒ x ดังนี้