Sunday, May 06, 2012

Explanations and Definitions of Statistical Terms

 When I look at my daily statistics on Dexcom's DM3 charts, here's what it gives me:

% in target: If you took all the of the sensor readings that I had that day, and count the number that were in my target (as given to the computer, not as put in the receiver), divide by the number of readings, and multiply by 100, rounding to the nearest whole number, that's what this is.
Example: If I only had 12 readings for the day (because, say I started a new sensor towards the end of the day) and they were: 153, 159, 164, 163, 160, 151, 149, 146, 141, 138, 137, 136, and my range was set to 80-160, then Dexcom counts the 160 as out of range and the so it counts 9 in range. The total number of data points is 12. So 9/12 = 0.75, times 100 is 75, and no rounding is required, I was 75% in range. THIS NUMBER CHANGES ACCORDING TO THE RANGE THAT WAS SET.

% in low: If you took all the sensor readings that I had that day, count the number that were at or below the bottom number in my target (as given to the computer, not as put in the receiver), divide by the number of readings, and multiply by 100, rounding to the nearest whole number, that's what this is.
Example: If I had the same 12 readings given above, and the same range, I get 0% in low. If I changed my target range to 140-400 (who knows why) it'd count that 3 were at or below 140, 12 was the total. 3/12 = 0.25, times 100 is 25, no rounding required, 25% in low. THIS NUMBER CHANGES ACCORDING TO THE RANGE THAT WAS SET

% in high: Take all the sensor readings I had that day, count the number at or above the upper number in the target (as given to the computer, not as put in the receiver), divide by the number of readings, and multiply by 100, rounding to the nearest whole number, and that's what this is.
Example: Using the numbers in the first example and the range of 80-160, I had three readings at or above the target range, out of twelve readings. 3/12 is 0.25, times 100 is 25, no rounding required, 25% in high. THIS NUMBER CHANGES ACCORDING TO THE RANGE THAT WAS SET

# of  readings: This is the number of sensor readings that were given by dots on the dexcom receiver during the day. A full day of readings would be 288 (except on the days where you changed the time setting on the receiver). For the example above, it would be 12. This is important to tell you how completely the data really reflects your blood sugar for the day. This number is the same no matter what your target range is.

Min Value; This is the lowest sensor reading for the time period. In the example above, the min value was 136. If the lowest reading the Dexcom showed on the screen during the day was LOW, then the value it puts into this chart is 39. This number does not change no matter what your target range is set to.

Average: Take all of the sensor readings for the day and add up their values. If any sensor reading was LOW, use the number 39 instead. If any sensor reading was HIGH, use the number 401 instead. Divide by the number of readings. This number is the same no matter what your target range is set to.
Example: If I only had 12 readings for the day (because, say I started a new sensor towards the end of the day) and they were: 153, 159, 164, 163, 160, 151, 149, 146, 141, 138, 137, 136, the software adds them up- 1797. Then it divides by the total number: 1797/12 = 149.75. Then it rounds to the nearest whole number: 150 is the average.
Another Example: On April 2nd, I used a sensor that didn't function really well. I got 65 readings (other than ??? and out of range). Here they are: 179, 187, 181, 182, 187, 175, 170, 168, 168, 154, 156, 160, 149, 157, 157, 147, 141, 139, 151, 144, 142, 131, 134, 123, 117, 113, 114, 110, 108, 100, 113, 82, 78, 71, 84, 104, 124, 137, 179, 226, 291, 347, 384, HIGH, 399, HIGH, HIGH, 375, 358, 356, 370, 384, 392, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, 380, 96, 104. In computing the average, the software assumes all these HIGHs are 401s (although as an actual fact I was in the 200s during these readings). So, adding these values it gets 14,690. Then it divides by the number of readings. 14690/65 = 226.

Max Value:  This is the highest sensor reading in the time period. If the highest reading was HIGH, then this value will be given as 401 instead. This stays the same if the target range changes.
Example: If the data was: 153, 159, 164, 163, 160, 151, 149, 146, 141, 138, 137, 136, then Max Value is 164.
If the data was 179, 187, 181, 182, 187, 175, 170, 168, 168, 154, 156, 160, 149, 157, 157, 147, 141, 139, 151, 144, 142, 131, 134, 123, 117, 113, 114, 110, 108, 100, 113, 82, 78, 71, 84, 104, 124, 137, 179, 226, 291, 347, 384, HIGH, 399, HIGH, HIGH, 375, 358, 356, 370, 384, 392, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, 380, 96, 104, then Max Value is 401.

Standard Deviation; When I want to compute something very tedious, I compute standard deviations. Here's how to compute a standard deviation. First, find the average (instructions above). Then find the difference between each data point and the average. Square each of the differences, and then add the squares together. Divide by the total number of data points. Take the square root, and that's the standard deviation. The standard deviation goes up a lot if only some points are far away from the average. This stays the same if the target range changes.
Example: If the data was: 153, 159, 164, 163, 160, 151, 149, 146, 141, 138, 137, 136, the average was 150. The differences between each data point and the average are: 3, 9, 14, 13, 10, 1, 1, 4, 12, 13, 14. The squares are 9, 81, 296, 269, 100, 1, 1, 16, 144, 169, 196. The sum of the squares is 1282. Dividing by the number of data points (12) gets us 1282/12 = 106 and 5/6ths. The square root of that is 10.33.... and that rounds to a standard deviation of 10.
Computing the standard deviation for a full set of data would be tricky, but here are some data sets and standard deviations that may be interesting.
If the data points are: 150, 150, 150, 150, the standard deviation is 0. All the of the data points are the same as the average.
If the data points are 110, 150, 150, 190, the standard deviation is 28. The average is 150, and two of the data points have a deviation- a difference from the average- of 40, and the other two have a deviation of 0.
If the data points are 130, 130, 170, 170, the standard deviation is 20. All of the points are 20 away from the average.
Standard deviation is far more meaningful for larger sets of data.

25%: This is the 25th percentile. Multiply the number of readings by 0.25 (or divide by 4- same thing), round up to the nearest whole number, and call our answer N. Now rearrange the readings so they are in order from smallest to largest, and count to the Nth number. That's the 25th percentile (well, not exactly- but that's what the Dexcom software does).
Example: If the data points were 179, 187, 181, 182, 187, 175, 170, 168, 168, 154, 156, 160, 149, 157, 157, 147, 141, 139, 151, 144, 142, 131, 134, 123, 117, 113, 114, 110, 108, 100, 113, 82, 78, 71, 84, 104, 124, 137, 179, 226, 291, 347, 384, HIGH, 399, HIGH, HIGH, 375, 358, 356, 370, 384, 392, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, 380, 96, 104, then I had 65 data points. 65/4= 16.25, which rounded up is 17.
Finding the smallest 17 numbers in the set, I get 71, 78, 82, 84, 96, 100, 104, 104, 108, 110, 113, 113, 114, 117, 123, 124, 131. So 131 is my 25%

Median: This is the 50th percentile. Put the readings in order from smallest to biggest, then pick the middle number. This is really the number that most people have in mind when they say average, even though this is not the average. In real math, if I have an even number of data points, so that there is no middle number, I average the two middle numbers to get my median. Dexcom software simply picks the larger of the two middle numbers, I think.
Example: If this is the data: 153, 159, 164, 163, 160, 151, 149, 146, 141, 138, 137, 136, then there are two middle numbers, 151 and 149. Dexcom software would give the median as 151, I think; the true median is 150. Notice that this is the same as the average, which was 150.
Example: If this is the data: 179, 187, 181, 182, 187, 175, 170, 168, 168, 154, 156, 160, 149, 157, 157, 147, 141, 139, 151, 144, 142, 131, 134, 123, 117, 113, 114, 110, 108, 100, 113, 82, 78, 71, 84, 104, 124, 137, 179, 226, 291, 347, 384, HIGH, 399, HIGH, HIGH, 375, 358, 356, 370, 384, 392, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, 380, 96, 104, the the middle number is 168. Notice that this is much lower than the average, which was 226.
Important To Know: When the middle numbers and bottom numbers are closer together than the middle numbers and top numbers, then the average will be bigger than the median (like in the second example). When the lows are about as far away from the middle numbers as the top numbers are, then the median and average will be very close together. When the low numbers are much lower than the middle numbers but the top numbers are close to the middle numbers, the average will be lower than the median.

