# Interpolation and Extrapolation

#### skp338

Hi,
I've a table of data in the following format:
x--> 0.1 3.767 4.395 5.0223
y
0.1 | 1 1.5 2.0 2.0---->z
0.6764 | 1 2.0 2.2 3.599-->z
1.10146 | 2 2.2 2.5 3.686-->z
1.3855 | 2.5 2.618 2.673 2.718-->z

Now using the above table, i wish to find z at unknown point say (x1,y1). As far as i know, i've two options:
(1) Interpolation and extrapolation (2) Curve Fitting.
I mention my problems with each:
(1) Interpolation and extrapolation: I can do bilinear interpolation to some satisfaction but what if the interpolation point is out of range. That is I'm not sure about the best method to do extrapolation. Please suggest.
(2)Curve Fitting: I'm thinking of Polynomial curve fitting. I'm not sure about the degree of polynomial. Is there any criteria do choose the degree of polynomial? Now suppose I fix the degree to three, what is the best menthod to obtain the coefficients of the polynomial? Please help. The last question related to curve fitting is How do I know the error i'm making in getting z for an unknow point (x1, y1). Thanks in advance.

#### fresh_42

Mentor
2018 Award
I would recommend a linear regression.

"Interpolation and Extrapolation"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving