0

I have data of jobs (A), their executions (B) and duration (C) in my Google Sheet. I have already calculated the average duration of each job with Query language:

SELECT A, B, AVG(C) GROUP BY A, B

How do I calculate standard deviation?

I found the discussion suggesting usage of ARRAYFORMULA and calculating standard deviation from original math equations but I'm looking for a simpler solution.

0

It always helps to be able to see the actual sheet and data. However, you can run STDEV on a QUERY or on the data it produces.

So let's say you have your QUERY in E2: =QUERY(A:C, "Select A, B, AVG(C) GROUP BY A, B)

That would put your numbers in Column G. So, say in H2, you could use =STDEV(G2:G).

Alternatively — if you didn't need to see the original QUERY output, just the STDEV of it — you could run the STDEV on a QUERY of the QUERY itself: =STDEV(QUERY(QUERY(A:C, "Select A, B, AVG(C) GROUP BY A, B), "SELECT Col3"))

Based on your data, you may need STDEVP instead of STDEV.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.