What is the DSTDEV function?
=DSTDEV(database, field, criteria)DSTDEV treats the field values of the matching records as a sample and returns their standard deviation. Its conditions are written as a separate table on the sheet.
The sample standard deviation divides the sum of squared deviations by (count-1) and takes the square root, so at least 2 numbers must match.
Arguments
- database
- The whole list. The first row must hold the headers.
- field
- The column to calculate: a column number (the first column is 1), a header name such as "Sales", or a cell holding the header (D1).
- criteria
- The criteria table. Its first row uses the same headers as the database, with the conditions below.
DSTDEV examples
Example 1. Basic use
=DSTDEV(A1:D9, 4, F1:F2)The sample standard deviation of the Seoul sales 45000, 25600 and 96000: about 36362.8.
Example 2. Only one number
=DSTDEV(A1:D9, 4, F5:F6)Only one number matches, so #DIV/0!.
Common mistakes
Mixing it up with the population version
If the matching values are the whole population, use DSTDEVP.
Leaving the header out of the criteria range
The first row of the criteria range must be a header. Without it, the first condition is read as the header.
FAQ
- How does it relate to STDEV.S?
- It is the same as STDEV.S on only the matching values.
- Variance?
- DVAR is the sample variance of the same values: the square of DSTDEV.