Best way to convert Amazon ratings to meaningful Z Scores

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,691
Office Version
  1. 365
Platform
  1. Windows
Most products on Amazon have a rating (0-5) and a count of the number of reviews. A product might get a rating of 4.7 based on 500 reviews or 4.6 based on 5000 reviews. Clearly a rating of 4.7 based on 5000 reviews is worth more that one with a rating of 4.8 based on juist 1 review. But what about a 4.8 rating based on 3000 reviews vs one with a 4.9 rating based on 2500 reviews? How to combine the rating and the number of reviews into a single z score that accurately ranks them?

I created this table as a test.

Cols D-F have the ratings, the z scores, and the ranks. Cols G-I have the number of reviews, those z scores, and those ranks.

Cols J-L have the product of the z scores (z1*z2), those z scores, and those ranks. This turns out to be a poor choice because the product of two negative numbers is a positive number. I couldn't see a way to correct for that.

Cols M-O have the sum of the z scores, those z scores, and those ranks. This looks more reasonable, but I am not confident that it is really valid.

I think the answer might be in a confidence interval. I see that Excel has two -- normal and student T. I am not sure how to use them appropriately. Any suggestions?

Cell Formulas
RangeFormula
E5:E12E5=([@Rating]-TblAmazon[[#Totals],[Rating]])/D$14
F5:F12F5=RANK.EQ([@Rating],[Rating])
H5:H12H5=([@['#Reviews]]-TblAmazon[[#Totals],['#Reviews]])/G$14
I5:I12I5=RANK.EQ([@['#Reviews]],['#Reviews])
J5:J12J5=[@Z1]*[@Z2]
K5:K12K5=([@[Z1*Z2]]-TblAmazon[[#Totals],[Z1*Z2]])/J$14
L5:L12L5=RANK.EQ([@[Z1*Z2]],[Z1*Z2])
M5:M12M5=[@Z1]+[@Z2]
N5:N12N5=([@[Z1+Z2]]-TblAmazon[[#Totals],[Z1+Z2]])/M$14
O5:O12O5=RANK.EQ([@Z4],[ Z4 ])
D13D13=SUBTOTAL(101,[Rating])
E13E13=SUBTOTAL(101,[Z1])
D14D14=STDEV.S(TblAmazon[Rating])
E14E14=STDEV.S(TblAmazon[Z1])
G13G13=SUBTOTAL(101,['#Reviews])
H13H13=SUBTOTAL(101,[Z2])
G14G14=STDEV.S(TblAmazon['#Reviews])
H14H14=STDEV.S(TblAmazon[Z2])
J13J13=SUBTOTAL(101,[Z1*Z2])
K13K13=SUBTOTAL(101,[Z3])
J14J14=STDEV.S(TblAmazon[Z1*Z2])
K14K14=STDEV.S(TblAmazon[ Z3 ])
M13M13=SUBTOTAL(101,[Z1+Z2])
N13N13=SUBTOTAL(101,[Z4])
M14M14=STDEV.S(TblAmazon[Z1+Z2])
N14N14=STDEV.S(TblAmazon[ Z4 ])
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I came across this site which looked promising, but the formula did not work no matter how much I messed with it.

I have no idea if this is even a good way of doing this, but the results seem to pan out.

JM
ABCDEFG
1ProductRatingVotesXYAdjusted ScoreRank
2A52510.0055.0256
3B4.940000.980.88.7222
4C4.850000.9619.4081
5D4.720000.940.46.2985
6E4.65000.920.14.6927
7F4.540000.90.87.654
8G4.48000.880.164.5768
9H4.350000.8617.9983
Sheet3
Cell Formulas
RangeFormula
D2:D9D2=B2/MAX($B$2:$B$9)
E2:E9E2=C2/MAX($C$2:$C$9)
F2:F9F2=SUM(D2:E2)*B2
G2:G9G2=RANK.EQ(F2,$F$2:$F$9)
 
Upvote 0
Upvote 0
Here is my implementation of this approach. Both methods do seem to adjust the ratings in the right direction. But I don't see how you got those formulas from that website. Their formulas seem a lot more complicated.

Weighted Ratings.xlsx
RSTUVWXY
4Rating#ReviewsR Adj# AdjRtg1Rank1Rtg2Rank2
54.99781.00000.02795.0450.1375
64.835,0590.97961.00009.5014.7021
74.716,5460.95920.47196.7322.1283
84.72200.95920.00634.5460.0287
94.71130.95920.00324.5270.0158
104.7460.95920.00134.5180.0069
114.617,3540.93880.49506.6032.1382
124.68,1330.93880.23205.3941.0024
134.66630.93880.01894.4190.0826
Amazon
Cell Formulas
RangeFormula
T5:T13T5=[@Rating]/MAX([Rating])
U5:U13U5=[@['#Reviews]]/MAX(['#Reviews])
V5:V13V5=[@Rating]*([@[R Adj]]+[@['# Adj]])
W5:W13W5=RANK.EQ([@Rtg1],[Rtg1])
X5:X13X5=[@Rating]*[@[R Adj]]*[@['# Adj]]
Y5:Y13Y5=RANK.EQ([@Rtg2],[Rtg2])


I'll study that website when I get a minute.

If I had the standard deviation of the ratings for each product, I think I could use a confidence interval to adjust the ratings. I can get the number of reviews in each rating (1-5). Is there a formula I can put in AL5 that will calculate the standard deviation of a set of 861 5s, 68 4s, 39 3s, 10 2s, & 10 1s?

Weighted Ratings.xlsx
STUABACADAEAFAGAHAIAJAKAL
4ProductRating#Reviews%5s%4s%3s%2s%1s#5s#4s#3s#2s#1sStd Dev
5A4.997888%7%4%1%1%86168391010
6B4.835,05984%10%4%1%1%29,4503,5061,402351351
7C4.716,54682%12%4%1%1%13,5681,986662165165
8D4.722082%9%4%2%2%18020944
9E4.711378%14%6%0%2%88167-2
10F4.74681%10%9%0%0%3754--
11G4.617,35476%13%6%2%3%13,1892,2561,041347521
12H4.68,13379%13%5%2%2%6,4251,057407163163
13I4.666379%12%6%1%3%5248040720
Amazon
Cell Formulas
RangeFormula
AG5:AG13AG5=[@['#Reviews]]*[@[%5s]]
AH5:AH13AH5=[@['#Reviews]]*[@[%4s]]
AI5:AI13AI5=[@['#Reviews]]*[@[%3s]]
AJ5:AJ13AJ5=[@['#Reviews]]*[@[%2s]]
AK5:AK13AK5=[@['#Reviews]]*[@[%1s]]
 
Upvote 0
I didn't get my formulas from the website. I came up with that on my own. The formulas from the website weren't helpful for me, but I thought it would be worth including in case you could get it to work.

It's been way too long since college and statistics, standard deviations, etc. have long since left my head. There are standard deviation formulas in Excel, but I don't know how to implement it.
 
Upvote 0
I didn't get my formulas from the website. I came up with that on my own.
What led you come up with those formulas? What is the basis of dividing my the maximum value? Is that some kind of normalization?

I noticed that both of your solutions have the Rating in there twice. Once as itself and again as a normalized version of itself. I wonder if this gives too much weight to the rating.

The formulas from the website weren't helpful for me, but I thought it would be worth including in case you could get it to work.
Ok, thanks

It's been way too long since college and statistics, standard deviations, etc. have long since left my head. There are standard deviation formulas in Excel, but I don't know how to implement it.
I have been told that when I was born, I knew nothing, and by now I have forgotten most of that.
 
Upvote 0
I am looking for a way to compare ratings like the ones below, by taking into account the number of reviews. The more reviews, the more confidence in the rating. I have more confidence in the first 5.0 rating below with 24,000 reviews than in the other two 5.0 ratings with 4,000 and 200 reviews. But how much more? More importantly, how do the second and third 5.0 ratings compare with the 4.9 rating with 24,000 reviews?

I have done some testing. I tested both of your methods plus a couple based on that idea. I found a way to use confidence intervals that I think is better than any of the others.

Weighted Ratings.xlsx
BCD
4BCD
5ProductRating#Reviews
6A5.024,000
7B5.04,000
8C5.0200
9D4.924,000
10E4.94,000
11F4.9200
12G4.824,000
13H4.84,000
14I4.8200
15J4.724,000
16K4.74,000
17L4.7200
18M4.624,000
19N4.64,000
20O4.6200
21P4.524,000
22Q4.54,000
23R4.5200
24S4.424,000
25T4.4200
26U4.44,000
27V3.7100,000
28Mean4.713,518
29Std Dev0.321,957
Amazon-02
Cell Formulas
RangeFormula
B4:D4B4=col()
C28C28=SUBTOTAL(101,[Rating])
D28D28=SUBTOTAL(101,['#Reviews])
C29C29=STDEV.S(TblAmz02[Rating])
D29D29=STDEV.S(TblAmz02['#Reviews])


Here's that data with rankings based on several methods. I just hope it fits on the screen. Columns E & F are your "adjusted" values. I added a weighting factor to the number of reviews so it wouldn't dominate. In this run, I weighted the number of reviews at 0.5 (half weight). Columns G-J are your two methods and two of mine based on those. mine have the rating value in there only once. The rankings based on those values are in columns U-X.

Columns K-M make use of Z Scores. The rankings based on that are in column Y.

The most interesting data is in columns N-S. Column N calculates the confidence interval based on the confidence level (alpha) in N3 and the standard deviation in O3. I did some standard deviation calculations on actual Amazon ratings. Most of them were around 0.75 to 1.00. In column O, I calculate an adjusted rating by subtracting the confidence interval from the actual rating. This yields the minimum value that we have 95% confidence in. Column P shows how much the actual rating was adjusted downward. Column Q converts it to a Z Score, which shows how much the values differ. Column R scales the Z Score so the top score is 100. This makes is clearer how much each diffrers from its neighbors. Column S gives the new rankings. This table is sorted on column S.

The remaining columns have the rankings based on the other methods. I think it is pretty clear that column Q is by far the best. One of the key reasons for this is that a products ranking can only be reduced, whereas the other methods can increase it. The one that most clearly illustrated this is Product V with a rating of 3.7 on 100,000 reviews. Column
S is the only one that has it still down at #22. Several of the others have it at #1, which is grossly in error.

Weighted Ratings.xlsx
BCDEFGHIJKLMNOPQRSTUVWXY
2F #AAlphaStd Dev
30.50.050.80
4ProductRating#ReviewsRtg Adj#Rev Adj*FR*(RA+#AF)R*RA*#AFRA*#AFRA+ #AFZ RtgZ #RevZRtg+ Z#RevConfRtg MinΔZ RtgMinZ 100Rank RtgMinRank RtgRank R*(RA+#AF)Rank R*RA*#AFRank RA*#AFRank RA+#AFRank ZRtg+Z#Rev
5A5.024,0001.0000.1205.600.600.121.12+1.18+0.48+1.66+0.01+4.99-0.010+1.32+1001112221
6B5.04,0001.0000.0205.100.100.021.02+1.18-0.43+0.75+0.02+4.98-0.025+1.27+962149974
7D4.924,0000.9800.1205.390.580.121.10+0.84+0.48+1.32+0.01+4.89-0.010+0.98+743423332
8C5.02001.0000.0015.010.010.001.00+1.18-0.61+0.58+0.11+4.89-0.111+0.97+74415161697
9E4.94,0000.9800.0204.900.100.021.00+0.84-0.43+0.41+0.02+4.88-0.025+0.92+705471010108
10G4.824,0000.9600.1205.180.550.121.08+0.50+0.48+0.97+0.01+4.79-0.010+0.63+486734443
11F4.92000.9800.0014.810.000.000.98+0.84-0.61+0.23+0.11+4.79-0.111+0.63+4774817171210
12H4.84,0000.9600.0204.700.090.020.98+0.50-0.43+0.06+0.02+4.78-0.025+0.58+44871011111311
13J4.724,0000.9400.1204.980.530.111.06+0.16+0.48+0.63+0.01+4.69-0.010+0.28+2191065556
14I4.82000.9600.0014.610.000.000.96+0.50-0.61-0.11+0.11+4.69-0.111+0.28+211071118181413
15K4.74,0000.9400.0204.510.090.020.96+0.16-0.43-0.28+0.02+4.68-0.025+0.23+1811101412121514
16M4.624,0000.9200.1204.780.510.111.04-0.19+0.48+0.29+0.01+4.59-0.010-0.06-5121396669
17L4.72000.9400.0014.420.000.000.94+0.16-0.61-0.45+0.11+4.59-0.111-0.07-513101519191616
18N4.64,0000.9200.0204.320.080.020.94-0.19-0.43-0.62+0.02+4.58-0.025-0.11-914131713131717
19P4.524,0000.9000.1204.590.490.111.02-0.53+0.48-0.05+0.01+4.49-0.010-0.41-3115161277712
20O4.62000.9200.0014.240.000.000.92-0.19-0.61-0.79+0.11+4.49-0.111-0.41-3116131820201818
21Q4.54,0000.9000.0204.140.080.020.92-0.53-0.43-0.96+0.02+4.48-0.025-0.46-3517161914141919
22S4.424,0000.8800.1204.400.460.111.00-0.87+0.48-0.39+0.01+4.39-0.010-0.75-57181916881015
23R4.52000.9000.0014.050.000.000.90-0.53-0.61-1.14+0.11+4.39-0.111-0.76-5719162021212020
24U4.44,0000.8800.0203.960.080.020.90-0.87-0.43-1.30+0.02+4.38-0.025-0.81-6120192115152121
25T4.42000.8800.0013.880.000.000.88-0.87-0.61-1.48+0.11+4.29-0.111-1.10-8321192222222222
26V3.7100,0000.7400.5004.591.370.371.24-3.27+3.94+0.67+0.00+3.70-0.005-3.16-2392222131115
27Mean4.713,5180.9310.0684.640.260.061.000.000.00-0.00+4.61-0.00-0.00
28Std Dev0.321,9570.0580.1100.460.340.090.091.001.000.850.291.0075.68
Amazon-02
Cell Formulas
RangeFormula
E5:E26E5=[@Rating]/MAX([Rating])
F5:F26F5=([@['#Reviews]]/MAX(['#Reviews])) * FactorNumAdj
G5:G26G5=[@Rating]*([@[Rtg Adj]]+[@['#Rev Adj*F]])
H5:H26H5=[@Rating]*[@[Rtg Adj]]*[@['#Rev Adj*F]]
I5:I26I5=[@[Rtg Adj]]*[@['#Rev Adj*F]]
J5:J26J5=[@[Rtg Adj]]+[@['#Rev Adj*F]]
K5:K26K5=([@Rating]-TblAmz02[[#Totals],[Rating]])/StdDev_Rtg
L5:L26L5=([@['#Reviews]]-TblAmz02[[#Totals],['#Reviews]])/StdDev_NumRev
M5:M26M5=[@[Z Rtg]]+[@[Z '#Rev]]
N5:N26N5=CONFIDENCE.NORM(Alpha,StdDev,[@['#Reviews]])
P5:P26P5=[@[Rtg Min]]-[@Rating]
Q5:Q26Q5=([@[Rtg Min]]-TblAmz02[[#Totals],[Rtg Min]])/StdDev_RtgMin
R5:R26R5=[@[Z RtgMin]]/MAX([Z RtgMin])*100
S5:S26S5=RANK.EQ([@[Rtg Min]],[Rtg Min])
T5:T26T5=RANK.EQ([@Rating],[Rating])
U5:U26U5=RANK.EQ([@[R*(RA+'#AF)]],[R*(RA+'#AF)])
V5:V26V5=RANK.EQ([@[R*RA*'#AF]],[R*RA*'#AF])
W5:W26W5=RANK.EQ([@[RA*'#AF]],[RA*'#AF])
X5:X26X5=RANK.EQ([@[RA+ '#AF]],[RA+ '#AF])
Y5:Y26Y5=RANK.EQ([@[ZRtg+ Z'#Rev]],[ZRtg+ Z'#Rev])
C27C27=SUBTOTAL(101,[Rating])
D27D27=SUBTOTAL(101,['#Reviews])
E27E27=SUBTOTAL(101,[Rtg Adj])
F27F27=SUBTOTAL(101,['#Rev Adj*F])
G27G27=SUBTOTAL(101,[R*(RA+'#AF)])
H27H27=SUBTOTAL(101,[R*RA*'#AF])
I27I27=SUBTOTAL(101,[RA*'#AF])
J27J27=SUBTOTAL(101,[RA+ '#AF])
K27K27=SUBTOTAL(101,[Z Rtg])
L27L27=SUBTOTAL(101,[Z '#Rev])
M27M27=SUBTOTAL(101,[ZRtg+ Z'#Rev])
C28C28=STDEV.S(TblAmz02[Rating])
D28D28=STDEV.S(TblAmz02['#Reviews])
E28E28=STDEV.S(TblAmz02[Rtg Adj])
F28F28=STDEV.S(TblAmz02['#Rev Adj*F])
G28G28=STDEV.S(TblAmz02[R*(RA+'#AF)])
H28H28=STDEV.S(TblAmz02[R*RA*'#AF])
I28I28=STDEV.S(TblAmz02[RA*'#AF])
J28J28=STDEV.S(TblAmz02[RA+ '#AF])
K28K28=STDEV.S(TblAmz02[Z Rtg])
L28L28=STDEV.S(TblAmz02[Z '#Rev])
M28M28=STDEV.S(TblAmz02[ZRtg+ Z'#Rev])
Q27Q27=SUBTOTAL(101,[Z RtgMin])
R27R27=SUBTOTAL(101,[Z 100])
Q28Q28=STDEV.S(TblAmz02[Z RtgMin])
R28R28=STDEV.S(TblAmz02[Z 100])
O5:O26O5=[@Rating]-[@Conf]
O27O27=SUBTOTAL(101,[Rtg Min])
O28O28=STDEV.S(TblAmz02[Rtg Min])
Named Ranges
NameRefers ToCells
'Amazon-02'!Alpha='Amazon-02'!$N$3N5:N26
'Amazon-02'!FactorNumAdj='Amazon-02'!$F$3F5:F26
'Amazon-02'!StdDev='Amazon-02'!$O$3N5:N26
'Amazon-02'!StdDev_NumRev='Amazon-02'!$D$28L5:L26
'Amazon-02'!StdDev_Rtg='Amazon-02'!$C$28K5:K26
'Amazon-02'!StdDev_RtgMin='Amazon-02'!$O$28Q5:Q26




Let me know if you have any comments of suggestions.
 
Upvote 0
I think I have some code that will effectively adjust (discount) Amazon style ratings based on the number of reviews. The AmazonRtg code calcualtes the lower end of the 95% confidence interval.

This minisheet has 28 multivitamin products on Amazon. I tried to select products with different ratings and different numbers of reviews. I then computed the z scores and finally adjusted those so that the top z score is 100. I think that makes it easier to judge the magnitude of the difference between products. Notice that several products with 5.0 and 4.9 ratings, but few reviews, are fairlt far down in the adjusted ratings.

New Microsoft Excel Worksheet.xlsx
CDEFGHIJ
4SKUPriceQuantity$$/eachAmazon RatingDiscounted RatingZ ScoreZ Max =100
5B00L3XNK32$26.49200$0.13 4.8/355574.790.95333100
6B0028AD6WO$27.99200$0.14 4.8/228274.790.9379698
7B002H0KZ9M$11.99150$0.08 4.8/211864.780.9350398
8B08Y1NZ7VR$10.22125$0.08 4.8/104354.780.9009495
9B08Y1KFYF8$10.76100$0.11 4.8/90734.780.8926694
10B09KCCVL9V$18.69200$0.09 4.8/72814.770.8784192
11B00HLK0KAW$29.99300$0.10 4.8/68924.770.8746092
12B002GU79G0$24.12150$0.16 4.8/43794.770.8388088
13B00BKNSV2A$72.50120$0.60 4.8/17444.750.7356577
14B071ZJHLJR$17.00150$0.11 4.8/9404.730.6344067
15B007L0DPE0$11.30150$0.08 4.7/707964.690.4413246
16B00K5NEPHG$53.62120$0.45 4.7/64454.670.3397636
17B010FAUO8C$44.49200$0.22 4.8/2934.670.3331035
18B0771XZF8F$25.65250$0.10 4.7/49464.670.3191833
19B01LZN2QD1$33.25200$0.17 4.9/864.660.2861730
20B07BWCTBBQ$20.49150$0.14 4.7/24524.660.2494026
21B00CDX2QWW$15.3990$0.17 4.9/624.620.062367
22B007KL6SP8$39.6060$0.66 4.7/7164.620.048835
23B01A8ZCLOE$38.9960$0.65 4.9/554.60-0.02918-3
24B0007YCC7S$24.98150$0.17 4.6/188704.58-0.12983-14
25B09VH42YTL$40.0060$0.67 5.0/224.53-0.41413-43
26B0B11R9NWQ$42.30180$0.24 4.8/574.51-0.53135-56
27B00ESWBE1U$37.6260$0.63 4.6/4994.50-0.56755-60
28B082P9FRLS$269.85540$0.50 4.5/4874.40-1.10399-116
29B0BW2VX2M3$19.2060$0.32 4.4/223194.39-1.18307-124
30B000OQA3SE$47.00120$0.39 4.5/1034.28-1.72540-181
31B07KQWXRGM$80.96180$0.45 4.2/122024.18-2.27069-238
32B0BX7JBZG7$19.9960$0.33 4.5/304.10-2.70671-284
33TotalMean4.610.000000
34Std Dev0.191.00000104.8959
35Max4.790.95333100
Sheet1
Cell Formulas
RangeFormula
H5:H32H5=AmazonRtg([@[Amazon Rating]])
I5:I32I5=ZScore([@[Discounted Rating]],TblVitamins[[#Totals],[Discounted Rating]],AdjRtgStdDev,"HiLo")
J5:J32J5=[@[Z Score]]/ZScoreMax*100
H33H33=SUBTOTAL(101,[Discounted Rating])
I33I33=SUBTOTAL(101,[Z Score])
J33J33=SUBTOTAL(101,[Z Max =100])
H34H34=STDEV.S(TblVitamins[Discounted Rating])
I34I34=STDEV.S(TblVitamins[Z Score])
J34J34=STDEV.S(TblVitamins[Z Max =100])
H35H35=MAX(TblVitamins[Discounted Rating])
I35I35=MAX(TblVitamins[Z Score])
J35J35=MAX(TblVitamins[Z Max =100])
F5:F32F5=[@Price]/[@Quantity]
Named Ranges
NameRefers ToCells
AdjRtgMean=TblVitamins[[#Totals],[Discounted Rating]]I5:I32
AdjRtgStdDev=Sheet1!$H$34I5:I32
ZScoreMax=Sheet1!$I$35J5:J32


Here's the code that adjusts the ratings. I have not added error checking.

VBA Code:
'================================================================================================
'             Amazon Rating Adjustment Function

' Adjust (devalue) the rating based on the number of reviews.
' Return the low end of the confidence interval range.

'   pRtgRevs = r.r/nnn
'       r.r = Amazon rating
'       nnn = Number of reviews

' For the power function relating confidence interval to number of reviews
'   confidence interval = AmzCoef * NumReviews ^ AmzExp
' The adjusted rating = rating - confidence interval

'   To Do
' Add error checking

'   Change Log
' 05/19/23  Created
'================================================================================================
Function AmazonRtg(pRtgRevs As String) As Double

Const AmzCoef As Double = 2.20296467  'The coefficient of the power function
Const AmzExp As Double = -0.5         'The exponent of the power function
Dim arrParms As Variant               'The result of the split of rtg/#revs

arrParms = Split(pRtgRevs, "/")       'Split the rating and the #reviews
'if ubound
AmazonRtg = arrParms(0) - AmzCoef * arrParms(1) ^ AmzExp

End Function

And here the Z Score code:


Code:
'================================================================================================
'                   Calculate the Z Score

'   pVal     The value to compute the Z Score for
'   pMean    The mean of the sample
'   pStdDev  The standard deviation of the sample
'   pOrder   "HiLo" = normal order (high values as better), such as for ratings
'            "LoHi" = inverted order (low values are better), such as for prices

'    Change Log
' 09/20/22  Created for my weighted rating system
' 10/09/22  Handle data errors
'================================================================================================
Function ZScore(ByVal pValue As Variant, ByVal pMean As Double _
              , ByVal pStdDev As Double, ByVal pOrder As String) As Double
Application.Volatile

'Check that pOrder is valid
If Not (UCase(pOrder) = "HILO" Or UCase(pOrder) = "LOHI") Then
  ZScore = CVErr(xlErrValue): Exit Function: End If

' If the value is not a number, return zero,
' which is the same as setting it to the average of the other values.
If Not WorksheetFunction.IsNumber(pValue) Then  'If not a number,
  ZScore = 0: Exit Function: End If               'Return zero
' If std dev is zero, return 0; else calculate Z Score
If pStdDev = 0 Then                   'If std dev = 0,
  ZScore = 0                            'Return 0
Else                                  'Else
  ZScore = (pValue - pMean) / pStdDev   'Calculate the ZScore
  If UCase(pOrder) = "LOHI" Then      'If range order is reversed,
    ZScore = -ZScore: End If            'Reverse the ZScores
End If

End Function
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,112
Members
453,021
Latest member
Justyna P

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