CR4® - The Engineer's Place for News and Discussion®


Previous in Forum: Computer CPU Meter   Next in Forum: Calculation of Relative Dielectric Constant of Piezoelectric?
Close
Close
Close
10 comments
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13569
Good Answers: 155

Statistics on an Excel Data Table

11/07/2017 12:06 PM

Suppose you have data table with about ten different parameters, and you wish to calculate the average of each column in the table along with the standard deviation (for the entire population of the existing table).

Unfortunately, not all the parameters are measured on each date in the table and there are blank gaps in the data.

I used AVERAGEIF(Table1[parameter],crit) where crit is a defined name:>0

Next I used STDEV.S(Table1[parameter]) for the standard deviation.

Is this the correct way to ignore the blank records?

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru

Join Date: Apr 2010
Posts: 5760
Good Answers: 577
#1

Re: Statistics on an Excel Data Table

11/07/2017 1:28 PM
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13569
Good Answers: 155
#2
In reply to #1

Re: Statistics on an Excel Data Table

11/07/2017 1:37 PM

interesting website.

I guess the second part of my question: is the standard deviation being inflated by adding in a bunch of terms that tricks Excel into thinking blank cells are zero?

I am sure ISNUMBER (0) = true. I am pretty sure ISNUMBER(_) = false.

The trick would be incorporating that into a calculation of standard deviation where the number of terms is over 100.

I, of course, have the option of rendering the data a different way, into a contiguous column pure in number values, with no blanks, zeroes, or text.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13569
Good Answers: 155
#3

Re: Statistics on an Excel Data Table

11/07/2017 1:51 PM
criter>0
DATA:data/blanksdata/zeroesFiltered:
232323
222222
242424
025
252523
232324
0
2424
0
average23.515.6723.5
AverageIF23.523.523.5
STDEV.S
1.04881
11.779221.04881

Note that the standard deviation calculations for data with gaps and with no gaps are identical, but the data that is zero-filled presents a huge problem.

Thanks, Rixter for making me focus better.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru

Join Date: Apr 2010
Posts: 5760
Good Answers: 577
#4
In reply to #3

Re: Statistics on an Excel Data Table

11/07/2017 4:42 PM
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13569
Good Answers: 155
#5
In reply to #4

Re: Statistics on an Excel Data Table

11/07/2017 4:55 PM

Ok, I see that If(,,) can be used within stdev.p function.

also saw the one with isnumber (range).

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Member

Join Date: Mar 2017
Posts: 6
#6

Re: Statistics on an Excel Data Table

11/08/2017 8:12 AM

Stuffing blank entries would skew the data. If there isn't any real data value then nothing should be substituted into that spot. Zero stuffing is used in DSP to change the sample rate of a signal which changes the energy content. The STNDEV in any data set that is zero stuffed would be similar.

Write a short macro to remove blanks.

Register to Reply
Member

Join Date: Mar 2017
Posts: 6
#8
In reply to #6

Re: Statistics on an Excel Data Table

11/08/2017 11:46 AM

Should have clarified my last statement if "you" read the whole comment more clearly.

The STNDEV in any data set that is stuffed with erroneous data will be modified to fit that new data set. As I said, the energy content (STD) would be wrong.

Register to Reply
Guru

Join Date: May 2016
Posts: 884
Good Answers: 41
#7

Re: Statistics on an Excel Data Table

11/08/2017 11:07 AM

Not really. That method will artificially lower the standard deviation by biasing zero values to the average.

I would suggest making a value copy of the data table, breaking it into individual two column tables that include the dates/times and the individual data elements and then sort the two column tables based on the data value. This will collapse the data with the zeroes sorted to the end of the column. Then you can run average and standard deviations on the columns of non-zero data. If you wanted to automate it a bit further, you could add two columns alongside the sorted date and value column and do an if/then formula to calculate the average from the top of the data column to the present level in the third column and the standard deviation in the fourth column.

The last average and standard deviation in the column would be the summary for the data in the column.

Register to Reply
Guru
Engineering Fields - Civil Engineering - Member

Join Date: Mar 2011
Location: ''but, don't we get PAID to ask questions?...''
Posts: 922
Good Answers: 11
#9

Re: Statistics on an Excel Data Table

11/10/2017 12:18 PM

Seems like you should also take additional specific care to qualify that each (possible column entry) is an actual number...

(i.e.: something like: ( if $@#is > 1, then count-value is 1 ) along with ( if count ="1" then sum($@) = (c+1), else, not) and then Stat functions are each a function of a totally numeric (C), rather than a possibly mixed (n), to start with, in order to eliminate such things as dates being treated as numbers, etc.)...

hopefully, helpfully, good luck, in any case...

__________________
''illigitimi non carborundum...'' (i.e.: don't let the fatherless ones grind you down...)
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13569
Good Answers: 155
#10
In reply to #9

Re: Statistics on an Excel Data Table

11/10/2017 1:10 PM

It does seem I used the correct option. This works as my time is somewhat limited that I would eschew calculation of the appropriate sums of data in a more manual way.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Register to Reply 10 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Copy to Clipboard

Users who posted comments:

James Stewart (4); Jpfalt (1); MR. Guest (1); Rixter (2); Stephen J. Wright (2)

Previous in Forum: Computer CPU Meter   Next in Forum: Calculation of Relative Dielectric Constant of Piezoelectric?

Advertisement