代写 R math shell statistic Multivariate Analysis: Assignment 1

Multivariate Analysis: Assignment 1
The University of New South Wales School of Mathematics Department of Statistics
2019 T3: Due at the start of class on Friday, 4 October
• Submission instructions will be posted shortly.
• No late assignments will be accepted without a successful application for
a Special Consideration.
• For computational and applied exercises, you may use either R or SAS. Include commands used and a reasonable amount of relevant output.
• Use of computer algebra systems is permitted and encouraged, though note that one may not be available during the exams.
Corrections:
• The original density in Question 1 was one which, unfortunately, can- not be integrated with respect to x1 in a closed form, which made subsequent questions far more difficult than intended. Note the cor- rection.
• The hint for Question 3(f) was missing a column in X. 1. Consider a joint density
1 􏰄􏰂x1 2×2􏰃􏰅 f(x1,x2)=3x exp − 6 + x
11
1 􏰄􏰂x2 2×1􏰃􏰅 f(x1,x2)=3x exp − 6 + x
,x1,x2>0 ,x1,x2>0.
22
(a) Compute fX1 (x1), fX2 (x2), and fX1|X2 (x1|x2).
(b) Give the best approximation g∗(X2) in mean square sense for X1 (i.e. find explicitly g∗(X2) that minimises E[X1 −g(X2)]2 over all possible choices of g(X2) such that E[g(X2)2] < ∞). (c) For a given realisation x2, calculate the mean square error of the best approximation. (That is, calculate E{[X1 − g∗(X2)]2|X2 = x2}.) 􏰂4 1􏰃 2. Consider a matrix Σ = 1 4 1 (a) Derive its spectral decomposition. (Feel free to check your answer with eigen, of course.) 242 (b) FindΣ1,Σ1 andΣ−1. (c) Find the eigenvectors of Σ−1. (d) Suppose that the vector 􏰀X1 X2􏰁⊤ has a multivariate normal distri- bution with Σ as above being its covariance matrix and if n = 16 ob- servations gave a vector of sample means 􏰀X ̄1 X ̄2􏰁⊤ = 􏰀1.5 4.7􏰁⊤, draw a confidence ellipsoid for the mean vector 􏰀μ1 μ2􏰁⊤ at a level of 90% as accurately as possible. 3. The table below is an extract of a dataset collected about abalone (a kind of mollusc). Researchers collected the following information about each specimen:1 Sex Male, Female, or Infant Length (mm) longest shell measurement Diameter (mm) perpendicular to length Height (mm) with meat in shell Whole weight (grams) whole abalone Shucked weight (grams) weight of meat Viscera weight (grams) gut weight (after bleeding) Shell weight (grams) after being dried Rings number of rings (can be used to estimate the mollusc’s age: adding 1.5 gives the age in years) In this exercise, we will focus on the male abalones only. There are two versions of the dataset on Moodle: abalonesM1.dat, abalonesM2.dat. You will require both. Note that they no longer have a Sex column. (a) Read in abalonesM1.dat. Produce diagnostic plots to visually ex- amine the plausibility of approximate multivariate normality in the data. Report the plots and briefly discuss any deviations from nor- mality or other issues you observe. Read in abalonesM2.dat. Use this dataset for the remainder of the exercise. (b) Perform formal hypothesis tests of the hypothesis of multivariate normality using techniques discussed in lecture and lab. 1Warwick J. Nash, Tracy L. Sellers, Simon R. Talbot, Andrew J. Cawthorn and Wes B. Ford (1994) "The Population Biology of Abalone (Haliotis species) in Tasmania. I. Blacklip Abalone (H. rubra) from the North Coast and Islands of Bass Strait", Sea Fisheries Division, Technical Report No. 48 (ISSN 1034-3288) Retrieved from the UCI Machine Learning Repository (https://archive.ics.uci.edu/ml/ datasets/abalone). 2 (c) Find the sample mean vector and the sample covariance matrix. (d) Suppose that to facilitate sustainable harvesting, we wish to be able to jointly predict a male abalone’s Shucked weight (i.e., meat pro- duced by harvesting) and Rings count (i.e., age), from its Length and Height (which are easy to measure); and suppose that we have measured a particular male abalone’s length to be 120 mm and height to be 40 mm. Assuming joint multivariate normality, estimate the conditional distribution of shucked weight and ring count (i.e., give estimators of mean vector and covariance matrix between the esti- mates). (e) Calculate the T 2 statistic and test the null hypothesis that 􏰀μLength μDiameter μHeight􏰁 = 􏰀100 80 30􏰁. (f) Calculate the T2 statistic and test the null hypothesis that μLength = μDiameter+μHeight and μWhole weight = μShucked weight+μViscera weight+ μShell weight. Hint: Transform X = 􏰀X1 X2 X3 X4 X5 X6 X7􏰁⊤ into 􏰂1 −1 −1 0 0 0 0􏰃 Y = 0 0 0 1 −1 −1 −1 Xandreformulatethe null hypothesis in terms of the means of Y . 3