0

Given the following data points

X Y Z
18.23 3 80
42.2 5.5 600
377.30 52.04 900
6835.86 646.91 17 000
X Y Z
250 20 ?

Can I find the function of X and Y that best predicts the value of Z?

In my (basic) understanding, a multivariate regression will give me the equation of a plane, which is not super precise.

How can I get the equivalent of a polynomial function as the fitting function? What tool can I use?

lami
  • 103

1 Answers1

1

The points are not close to a plane. If you try to fit a plane the fitting will be bad especially for the low values of z ( if the criteria of fitting is Least Mean Square Error ) . See the next result :

enter image description here

Since they are only four points one can have an exact fit with any equation on the form

y=a * f1(x) + b * f2(x) + c * f3(x) + d * f4(x)

where f1, f2, f3, f4 are arbitrary undependant functions. Thus they are infinity many solutions.

Among so many solutions why not a very simple one ? For example :

enter image description here

The result is exact : Perfect fittig.

JJacquelin
  • 66,221
  • 3
  • 37
  • 87
  • Thank you that's amazing! What tool did you use for the computation? – lami Apr 26 '23 at 05:56
  • I need to do the same computation for different values :), can you share the tool you're using? – lami Apr 26 '23 at 06:27
  • 1
    There is no need for sophisticated tool since this is a basic linear regression in the first example and a simple solving of system of four linear equations in the second example. What is shown above is the screen copies of the calculus with Mathcad : https://www.mathcad.com/fr . – JJacquelin Apr 26 '23 at 06:44
  • ok thanks, went with https://www.desmos.com/matrix – lami Apr 26 '23 at 06:55