Advanced Octave A70 — Estimation, comparison and uncertainty

by Giux GX-TXT, octave-en, scripts-en 2 min read

Advanced GNU Octave with GX-TXT · Module 12

Now we draw the speeds of the two synthetic answers and compare the adaptation with a straight. The numerical uncertainty must always be accompanied by the assumptions that make it interpretable.

Objectives and prerequisites

Run A68 and A69’s controls. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import stima_risposte.m, register it and run it in the Runner. The octave_project_fit_a and octave_project_fit_b forecast dataset are created-only: to repeat, use a new Session or change the IDs even in subsequent lessons.

Stimulate the two speeds

For each nonlinear_fit condition, it adapts the model to a 1-exp(-k*t) parameter to the published data, with an initial value of 0.6 s⁻¹. The programme compares the RMS of the residuals with that of a straight adapted to the same points and publishes separately the two non-linear forecasts. The callback is released at the end.

In the test A gives k ≈ 0.504253 s⁻¹ and B k ≈ 0.800799 s⁻¹. Nonlinear RMS are about 0.015110 and 0.021057; linear RMS about 0.094917 and 0.148208. They are errors on the same data used for the estimate: they do not constitute an independent verification of predictive ability.

Uncertainty and hypothesis

Assuming the standard deviation 0.02, independent errors and locally appropriate model, the script uses the SE(k) = sigma/sqrt(sum((t*exp(-k*t)).^2)) approximation. In the test we get about 0.010686 s⁻¹ for A and 0.020386 s⁻¹ for B. These are local standard errors, not 95% confidence intervals and not a measurement of model errors.

Here we know the generation form because the data is synthetic. A lesser RMS and convergence do not show that the same model is physically plausible in a real experiment: it requires knowledge of the system, residues, independent data and assessment of the hypotheses.

Exercise

  1. What condition does the higher estimated speed have?
  2. Is the comparison of RMS on independent data?
  3. What assumptions do they come into the calculation of the standard error?

Worked solution

  1. B, about 0.801 s⁻¹.
  2. No: Use the adaptation data.
  3. Independent noise with standard deviation known and adequacy of the local approximation of the model.

Download the Module 12 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *