0

I have an assignment talking about plotting the data points in R3.

The data are shown below:

no x1 x2 x3 y

1 9 12 7 101

2 3 6 6 66

3 13 14 1 85

4 10 12 7 103

5 4 4 3 47

6 -5 -1 4 19

7 3 8 6 72

8 11 1 6 67

I tried to plot them using the scatter plot, three set of dots (i.e. x1 vs y, x2 vs y and x3 vs y) were on the same graph but the tutor said that it was incorrect.

Does anyone tell me how to plot these data?

Thank you very much!

1 Answers1

0

Looking at your data $$\left( \begin{array}{cccc} x_1 & x_2 & x_3 & y \\ 9 & 12 & 7 & 101 \\ 3 & 6 & 6 & 66 \\ 13 & 14 & 1 & 85 \\ 10 & 12 & 7 & 103 \\ 4 & 4 & 3 & 47 \\ -5 & -1 & 4 & 19 \\ 3 & 8 & 6 & 72 \\ 11 & 1 & 6 & 67 \end{array} \right)$$ and using a multilinear regression, the data correspond exactly to $$y=12+2x_1+3x_2+5x_3$$ which is the equation of a straight line in a four dimension space.

Now, how to plot them on a piece of paper ?

  • How did you obtain the equation y = 12 + 2x1 + 3x2 + 5x3? The question (about the data mining and the principal component analysis) is asked to plot the data points in R3 (i.e. 3D) but not 4D. Should I use R or Weka to plot these data? – chrisych Oct 09 '16 at 08:26
  • @chrisych. I suspected that the model would be linear. So, I just applied an standard multilinear regression from which I got the coefficients. Now, I do not know the tools you speak about (since I am almost blind, I do not care too much about them). If you have appropriate tools, may be an idea could be to make a 3D contour plot, each level corresponding to a value of $y$. – Claude Leibovici Oct 09 '16 at 08:35
  • @chrisych. You are very welcome ! – Claude Leibovici Oct 09 '16 at 08:38