When your highs are because of mealtime spikes, expect your median to reflect your fasting blood sugars and your average to be much higher because it will show more of your highs.
Examples:
If your data set is 100, 110, 300, your average is 170 and your median is 110.
If your data set is 100, 110, 120, your average is 110 and your median is 110.
If your data set is 40, 110, 120, your average is 90, and your median is 110.
Median is like your normal blood sugar.

75%: The 75th percentile is the flip side of the 25th%; multiply your number of readings by 0.75, and round up to the nearest whole number.Call your answer N. Put your readings in order from smallest to largest and count up to the Nth number. That's your 75th percentile.
Example: If the data points were 179, 187, 181, 182, 187, 175, 170, 168, 168, 154, 156, 160, 149, 157, 157, 147, 141, 139, 151, 144, 142, 131, 134, 123, 117, 113, 114, 110, 108, 100, 113, 82, 78, 71, 84, 104, 124, 137, 179, 226, 291, 347, 384, HIGH, 399, HIGH, HIGH, 375, 358, 356, 370, 384, 392, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, 380, 96, 104, then I had 65 data points. 65 * 0.75 = 48.75, rounded up is 49.
In order going up my first 49 data points are:
 71, 78, 82, 84, 96, 100, 104, 104, 108, 110, 113, 113, 114, 117, 123, 124, 131, 134, 137, 139, 141, 142, 144, 147, 149, 151, 154, 156, 157, 157, 160, 168, 168, 170, 175, 179, 179, 181, 182, 187, 187, 226, 291, 347, 356, 358, 370, 375, 380. So, 380 is my 75th percentile.

Interquartile Range: This is another way of measuring how much your numbers bounce around, and it's much easier to compute than the standard deviation. All you do is take the 75th percentile and subtract from it the 25th percentile.
Example: If my data points were 179, 187, 181, 182, 187, 175, 170, 168, 168, 154, 156, 160, 149, 157, 157, 147, 141, 139, 151, 144, 142, 131, 134, 123, 117, 113, 114, 110, 108, 100, 113, 82, 78, 71, 84, 104, 124, 137, 179, 226, 291, 347, 384, HIGH, 399, HIGH, HIGH, 375, 358, 356, 370, 384, 392, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, 380, 96, 104, then my 25th percentile was 131 and my 75th percentile was 380. 380- 131 = 249. 249 is my interquartile range.

Estimated Standard Deviation:  Sorry, I don't know what Dexcom is doing with this. 

 Standard Error of the Mean:  This is something I did learn how to calculate in my statistics course, but it is not meaningful with regards to Dexcom (or Guardian) data and really should not be included. Basically what this number is meant to tell you is if you had picked numbers from a random distribution, how closely can you be sure your data represents the real numbers. In other words, did you check your blood sugar often enough to guess at the average blood sugar? How far off is your guess likely to be? However, this really doesn't answer the question because our data points are not random and because the sensor errors are much bigger than 0.

Coefficient of Variation: This is an easy computation. Take the standard deviation and divide by the average. Multiply by 100 and put a percentage sign after it.
Example: 153, 159, 164, 163, 160, 151, 149, 146, 141, 138, 137, 136 is my data set, so 149.75 is my average. My standard deviation is about 10.33. 10.33/149.75 = 0.0690, 6.9%, a very small coefficient of variation.

No comments: