Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
MTH 316
2nd SEMESTER 2023/24 COURSEWORK
BACHELOR DEGREE - Year 4
APPLIED MULTIVARIATE STATISTICS
Due: May 20
Q 1. In the general linear model
y = Xβ + ε
where y is an n × 1 vector of observations, X is an n × p matrix of rank p (the design matrix), β is a p × 1 vector of unknown parameters and ε is an n × 1 vector satisfying ε N [0, σ2 I]. Let = (XTX)- 1 XTy, y(ˆ) = X β(ˆ) , e = y - y(ˆ), where β , y(ˆ) and e denote the vector of estimated parameters, vector of itted values, and
vector of residuals, respectively.
(a) Find the joint distribution ofy(ˆ) and e.
(b) Use R to analyze the data set in coursework.txt (You need to submit both R codes, output, and conclusion for this part.)
i. Assume the following model
Yi = β0 + β1 xi1 + β2 xi2 + β3 xi3 + β4 xi4 + εi ; i = 1, 2, . . . , n,
is used to it the data. conidence intervals for parameters β0 to β4 . Based on the conidence intervals obtained only, discuss whether or not we may consider using a smaller subset of terms in our model.
ii. Start with the null model and use stepwise selection to ind a best model with α = 0.10 for omission and α = 0.05 for inclusion. In this question, you need to report the deviance for all possible models.
Use the estimate of variance σ2 based on the previous (full) model during the test when necessary. iii. Calculate Mallow’s Cp statistic and comment on it.
iv. Present appropriate plots to check the homogeneity of variance, normality of its standardized resid- uals, and whether there are inluential points with high Cook’s distance. Comment on your results. (35 marks)
Q 2. Suppose the random variables X = [X1 , X2 , . . . , Xp]T have the variance-covariance matrix Σ with eigenvalue-
eigenvector pairs (λ1 , e1 ) , (λ2 , e2 ) , . . . , (λp , ep ) where λ1 ≥ λ2 ≥ . . . ≥ λp ≥ 0 and ei(T)ei = 1 for all is. Let
A = [e1 e2 · · · ep].
(a) (i) Given that the eigenvalues are all distinct. Show that AT A = I, where I is the identity matrix.
[Hint: Show that ei(T)ej = 0 for i j.]
(ii) Given that
Σ =
show that xT Σx > 0 for all x 0.
(b) (You need to submit both R codes, output and conclusion for (iii) and (iv).)
(iii) A sample of 10 observations (x1 , x2 , x3 , x4 ) is given below x1(T) = [10 6 15 14 4 13 9 4 13 1],
x2(T) = [5 3 12 11 10 10 14 4 10 2],
x3(T) = [16 16 12 12 11 12 12 16 12 15],
x4(T) = [6 0 6 12 19 17 12 7 5 10].
Carry out a principal component analysis (PCA) on the correlation matrix and report the propor- tion of the total population variance explained by each component for this dataset. Determine the appropriate number of components to efectively summarize the sample correlation. What are those factors and the proportion of the total population variance could be explained by those factors. You need report the correlation matrix when answering the above questions.
(iv) Let ρ denote the sample correlation matrix for the data set in (iii), ind a matrix L4×2 and a diagonal matrix Ψ, such that ρ LL\ + Ψ. Further, ind the proportion of total sample correlation explained by each factor in L. (35 marks)
Q 3. The following data set, describes the frequencies of Types of Pottery among 5 diferent sites.
Site |
Type |
|||
A |
B |
C |
D |
|
S1 |
30 |
10 |
10 |
39 |
S2 |
53 |
4 |
16 |
2 |
S3 |
73 |
1 |
41 |
1 |
S4 |
20 |
6 |
1 |
4 |
S5 |
46 |
36 |
37 |
13 |
(a) Based on Euclidean distances among sites, obtain a dissimilarity matrix for sites.
(b) Using the dissimilarity matrix achieved in (a), construct the average linkage dendrogram for ive states. Based on your dendrogram, deduce the ‘natural’ clusters of the objects. (10 marks)
Q 4. Suppose that observations come from three distinct populations, π1 , π2 , and π3 , deined by the following exponential distributions:
π2 : X E(θ2 )with prior probability p2
π3 : X E(θ3 )with prior probability p3 = 1 - p1 - p2 ,
where the probability density function of E(θ) is deined as
f (x; θ) = e-x/θ , x > 0.
(a) For the three-class classiication problem, we also allocate a new observation x0 = (x01 , x02 )T (x01 and x02 come from the same population) to the population πi with the largest “posterior” probability P (πi jx0 ). By Bayes’ rule, or otherwise, obtain the posterior probabilities P (π1 jx0 ), P (π2 jx0 ) and P (π3 jx0 ), and state their corresponding classiication regions R1 , R2 and R3 when θ1 > θ2 > θ3 .
(b) Let c(kji) denote the cost of allocating an item to πk when, in fact, it belongs to πi , for i, k = 1, 2, 3. Find the conditional expected cost of misclassifying x0 = (x01 , x02 )T from π1 into π2 or π3 . (20 marks)