Author Topic: Statistical Calculation  (Read 1818 times)

0 Members and 2 Guests are viewing this topic.

Online GigaJoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 805
  • Country: ca
Statistical Calculation
« on: April 26, 2026, 02:49:03 pm »
So here is some python script,  started as curiosity of stats, then deterministic of value from the noise, then attempt to find out drift\stability , then incorporated NIST recent slide show for calculation, then add some funky stuff as detection 24H cycle temp deviation ....

I really don't know how it trustful it , due to i have just one hammer to test, as well is it just a curiosity or some practical use.
It can be logical misleading , due to my incorrect understanding ..

i see no problem to accommodate a diff type, i need just a sample.

An image samples in K2001 ADC thread
Text report as an output sample :  https://pastebin.com/R6mwBAMS
script, and some explanation attached

add non standard library:
python -m pip install numpy scipy matplotlib

run: Python [switch] madev_plot_VXXX.py [input file]
switch type of data:
-K :  +7.0565240E+00NVDC,   +14844.076394secs, +32265rdng#, 00extchan
-S: +2.0000000000E-01,+3.3718347549E-04  (timestamp in sec ;  value in Volts)
« Last Edit: April 27, 2026, 02:41:37 am by GigaJoe »
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 8738
  • Country: hr
Re: Statistical Calculation
« Reply #1 on: April 26, 2026, 07:05:33 pm »
That looks interesting... Nice.

Would be willing to adjust the file parsing to read Siglent SDM4000 format?
That way I could verify calculations with device I have.

They use metadata header (that defines type of measurements and total number of points.
First row is time since start of capture, second row is measurement in scientific notation.
Example in attachment..
"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 

Online GigaJoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 805
  • Country: ca
Re: Statistical Calculation
« Reply #2 on: April 26, 2026, 08:51:08 pm »
draft version , try for siglent

PS:   Detected LSD       : 30 nV - interesting ....
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 8738
  • Country: hr
Re: Statistical Calculation
« Reply #3 on: April 26, 2026, 09:00:55 pm »
The attachment is missing ?
"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 

Online GigaJoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 805
  • Country: ca
Re: Statistical Calculation
« Reply #4 on: April 26, 2026, 09:04:47 pm »
actually i modify my first post,  so any changes look at the first post ..
« Last Edit: April 26, 2026, 09:34:12 pm by GigaJoe »
 
The following users thanked this post: 2N3055

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 8738
  • Country: hr
Re: Statistical Calculation
« Reply #5 on: April 26, 2026, 09:15:25 pm »
actually i modify first post,  so any changes look at the first post ..

Yep, -S modifier used, it ran fine. Nice work!!
Thanks for this.

I will play with it in next few days and post my results..

Best,
 Siniša
"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6894
  • Country: li
Re: Statistical Calculation
« Reply #6 on: May 09, 2026, 11:32:57 am »
Yep, nice!

I wonder what to do with temperature(s) in such statistical analysis.

Imagine you have a DMM and your DUT is a voltage reference you measure (for example).

So you get in your .csv file (for example) - time stamps (in milliseconds), DMM_voltage, DMM_internal_temperature, Ambient_temperature, optional a DUT_temperature too. And there is the DMM_TC and/or DUT_TC you may know (for example).

Now how to incorporate all that in the statistical calculations?
Afaik the package (and perhaps other packages too) ignores the effects of temperature (not mention the humidity, air pressure etc.).

So for example:

a) I measure for a week at constant ambient temperature and I get ADEV_1.

b) With the same setup I measure for a week where the ambient temperature varies by X degC during the week and I get ADEV_2.

c) With the same setup I measure for a week where the ambient temperature varies by X degC during that week and I make the TC compensation of my DMM_voltage, and I get ADEV_3.

d) With the same setup I measure for a week where the ambient temperature varies by X degC during that week and I make the TC compensation of my DUT_voltage, and I get ADEV_4.

e) With the same setup I measure for a week where the ambient temperature varies by X degC during that week and I make the TC compensations of my DUT_voltage and my DUT_voltage, and I get ADEV_5.

I will get 5 different ADEVs (and other stat results will differ too), imho..
Moreover which ADEV is DMM's one and which DUT's one?
« Last Edit: May 09, 2026, 12:02:08 pm by iMo »
Readers discretion is advised..
 

Online GigaJoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 805
  • Country: ca
Re: Statistical Calculation
« Reply #7 on: May 10, 2026, 10:48:12 pm »
im thinking of re do .. separate voltage calculation and multimeter stats....

basically i had similar ideas,  of correction thermal runaway to calculate data more precise ,   thinking polynomial function can be build from table of data. unique for each range...
im not sure ambient temp, necessary , it affecting internal temp, that affect circuit. so only internal temp, and measured voltage  ,   source suppose to be ideal, non temperature dependent ,ideal 10v etc ..
in this case possible to do some curvature , ideally in controlled environment , as need at least 10- 15 degree window ...
 
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 8738
  • Country: hr
Re: Statistical Calculation
« Reply #8 on: May 11, 2026, 08:46:16 pm »
GigaJoe, a question: you mention "NIST recent slide show". What document you are referring to, if you would be so kind to explain...
Thanks.

As a side note, I still think that ambient temp would be interesting correlation.
From what I gathered in the last few days, temp drift is dominating data.
I am personally suspecting my source (Omega/AOIP calibrator) and plan to get something more stable in time.
"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf