HW 01
HW 01
Extra
Let X1 , X 2 ,..., X n be a random sample from a normal population
with mean and covariance . Show their mle.
sol:
Assume that the p 1 vector X1 , X 2 ,..., X n are iid and each has N p ( , ).
n
Joint density 1 ( x j )' 1 ( x j ) / 2
1/ 2
e
of X1 , X 2 ,..., X n j 1 (2 )
p/2
n
1 ( x j )' 1 ( x j ) / 2
n/2
e j 1
(2 ) np / 2
n
1 tr 1
( x j )( x j )' 2
n/2
e j 1
(2 ) np / 2
n
1 tr 1
( x j x )( x j x )' n ( x ) 1 ( x )' 2
n/2
e j 1
(2 ) np / 2
And consider the Result 4.10.
Given a p p symmetric positive definite matrix B and a scalar b 0, it follow that
1 1 1
b
e tr( B) / 2
b
(2b)bp e bp
B
for all postive define p p , with equality hold only for = (1/2b)B.
n
1 tr 1
( x j x )( x j x )' n ( x ) 1 ( x )' 2
L( , ) n/2
e j 1
(2 ) np / 2
Since -1 is positive definite, so ( x ) 1 (x ) ' 0 for all (x ) 0.
Thus take ˆ = x to maximize L( , ).
n
1 tr 1
( x j x )( x j x )' 2
To maximeize L( ˆ , ) n/2
e j 1
over ,
(2 ) np / 2
n
just by Result 4.10 with b n / 2 and B ( x j x )( x j x) ',
j 1
n
1
the maximun occurs at ˆ
n
(x
j 1
j x)( x j x ) '.
081002 多變量分析 Homework 01
4.9.
Let X 1 be N (0,1) and let
X 1 if - c X 1 c
X2
X 1 elsewhere
Show that c can be chosen so that Cov(X1 , X 2 ) 0, but that the two random
variables are not independent.
Sol:
Clearly X2 dependence on X1.
Since X 1 be N (0,1) which is a synnetric distribution, then E ( X 1 ) 0, E ( X 2 ) 0.
Thus we have Cov( X 1 , X 2 ) E ( X 1 X 2 ).
Cov( X 1 , X 2 ) E ( X 12 ) 1 as c 0.
Cov( X 1 , X 2 ) E ( X 12 ) 1 as c .
4.16
Let X1 , X 2 , X3 and X 4 be independent N p ( , ) random vector.
(a) Find the marginal distributions for each of the random vectors
1 1 1 1
V1 X1 X 2 X3 X 4
4 4 4 4
1 1 1 1
V2 X1 X 2 X3 X 4
4 4 4 4
(b) Find the joint density of the random vectors V1 and V2 .
081002 多變量分析 Homework 01
Sol:
By Result 4.8,
(a)
1 1 1 1 1
V1 X1 X 2 X3 X4 is distributed as N p (0, )
4 4 4 4 4
1 1 1 1 1
V2 X1 X 2 X3 X 4 is distributed as N p (0, )
4 4 4 4 4
(b)
1
4
1
1 1 1 1 4
, , , 1 0
4 4 4 4
4
1
4
1
0 4 0
f ( V1 , V2 ) ~ N ,
0 0 1
4
4.24
Exercise 1.4 contains data for world’s 10 largest companies as of April 2005.
(a) From Q-Q plot profits ( x2 ) might form normal distribution but sales ( x1 ) may
not be.
081002 多變量分析 Homework 01
25
250
20
200
Sample Quantiles
Sample Quantiles
150
15
100
10
-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5
(b)
For x1 , rQ 0.9372
By Table 4.2 Sample size = 10, significance level .10
Q 0.9372 0.9351 Do not reject the hypothesis of normality at level .10
x1 might form normal distrbution.
For x2 , rQ 0.9692
By Table 4.2 Sample size = 10, significance level .10
Q 0.9692 0.9351 Do not reject the hypothesis of normality at level .10
x2 might form normal distrbution.
4.30
Consider the used-car data in Exercise 4.26
(a) Determine the power transformation ̂1 that makes the x1 values
values jointly normal using (4-40). Compare the results with those obtained
in Parts a and b.
Sol:
(a) By Box-Cox transform, take ̂1 =0.37. Thus the transform data ( x1 ) would
approximately normal.
081002 多變量分析 Homework 01
-10
4
-12
3
-14
Sample Quantiles
-16
2
L1
-18
-20
1
-22
lambda=0.37
0
-24
(b)By Box-Cox transform, ̂2 = 0.94 which is too close to 1. Thus we don’t do
any transform for data ( x2 ) , however the raw data would approximately
normal.
Normal Q-Q Plot for x2
-18
15
Sample Quantiles
-20
L2
10
-22
-24
lambda=0.94
5
(c) Because marginal distributions is normal which don’t mean the joint
distribution still form normal. By Box-Cox transform, we found that
λˆ 1.27, 0.03 which is different with part (a) and (b). But the chi-square
plot for the transform by (a) & (b), would better than transform by (c). Thus
we consider the contour plot, it could be found that (0.37, 0.94) also fall in
the top region. It means that λ 0.37, 0.94 could be a nice choice too.
ˆ
081002 多變量分析 Homework 01
Chi-square plot for x1 & x2 transform by (a) & (b) Chi-square plot for x1 & x2 transform by (c)
6
5
5
4
4
Y.b
Y.a
3
3
2
2
1
1
0
0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
q q
2
-30
1
lambda 2
-25
-15
-1
-20
-3 -25
5 -30
-2
-1 0 1 2 3
lambda 1
4.35 Examine the data on paper-quality measurements in Table 1.8 for marginal and
multitivariate normality.
Marginal normal Q-Q plot
Normal Q-Q Plot for Density Normal Q-Q Plot for Machine direction Normal Q-Q Plot for Cross direction
135
80
0.95
130
75
125
0.90
70
Sample Quantiles
Sample Quantiles
Sample Quantiles
120
65
0.85
115
60
110
0.80
55
105
50
0.75
-2 -1 0 1 2 -2 -1 0 1 2 -2 -1 0 1 2
25
20
20
chi-square quantile
chi-square quantile
chi-square quantile
15
15
4
10
10
2
5
5
0
0 5 10 15 20 25 0 2 4 6 8 0 5 10 15 20 25 30
(d) Density & Machine direction (e) Machine & Cross direction (f) Density & Cross direction
Chi-square plot
081002 多變量分析 Homework 01
30
25
chi-square quantile
20
15
10
5
0
0 5 10 15 20 25 30
Mahalanobis distance
By the above plots (b), (e) would be normal. However if we detect outlier, than
plot (a), (d), (f), (g) might be normal.