Legacy Hardware and Apps
Std deviation=0 when max>min?

Something seems inconsistent between the statistical channel option that calculates standard deviation and the ones that give min and max.

DT800 occasionally delivers standard deviation values of 0 when the min and max values are not equal. This simple program causes most records to represent a sample of about 8 or 9 readings but rarely as little as 2 or 3.

In some of these rare cases the standard deviation is given as zero even though it should be nonzero in its last three digits or so.

If there are only two readings, they should be the minimum and maximum values, and we can calculate the standard deviation independently, which I did for the first example line from the dataset.

BEGIN"DUMMY" 
RS 
RA300T 
1V(FF5,AV)(SD)(MX)(MN)(NUM) 
LOGON 
END

Here are four example lines from the resulting dataset of over 200,000 lines. The "0.00000" a bit right of center is the standard deviation.

In the first example the (population) standard deviation "sigma" is 0.00100398 and the sample standard deviation "s" is 0.00141984, if the minimum and maximum are the two raw readings.

D,083147,"DUMMY",2010/09/14,22:44:41,0.448608,1;A,0,29.72379,0.00000,29.72480,29.72279,2.00000;0095;11BC 
D,083147,"DUMMY",2010/09/15,02:24:24,0.359497,1;A,0,30.79051,0.00000,30.79734,30.78182,3.00000;0095;A883 
D,083147,"DUMMY",2010/09/15,04:01:39,0.643554,1;A,0,30.78642,0.00000,30.78894,30.78240,3.00000;0095;5ADA 
D,083147,"DUMMY",2010/09/15,07:27:12,0.953491,1;A,0,30.60210,0.00000,30.60373,30.60047,2.00000;0095;B241

Of course the standard deviation of two or three numbers isn't very useful, but, how is this getting calculated?

Good morning
Chris B

Something seems inconsistent between the statistical channel option that calculates standard deviation and the ones that give min and max. DT800 occasionally delivers standard deviation values of 0 when the min and max values are not equal. This simple program causes most records to represent a sample of about 8 or 9 readings but rarely as little as 2 or 3. In some of these rare cases the standard deviation is given as zero even though it should be nonzero in its last three digits or so. If there are only two readings, they should be the minimum and maximum values, and we can calculate the standard deviation independently, which I did for the first example line from the dataset. ```` BEGIN"DUMMY" RS RA300T 1V(FF5,AV)(SD)(MX)(MN)(NUM) LOGON END ```` Here are four example lines from the resulting dataset of over 200,000 lines. The "0.00000" a bit right of center is the standard deviation. In the first example the (population) standard deviation "sigma" is 0.00100398 and the sample standard deviation "s" is 0.00141984, if the minimum and maximum are the two raw readings. ```` D,083147,"DUMMY",2010/09/14,22:44:41,0.448608,1;A,0,29.72379,0.00000,29.72480,29.72279,2.00000;0095;11BC D,083147,"DUMMY",2010/09/15,02:24:24,0.359497,1;A,0,30.79051,0.00000,30.79734,30.78182,3.00000;0095;A883 D,083147,"DUMMY",2010/09/15,04:01:39,0.643554,1;A,0,30.78642,0.00000,30.78894,30.78240,3.00000;0095;5ADA D,083147,"DUMMY",2010/09/15,07:27:12,0.953491,1;A,0,30.60210,0.00000,30.60373,30.60047,2.00000;0095;B241 ```` Of course the standard deviation of two or three numbers isn't very useful, but, how is this getting calculated? Good morning Chris B

Good morning Chris B,

I can't see what is happening here, I ran your code here and get the correct results.

D,080483,"DUMMY",1989/02/03,23:00:53,0.604125,0;A,0,-3.96709,0.06600,-3.92042,-4.01376,2.00000;0103;119A

What version of firmware are you running? The last firmware version for the DT800 is 4.10. If you have an earlier version please upgrade

Cheers,
Roger

Good morning Chris B, I can't see what is happening here, I ran your code here and get the correct results. ```` D,080483,"DUMMY",1989/02/03,23:00:53,0.604125,0;A,0,-3.96709,0.06600,-3.92042,-4.01376,2.00000;0103;119A ```` What version of firmware are you running? The last firmware version for the DT800 is 4.10. If you have an earlier version please upgrade Cheers, Roger

It's 4.10. I observe this on two different units. Note I only got 4 such events out of 200,000, so it's rare.

It's 4.10. I observe this on two different units. Note I only got 4 such events out of 200,000, so it's rare.

Hi Chris,

Looks like I'll have to run the code for a lot longer to find this one.

The dataTaker will calculate various parameters such as sum of the squares, square of the sums, number of samples, maxima, minima etc as each sample is taken then calculate the required values when the schedule is reported, then reset the and start again.

I'll do some more testing.

Cheers,
Roger

Hi Chris, Looks like I'll have to run the code for a lot longer to find this one. The dataTaker will calculate various parameters such as sum of the squares, square of the sums, number of samples, maxima, minima etc as each sample is taken then calculate the required values when the schedule is reported, then reset the and start again. I'll do some more testing. Cheers, Roger

More clues, for what it's worth.

I ran my dummy job again last night but this time I shortened the schedule period to get more records and a larger share of records with only 2 measurements, which seemed to favor the odd result.

BEGIN"DUMMY"
RS RA200T
1V(AV)(SD)(MX)(MN)(NUM)
LOGON
END

I got 303176 data records of which 498 had an N of two and 10 further reported a standard deviation of zero. They are below:

Record Average Max Min (Max-Min)

45227 29.6228 29.6264 29.6191 0.00736
84448 29.9836 29.9875 29.9797 0.00775
93114 30.8829 30.8854 30.8804 0.00499
98661 30.8487 30.8515 30.8458 0.00572
132799 29.7824 29.7859 29.7790 0.00695
153104 29.7599 29.7662 29.7536 0.01253
184244 30.0432 30.0532 30.0331 0.02010
210826 29.6697 29.6738 29.6656 0.00819
296711 29.8290 29.8389 29.8192 0.01972
300303 30.6405 30.6446 30.6364 0.00815

None of the records where N was three or more reported a zero standard deviation.

The twenty two records having the smallest value for (Max - Min) included the ten zeros. Never was (Max - Min) equal to zero, though for six of them it was 0.01105 and for five it was 0.01563.

Looking at the 498 records for which N was 2, I calculated standard deviation independently, knowing that the two values had to equal Max and Min. Graphing this result against the DT800 reported standard deviation, I see that they are strongly correlated but aren't equal.

And the DT800 reported standard deviations only occupy certain values, which aren't evenly spaced. The first few, of which there are multiple instances, are 0,00000, 0.01105, 0.01563, 0.01914 and 0.02210. I also looked at whether Max, Min, Max-Min, or my independent standard deviation only occupy certain values. They all seem scattered.

More clues, for what it's worth. I ran my dummy job again last night but this time I shortened the schedule period to get more records and a larger share of records with only 2 measurements, which seemed to favor the odd result. ```` BEGIN"DUMMY" RS RA200T 1V(AV)(SD)(MX)(MN)(NUM) LOGON END ```` I got 303176 data records of which 498 had an N of two and 10 further reported a standard deviation of zero. They are below: ```` Record Average Max Min (Max-Min) 45227 29.6228 29.6264 29.6191 0.00736 84448 29.9836 29.9875 29.9797 0.00775 93114 30.8829 30.8854 30.8804 0.00499 98661 30.8487 30.8515 30.8458 0.00572 132799 29.7824 29.7859 29.7790 0.00695 153104 29.7599 29.7662 29.7536 0.01253 184244 30.0432 30.0532 30.0331 0.02010 210826 29.6697 29.6738 29.6656 0.00819 296711 29.8290 29.8389 29.8192 0.01972 300303 30.6405 30.6446 30.6364 0.00815 ```` None of the records where N was three or more reported a zero standard deviation. The twenty two records having the smallest value for (Max - Min) included the ten zeros. Never was (Max - Min) equal to zero, though for six of them it was 0.01105 and for five it was 0.01563. Looking at the 498 records for which N was 2, I calculated standard deviation independently, knowing that the two values had to equal Max and Min. Graphing this result against the DT800 reported standard deviation, I see that they are strongly correlated but aren't equal. And the DT800 reported standard deviations only occupy certain values, which aren't evenly spaced. The first few, of which there are multiple instances, are 0,00000, 0.01105, 0.01563, 0.01914 and 0.02210. I also looked at whether Max, Min, Max-Min, or my independent standard deviation only occupy certain values. They all seem scattered.

This is getting more curious. I ran a faster test program for a few days and generated 3,407,588 records. There were 2933 examples of the standard deviation being zero while the min and max were unequal.

But the more significant result, I think, was that the reported value of standard deviation is quantized in irregular steps, apparently in ALL cases, without regard to Max and Min and the number of measurements in the record.

All reported standard deviations fall into one of these discrete bins, which are separated by dozens or hundreds of the least significant digit. I pasted below all the reported values for standard deviation that were less than 0.05, and the number of times they occurred in my dataset (ignoring whether Min and Max are equal or the number of samples in that record).

But I have to go up to 0.66021 to find a value that only occurs once, and even up around 0.95 the standard deviation values are still mostly clumped. At this level, there are too few records to populate the bins, but as far as I know there are still bins.

I think the big news is that the DT800's reported values of standard deviation occur in these discrete bins, clearly of zero width and well separated, which means they can't be right. I also looked for Min and Max to be quantized in some way, but they aren't, except obviously in steps of 1 in their last reported digit.

So, standard deviations of 0 appear, I guess, because one of the bins is at 0.

I tried graphing the number of instances occuring in each bin by the bin's central value, and get what look like three skewed bell curves that sit roughly on top of one another. I also tried graphing the width of each bin by its central value, and get a bathtub curve with two neat left curves upward and a scattered right upward region. I don't know what it means.

StdDev Instances

0.00000 2935
0.00902 624
0.01105 2208
0.01276 955
0.01563 3105
0.01804 1331
0.01914 1764
0.02017 1541
0.02210 3179
0.02387 1739
0.02471 1579
0.02552 1857
0.02706 3563
0.02853 2059
0.02923 1616
0.02992 2173
0.03125 3857
0.03253 2415
0.03315 1743
0.03375 2446
0.03494 4200
0.03608 2490
0.03664 1854
0.03719 2511
0.03827 4597
0.03932 2689
0.03984 1903
0.04034 2701
0.04134 4786
0.04231 2870
0.04279 2045
0.04326 2881
0.04419 4937
0.04511 2960
0.04555 2047
0.04600 3100
0.04688 5101
0.04774 3104
0.04816 2291
0.04858 3220
0.04941 5425
This is getting more curious. I ran a faster test program for a few days and generated 3,407,588 records. There were 2933 examples of the standard deviation being zero while the min and max were unequal. But the more significant result, I think, was that the reported value of standard deviation is quantized in irregular steps, apparently in ALL cases, without regard to Max and Min and the number of measurements in the record. All reported standard deviations fall into one of these discrete bins, which are separated by dozens or hundreds of the least significant digit. I pasted below all the reported values for standard deviation that were less than 0.05, and the number of times they occurred in my dataset (ignoring whether Min and Max are equal or the number of samples in that record). But I have to go up to 0.66021 to find a value that only occurs once, and even up around 0.95 the standard deviation values are still mostly clumped. At this level, there are too few records to populate the bins, but as far as I know there are still bins. I think the big news is that the DT800's reported values of standard deviation occur in these discrete bins, clearly of zero width and well separated, which means they can't be right. I also looked for Min and Max to be quantized in some way, but they aren't, except obviously in steps of 1 in their last reported digit. So, standard deviations of 0 appear, I guess, because one of the bins is at 0. I tried graphing the number of instances occuring in each bin by the bin's central value, and get what look like three skewed bell curves that sit roughly on top of one another. I also tried graphing the width of each bin by its central value, and get a bathtub curve with two neat left curves upward and a scattered right upward region. I don't know what it means. ```` StdDev Instances 0.00000 2935 0.00902 624 0.01105 2208 0.01276 955 0.01563 3105 0.01804 1331 0.01914 1764 0.02017 1541 0.02210 3179 0.02387 1739 0.02471 1579 0.02552 1857 0.02706 3563 0.02853 2059 0.02923 1616 0.02992 2173 0.03125 3857 0.03253 2415 0.03315 1743 0.03375 2446 0.03494 4200 0.03608 2490 0.03664 1854 0.03719 2511 0.03827 4597 0.03932 2689 0.03984 1903 0.04034 2701 0.04134 4786 0.04231 2870 0.04279 2045 0.04326 2881 0.04419 4937 0.04511 2960 0.04555 2047 0.04600 3100 0.04688 5101 0.04774 3104 0.04816 2291 0.04858 3220 0.04941 5425 ````
24
5
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft