
Advanced Statistics Advanced Probability and Statistics Math Forum 
 LinkBack  Thread Tools  Display Modes 
February 14th, 2019, 02:40 PM  #1 
Senior Member Joined: Jan 2017 From: Toronto Posts: 209 Thanks: 3  Principal Components Analysis Question
Consider the following set of threedimensional points D = {(0,2,1), (0,4,3), (1,4,5), (1,8,6), (1,8,10), (4,8,14), (5,9,13)} (a) Find the least squares estimate for z taken as a function of x and y. (b) Find the least squares estimate for x taken as a function of y and z. (c) Find the best fit plane, in term of principal component analysis. My answers (a) Finding the best fit plane for z taken as a function of x and y A + 0B + 2C = 1 A + 0B + 4C = 3 A + 1B + 4C = 5 A + 1B + 8C = 6 A + 1B + 8C = 10 A + 4B + 8C = 14 A + 5B + 9C = 13 LeastSq(A, B, C) = { 0.331, 1.385, 0.877 } New points that lie on the projection plane: x: 0.000 0.000 1.000 1.000 1.000 4.000 5.000 y: 2.000 4.000 4.000 8.000 8.000 8.000 9.000 z: 1.423 3.176 4.561 8.068 8.068 12.222 14.483 (b) Finding the best fit plane for x taken as a function of y and z A + 2B + 1C = 0 A + 4B + 3C = 0 A + 4B + 5C = 1 A + 8B + 6C = 1 A + 8B + 10C = 1 A + 8B + 14C = 4 A + 9B + 13C = 5 LeastSq(A, B, C) = { 1.714, 6.143, 7.429 } New points that lie on the projection plane: x: 0.356 0.156 1.040 0.737 2.505 4.274 3.645 y: 2.000 4.000 4.000 8.000 8.000 8.000 9.000 z: 1.000 3.000 5.000 6.000 10.000 14.000 13.000 (c) Finding the variances of plane(a) and plane(b). Avg(D) = (1.714, 6.143, 7.429) Var(Proj(Avg, Plane(a))): 29.175 Var(Proj(Avg, Plane(b))): 30.515 Plane(a) has smaller variance, therefore Plane(a) is a better fit plane. Are my answers correct at all??? Last edited by zollen; February 14th, 2019 at 02:48 PM. 
February 14th, 2019, 03:54 PM  #2 
Senior Member Joined: Sep 2016 From: USA Posts: 578 Thanks: 345 Math Focus: Dynamical systems, analytic function theory, numerics 
I get the same plane as you for (a). However, for (b) I get the plane with coefficients: $ (0.4255, 0.1863, 0.4421)$. I'm using MATLAB for the matrix arithmetic so I'm inclined to trust it but you never know I might have made a mistake somehow. In any case double check your work. For (c) I think you have misunderstood what the question is asking (or I have). I don't think it is asking you to determine whether the plane from (a) or (b) is better. I think it is asking you to find the "true" best fit plane, which is going to be whatever plane is generated by the 2 dominant principal components (the left singular vectors corresponding to the 2 largest singular values). For this you should compute a SVD. That is my understanding of what (c) is asking anyway. I would say the question is not specific enough so if you are in doubt ask your instructor. 
February 14th, 2019, 04:06 PM  #3 
Senior Member Joined: Jan 2017 From: Toronto Posts: 209 Thanks: 3 
You are correct. I made a mistake with question b. Let me work on c with SVD... Thanks for the tips!! EigenVectors(A): x: 0.205 0.520 0.829 y: 0.586 0.743 0.322 z: 0.784 0.420 0.457 The best fit plane is: 0.829x + 0.322y  0.457z = 0 Last edited by zollen; February 14th, 2019 at 04:29 PM. 

Tags 
analysis, components, principal, question 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
principle components analysis  Sancho  Real Analysis  3  January 22nd, 2018 04:46 PM 
Easy resolving components question  Tooperoo  Algebra  3  March 7th, 2013 05:15 PM 
A Question Regarding Connected and QuasiComponents  Hooman  Real Analysis  0  February 7th, 2013 03:27 PM 
Principal Components Analysis + Correlations  Stingery  Advanced Statistics  0  June 12th, 2010 05:06 AM 
Principle components Analysis  project  Linear Algebra  0  January 27th, 2009 01:38 AM 