How to compute standard deviation from tallies

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,691
Office Version
  1. 365
Platform
  1. Windows
Are the formulas in H6 & H7 the best way to calculate the mean and std dev of a possibly large collection of numbers identified by their tallies?

In this example, I have a list of 217 numbers, 100 5s, 75 4s, 30 3s, 2 2s, & 10 1s.

Weighted Ratings.xlsx
DEFGH
6XNMean4.17
75100Std Dev1.01
8475
9330
1022
11110
12Total217
Sheet1
Cell Formulas
RangeFormula
H6H6=(D7*E7+D8*E8+D9*E9+D10*E10+D11*E11)/Tbl[[#Totals],[N]]
H7H7=LET(m,H6, SQRT( ( ((D7-m)^2*E7) + ((D8-m)^2*E8) + ((D9-m)^2*E9) + ((D10-m)^2*E10) + ((D11-m)^2*E11) ) / Tbl[[#Totals],[N]] ) )
E12E12=SUBTOTAL(109,[N])


Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
That works for a table organized that way. I guess I misled you with the table example I posted above. Sorry about that.

Unfortunately, I need to organize mine as shown below. Is there a simpler formula for the mean and std dev in this table? Thanks

Std Dev & Variance.xlsm
CDEFGHIJKLMNOPQR
3SKURating#Reviews5%4%3%2%1%%Sum#5#4#3#2#1MeanStd Dev
4B0822KNQKT4.767,02783%10%3%1%2%99%55,6326,7032,0116701,3414.68000.7474
5B004HZFASG4.827,18385%9%3%1%2%100%23,1062,4468152725444.74000.7432
6B093VNWP944.68,15779%13%5%2%2%101%6,4441,0604081631634.68000.8346
7B0928PHM2B4.11,92478%13%5%2%2%100%1,5012509638384.63000.8325
8B08RWMY1MW4.41,44772%12%7%3%6%100%1,04217410143874.41001.1322
9B081T9X7RZ4.837184%11%2%1%1%99%312417444.73000.6272
10B00FHW7PHW3.714953%13%3%12%19%100%7919418283.69001.6291
11B07FMC8N7H4.59176%13%4%3%4%100%69124344.54000.9942
12B002VL628U3.8751%26%0%0%23%100%420023.82001.5961
Amazon 01
Cell Formulas
RangeFormula
K4:K12K4=[@[5%]]+[@[4%]]+[@[3%]]+[@[2%]]+[@[1%]]
L4:L12L4=[@['#Reviews]]*[@[5%]]
M4:M12M4=[@['#Reviews]]*[@[4%]]
N4:N12N4=[@['#Reviews]]*[@[3%]]
O4:O12O4=[@['#Reviews]]*[@[2%]]
P4:P12P4=[@['#Reviews]]*[@[1%]]
Q4:Q12Q4=([@['#5]]*5+[@['#4]]*4+[@['#3]]*3+[@['#2]]*2+[@['#1]]*1)/[@['#Reviews]]
R4:R12R4=SQRT( ((5-[@Mean])^2*[@['#5]] + (4-[@Mean])^2*[@['#4]] + (3-[@Mean])^2*[@['#3]] + (2-[@Mean])^2*[@['#2]] + (1-[@Mean])^2*[@['#1]]) / [@['#Reviews]] )
 
Upvote 0
This is about as concise as I can get it:

Book1
CDEFGHIJKLMNOPQR
3SKURating#Reviews5%4%3%2%1%%Sum#5#4#3#2#1MeanStd Dev
4B0822KNQKT4.7670270.830.10.030.010.020.9955632.416702.72010.81670.271340.544.680.747379
5B004HZFASG4.8271830.850.090.030.010.02123105.552446.47815.49271.83543.664.740.743236
6B093VNWP944.681570.790.130.050.020.021.016444.031060.41407.85163.14163.144.680.83464
7B0928PHM2B4.119240.780.130.050.020.0211500.72250.1296.238.4838.484.630.832526
8B08RWMY1MW4.414470.720.120.070.030.0611041.84173.64101.2943.4186.824.411.13221
9B081T9X7RZ4.83710.840.110.020.010.010.99311.6440.817.423.713.714.730.627193
10B00FHW7PHW3.71490.530.130.030.120.19178.9719.374.4717.8828.313.691.629079
11B07FMC8N7H4.5910.760.130.040.030.04169.1611.833.642.733.644.540.994183
12B002VL628U3.870.510.26000.2313.571.82001.613.821.59612
Sheet1
Cell Formulas
RangeFormula
K4:K12K4=SUM([@[5%]]:[@[1%]])
L4:L12L4=[@['#Reviews]]*[@[5%]]
M4:M12M4=[@['#Reviews]]*[@[4%]]
N4:N12N4=[@['#Reviews]]*[@[3%]]
O4:O12O4=[@['#Reviews]]*[@[2%]]
P4:P12P4=[@['#Reviews]]*[@[1%]]
Q4:Q12Q4=SUM([@['#5]]:[@['#1]]*{5,4,3,2,1})/[@['#Reviews]]
R4:R12R4=SQRT(SUM(({5,4,3,2,1}-[@Mean])^2*[@['#5]]:[@['#1]])/[@['#Reviews]])


You can also write the sum formula like:

Excel Formula:
=SUM(Table1[@[5%]:[1%]])


which is a little longer, but shows a slightly different way to select a range on the current row. It might be a bit more intuitive and/or easier to remember, but that's up to you.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top