wollmich / metas-b-least

B_LEAST ISO 6143:2001
MIT License
1 stars 1 forks source link

Different coefficients b and uncertainties of b of example 3 for the exponential function than in the published norm #1

Open wollmich opened 5 hours ago

wollmich commented 5 hours ago

The results for the coefficients b and the uncertainties of b of Example 3 for the exponential function are different than published ISO 6143:2001 norm.

The results from Example 3 are:

Coefficients b
[-4.79624355e+01  4.79680953e+01  2.12832891e-05]
Uncertainties u(b)
[3.18215721e+00 3.17103959e+00 1.27409693e-06]
Covariance cov(b)
[[ 1.01261245e+01 -1.00907139e+01  4.05310956e-06]
 [-1.00907139e+01  1.00554921e+01 -4.03915785e-06]
 [ 4.05310956e-06 -4.03915785e-06  1.62332300e-12]]

The norm claims, see appendix B.2.3:

image

wollmich commented 5 hours ago

The original Power BASIC program computes the same values which are published in the norm.

The output of the original Power Basic program is:

Calibration: Exponential model function

Results of ISO 6143 method:
  b0            b1           b2
-4.8019E+01   4.8024E+01   2.1261E-05  

Parameter standard deviations/covariances:
u  (b0)      u  (b1)      u  (b2)      cov(b0,b1)   cov(b0,b2)   cov(b1,b2)
7.9654E-02   7.2525E-02   3.6210E-11  -5.7679E-03   5.0264E-15  -4.8216E-15  

Remaining SSD is:          0.6581
Weighted distances:
  #          x-value    x-dist.    y-dist.
1.00E+00   1.00E+00   4.72E-03  -7.32E-02  
 2.00E+00   1.00E+00  -9.43E-03   8.28E-02  
 3.00E+00   2.00E+00   1.02E-02  -6.14E-02  
 4.00E+00   3.00E+00  -3.48E-03   9.88E-03  
 5.00E+00   4.00E+00   5.60E-02  -1.16E-01  
 6.00E+00   4.00E+00  -7.84E-02   1.80E-01  
 7.00E+00   5.00E+00   1.07E-01  -3.00E-01  
 8.00E+00   6.00E+00  -2.99E-02   5.26E-02  
 9.00E+00   8.00E+00   7.16E-02  -9.16E-02  
 1.00E+01   8.00E+00  -2.11E-01   3.55E-01  
 1.10E+01   1.00E+01   3.01E-01  -3.13E-01  
 1.20E+01   1.00E+01  -1.69E-01   2.83E-01  
Goodness-of-fit measure:   0.3552

##Parameter set##
1 ,-.192039388684634 , 1.13383797215994E-3 , 9.04261166891013E-3 , 1.73967210762675E-6 ,-1.36122844736831E-8 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 
 4 , .121277454659124 , 5.12125658707491E-4 , 8.49864074983529E-2 , 1.78213759991065E-2 , 2.36930564399249E-5 , 4.97446268461598E-3 ,-3.82646623367887E-7 , 7.93263966955328E-5 ,-1.17799988802113E-7 , 0 , 0 , 0 , 0 , 0 
 5 ,-48.0191157688416 , 48.024395987938 , 2.12612133535726E-5 , 7.96536972091994E-2 , 7.25254321703939E-2 , 3.62101038225549E-11 ,-5.76787478877683E-3 , 5.02644503269134E-15 ,-4.82163126249274E-15 , 0 , 0 , 0 , 0 , 0 
##End set##
wollmich commented 5 hours ago

The result of a Monte Carlo simulation with 10000 samples and 10000 optimizations:

b(1) = -(48.1404 ± 3.2425)
b(2) =  (48.1461 ± 3.2314)
b(3) =  (2.1290e-05 ± 1.2832e-06)
covariance between b(2) and b(1) = -1.0478e+01
covariance between b(3) and b(1) = 4.1446e-06
covariance between b(3) and b(2) = -4.1305e-06

Those results are much closer to the results of Example 3.

So I assume it's a bug in the original Power Basic program.