Question

I have a table which describes "Products Per User" distribution. It has 2 columns nProducts and nUsers: First row has values nProducts = 1, nUsers = 60000, meaning 60000 users bought 1 product.

Second row has values nProducts = 2, nUsers = 20000, meaning 20000 users bought 2 products, and so on...

I want to calculate its STDEV. How do I do it in excel?

In addition, could you tell me how to calculate in excel how many users bought:

nProducts > thresh?

Thanks Li

Was it helpful?

Solution

Do you mean you want to calculate the standard deviation of the number of products bought? Try this "array formula"

=STDEV(IF(B2:B10>=TRANSPOSE(ROW(INDIRECT("1:"&MAX(B2:B10)))),A2:A10))

confirmed with CTRL+SHIFT+ENTER

So in a small example if you have 1 product bought by 4 people and 2 products bought by 3 people that will give you the standard deviation of the following values

1,1,1,1,2,2,2

Is that what you need?

Note that you can also use this "non array" version

=(SUMPRODUCT((A2:A10-SUMPRODUCT(A2:A10,B2:B10)/SUM(B2:B10))^2,B2:B10)/(SUM(B2:B10)-1))^(1/2)

which calculates standard deviation by calculating the square root of the average of the squared differences of the values from their average value

OTHER TIPS

Just select all the second column values.

Then on the Ribbon bar:

  1. go to Forumulas
  2. click More Functions
  3. select Statistical
  4. click on STDEV.P

At this point as parameters you should have your second column already selected, just clik OK and you will have your Standard Deviation calculated.

In case you can write it manually the formula is =STDEV.P(B2:B10)

I supposed you have values from the 2nd to the 10th row in column B.

Thanks, Mucio

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top