Multivariate Data Analysis
Computer Practical 2
This computer practical can be accessed via the course web page:
http://www.staff.ncl.ac.uk/d.j.wilkinson/teaching/mas3325/
It may be helpful to have the course web page, the course notes, and
this practical page all open in different tabs of your web browser
during this practical session. In particular, it may save time to
copy-and-paste R commands rather than re-typing them.
- Work through all of the R code for transforming multivariate data from p.39 to p.42.
Make sure that you understand it all before proceeding.
- After working through the R code, you should have in your workspace a 1000x2 matrix, Y, containing correlated bivariate normal observations.
- Rotate this multivariate data anti-clockwise by 45 degrees (pi/4 radians).
- Produce a scatter-plot of the transformed data to check that the rotation has worked.
- Compute the sample covariance matrix of the transformed data.
- What theoretical matrix should this be close to?
- How does the trace of the variance matrix of the original and rotated data compare? Why?
- Consider the zip.train dataset of handwritten digit
images.
- What is the mean of the average intensity of the images corresponding to
the digit "4"?
- Produce an image of the average of the digit "6" across all samples.