Multivariate Methods Assignment Help
Multivariate Methods Assignment Help
Sol. (a) The multivariate normal density is defined by the following equation.
statisticsassignmentexperts.com
(c) For α = 0.5, the solid ellipsoid of (x1, x2) satisfy (x − µ) T Σ−1 (x − µ) ≤ χ 2 p,α = c2
will have probability 50%. From the quantile function in R we have χ 22,0.5 =
qchisq(0.5,df=2) = 1.3863, therefore, c = 1.1774. The eigenvalues of Σ are (λ1, λ2) =
(2.3660, 0.6340) with eigenvectors (e1 e2) =( −0.8881 0.4597 )
( −0.4597 −0.8881).
Therefore, we have the axes as: c √ λ1 = 1.8111 and c √ λ2 = 0.9375. The contour is
plotted in Figure 1.
statisticsassignmentexperts.com
2. Let X be N3(µ, Σ) with µ T = (2, −3, 1) and Σ =
Sol. (a) Let a = (3, −2, 1)T , then aTX = 3X1 − 2X2 + X3. Therefore,
aTX ∼ N(aTµ, aT Σa),
where
statisticsassignmentexperts.com
Since we want to have X2 and Y independent, this implies that −a1 − 2a2 + 3 = 0.
So we have vector
, for c ∈ R
(a) X1 and X2
(b) X1 and X3
(c) X2 and X3
(d) (X1, X3) and X2
(e) X1 and X1 + 3X2 − 2X3
(b) X1 | X2 = x2, X3 = x3
(b) Find the marginal distributions for each of the random vectors
statisticsassignmentexperts.com
and
(b) Find the joint density of the random vectors V1 and V2 defined in (a).
Then we have V1 ∼ Np(0, 1/4Σ) and V2 ∼ Np(0, 14Σ). (b) Also by result 4.8, V1 and
V2 are jointly multivariate normal with covariance matrix
, with c =
statisticsassignmentexperts.com
6. Find the maximum likelihood estimates of the 2×1 mean vector µ and the 2×2
covariance matrix Σ based on the random sample from a bivariate normal
population.
Sol. Since the random samples X1, X2, X3, and X4 are from normal population,
the maximum likelihood estimates of µ and Σ are X¯ and 1/n Σ ni=1(Xi − X¯ )(Xi −
X¯ )T . Therefore,
(a) Construct a Q-Q plot. Do the data seem to be normally distributed? Explain.
(b) Carry out a test of normality based on the correlation coefficient r Q. Let the
significance level be α = 0.1.
Sol. (a) The Q-Q plot of this data is plotted in Figure 2. It seems that all the
sample quantiles are close the theoretical quantiles. However, the Q-Q plots
are not particularly informative unless the sample size is moderate to large,
for instance, n ≥ 20. There can be quite a bit of variability in the straightness
of the Q-Q plot for small samples, even when the observations are known to
come from a normal population.
statisticsassignmentexperts.com
Using the information from the data, we have rQ = 0.9351. The R code of this
calculation is compiled in Appendix. From Table 4.2 in the textbook we know that
the critical point to test of normality at the 10% level of significance
corresponding to n = 9 and α = 0.1 is between 0.9032 and 0.9351. Since rQ =
0.9351 > the critical point, we do not reject the hypothesis of normality.
10. Exercise 1.2 gives the age x1, measured in years, as well as the selling price x 2,
measured in thousands of dollars, for n = 10 used cars. These data are reproduced
as follows:
(a) Use the results of Exercise 1.2 to calculate the squared statistical distances (x j
− x¯)TS−1 (xj − x¯), j = 1, 2, . . . , 10, where xTj = (xj1, xj2).
(b) Using the distances in Part (a), determine the proportion of the observations
falling within the estimated 50% probability contour of a bivariate normal
distribution.
(c) Order the distances in Part (a) and construct a chi-square plot.
(d) Given the results in Parts (b) and (c), are these data approximately bivariate
normal? Explain.
statisticsassignmentexperts.com
Sol. (a) From Exercise 1.2 we have x¯=
(b) We plot the data points and 50% probability contour (the blue ellipse) in
Figure 3. It is clear that subject 4, 5, 6, 8, and 9 are falling within the
estimated 50% probability contour.
The proportion of that is 0.5.
statisticsassignmentexperts.com
(c) The squared distances in Part (a) are ordered as below. The chi-square plot is
shown in Figure 4.
(d) Given the results in Parts (b) and (c), we conclude these data are
approximately bivariate normal. Most of the data are around the theoretical line.
statisticsassignmentexperts.com
Appendix
> library(ellipse)
library(MASS)
> library(mvtnorm)
> set.seed(123)
>
> mu <- c(0,2)
> Sigma <- matrix(c(2,sqrt(2)/2,sqrt(2)/2,1), nrow=2, ncol=2)
> X <- mvrnorm(n=10000,mu=mu, Sigma=Sigma) > lambda <- eigen(Sigma)
$values
> Gamma <- eigen(Sigma)$vectors
> elps <- t(t(ellipse(Sigma, level=0.5, npoints=1000))+mu)
> chi <- qchisq(0.5,df=2)
> c <- sqrt(chi)
> factor <- c*sqrt(lambda)
> plot(X[,1],X[,2])
> lines(elps)
> points(mu[1], mu[2])
> segments(mu[1],mu[2],factor[1]*Gamma[1,1],factor[1]*Gamma[2,1]+mu[2])
> segments(mu[1],mu[2],factor[2]*Gamma[1,2],factor[2]*Gamma[2,2]+mu[2])
statisticsassignmentexperts.com
R code for Problem 9.
> x <- c(-0.6, 3.1, 25.3, -16.8, -7.1, -6.2, 25.2, 22.6, 26.0)
> # (a) > qqnorm(x)
> qqline(x)
> # (b)
> y <- sort(x)
> n <- length(y)
> p <- (1:n)-0.5)/n
>q <- qnorm(p)
> rQ <- cor(y,q)
statisticsassignmentexperts.com