Statistics

Copper Contributor

Hello, I just do some calculation using mean (average) & standard deviation (stdev.s) formula in Excel for my grouped data and for validation, I also calculate it manually using formula I find in the statistics text book. But later, I realize that there are slightly different products of Excel calculation & my manual calculation, I'm sure there is no mistake for my manual calculation.

Is Excel have statistical function/formula built-in it for grouped data?

1 Reply

@IHStrafalgari  .... Since you do not provide even the formulas that you use, there is no way to provide constructive solutions.

 

For quicker constructive responses, attach an example Excel file.  If you cannot attach a file (I'm told some users cannot !), upload the file to a file-sharing website, and post the shared download URL in a response here.  I like box.net/files; others like dropbox.com.

 

-----

 

@IHStrafalgari  wrote: ``I'm sure there is no mistake for my manual calculation.``

 

Perhaps not.  Again, we cannot comment constructively because you did not share your (Excel implementation of those?) manual calculations.

 

In addition to any Excel implementation of the "manual" (mathematical) calculations, it would be helpful if you provide the mathematical methods that you use, in one form or another.  If you can find the math methods online, provide the URL(s).  Alternatively, scan textbook pages or even take a phone photo, and attach the JPG files or upload them to a file-sharing website.

 

I cannot imagine any way (*) to use Excel AVERAGE and STDEV (aka STDEV.S) to correctly calculate the mean and std dev of grouped data, in general.  So, I'm sure there are mathematical mistakes, at least, in those Excel formulas.

 

(*) There is a way:  replicate the data for each group n[i] times, where n[i] is the frequency of group "i".  See my example below.  But that is not practical, IMHO.

 

Even if you estimate the mean of each group, the average of the group means is not equal to the correct mean of the grouped data, unless the number of samples for each group is the same.

 

-----

 

@IHStrafalgari  wrote: ``Is Excel have statistical function/formula built-in it for grouped data?``

 

Not really.  But we can easily implement a mathematical method.

 

Consider the following example from https://www.statology.org/mean-standard-deviation-grouped-data .  See the attached Excel file.

 

JoeUser_0-1642882358803.png

Formulas:

B8:  =SUMPRODUCT(C2:C6,  (B2:B6+A2:A6)/2) / SUM(C2:C6)

B9:  =SQRT( SUMPRODUCT(C2:C6, ((B2:B6+A2:A6)/2 - B8)^2) / (SUM(C2:C6)-1) )

 

 

Compare that with the simple AVERAGE and STDEV (STDEV.S) of the replicated grouped data and with "random" raw data.

 

JoeUser_1-1642898280236.png

Formulas:

F2:     =AVERAGE(A2:B2)

F3:     =F$2

F27:  =AVERAGE(F2:F24)

F28  =STDEV(F2:F24)

G27:  =F27=B8

G28:  =F28=B9

 

J27:  =AVERAGE(J2:J24)

J28:  =STDEV(J2:J24)

K27:  =J27/F27 - 1

K28:  =J28/F28 - 1