PolymathPlus Report
📊   Polynomial Regression 2022-04-01 12:47 

# Example 12 (b) - 2nd degree polynomial fit to BOD data
# BOD = a0 + a1*Time + a2*Time^2
# Verified Solution: a0 = 0.224387, a1 = 0.310403, a2 = -0.006439

[
Time BOD
1 0.6
2 0.7
4 1.5
6 1.9
8 2.1
10 2.6
12 2.9
14 3.7
16 3.5
18 3.7
20 3.8
]
polyfit Time BOD 2


BOD = a0 + a1Time + a2Time2

Variable Value 95% confidence
a0 0.22438671 0.35305402
a1 0.31040324 0.08169155
a2 -0.00643933 0.00385057

R^2   R^2adj   Rmsd   Variance  
0.9815572    0.9769465    0.0463377    0.0324762   

Polynomial Regression Plot for order 2

 0 1 2 3 4 5 0 5 10 15 20 Time P(Time) BOD(Time)



Residuals Plot for Polynomial of order 2

 -0.4 -0.2 0 0.2 0.4 0.6 0 5 10 15 20 BOD Zero Line BOD - BODCalc



Source data points and calculated data points

  Time BOD BOD calc Delta BOD
1 1 0.6 0.52835061 0.07164939
2 2 0.7 0.81943585 -0.11943585
3 4 1.5 1.3629703 0.13702968
4 6 1.9 1.8549901 0.04500988
5 8 2.1 2.2954953 -0.19549526
6 10 2.6 2.6844857 -0.08448572
7 12 2.9 3.0219615 -0.12196151
8 14 3.7 3.3079226 0.39207736
9 16 3.5 3.5423691 -0.04236909
10 18 3.7 3.7253009 -0.02530088
11 20 3.8 3.856718 -0.056718


General

Degree of polynomial = 2
Regression including a free parameter
Number of observations = 11