# Example 13 - Fitting Polynomials to Pressure Data
# Verified Solution: a0 = 24.6788, a1 = 1.6062, a2 = 0.036044, a3 = 0.000413, a4 = 3.96e-6
# Ref.: Comput. Appl. Eng. Educ. 6: 173, 1998
[
TC P
-36.7 1
-19.6 5
-11.5 10
-2.6 20
7.6 40
15.4 60
26.1 100
42.2 200
60.6 400
80.1 760
]
polyfit TC P 4
P = a0 + a1TC + a2TC2 + a3TC3 + a4TC4
Variable |
Value |
95% confidence |
a0 |
24.678757 |
0.78723339 |
a1 |
1.6061958 |
0.05446323 |
a2 |
0.0360443 |
0.00100889 |
a3 |
0.00041312 |
0.00004005 |
a4 |
3.9631E-06 |
4.5141E-07 |
R^2 |
R^2adj |
Rmsd |
Variance |
0.9999963 |
0.9999934 |
0.1410532 |
0.3979203 |
Polynomial Regression Plot for order 4

Residuals Plot for Polynomial of order 4

Source data points and calculated data points
|
TC |
P |
P calc |
Delta P |
1 |
-36.7 |
1 |
1.0477125 |
-0.04771249 |
2 |
-19.6 |
5 |
4.518359 |
0.48164105 |
3 |
-11.5 |
10 |
10.415373 |
-0.41537276 |
4 |
-2.6 |
20 |
20.739228 |
-0.73922758 |
5 |
7.6 |
40 |
39.162336 |
0.83766357 |
6 |
15.4 |
60 |
59.694174 |
0.30582595 |
7 |
26.1 |
100 |
100.33842 |
-0.33841912 |
8 |
42.2 |
200 |
200.26472 |
-0.26472266 |
9 |
60.6 |
400 |
399.76792 |
0.23207928 |
10 |
80.1 |
760 |
760.05176 |
-0.05175524 |
General
Degree of polynomial = 4
Regression including a free parameter
Number of observations = 10