Thursday, 10 July 2014

Excel DSTDEV Function

Microsoft Excel DSTDEV Function

Basic Description

The Excel Dstdev function calculates the sample standard deviation of a field (column) in a database for selected records only. The records to be included in the calculation are defined by a set of one or more user-specified criteria.
The syntax of the function is :
DSTDEV( database, field, criteria )
where the arguments are shown in the table below:

database-A range of cells containing the database. The top row of the database should specify the field names.
field-The field (column) within the database, for which the sample standard deviation is to be calculated.
This can either be a field number, or it can be the field name (ie. the header in the top row of the database) encased in quotes (eg. "Subject", "Name", etc)
criteria-A range of cells that contain the criteria, to specify which records should be included in the calculation.
The range can include one or more criteria, which are presented as a field name in one cell and the condition for that field in the cell below.
eg.
AgeName
>8Amy

Wildcards
You can also use the following wildcards in text-related criteria:
?    -    matches any single character
*    -    matches any sequence of characters
if you do actually want to find the ? or * character, type the ~ symbol before this character in your search.
eg. the condition "A*e" will match all cells containing a text string beginning with "A" and ending in "e".
The criteria supplied beneath each field heading can be either:
-a numeric value (including an integer, decimal, date, time, or logical value) (eg. 10, 01/01/2011, FALSE)
or
-a text string (eg. "Name", "Sunday")
or
-an expression (eg. ">8", "<>0")

Note that the Excel database functions are not case sensitive. So, for example, the criteria ="Name" will be satisfied by cells containing the text "Name" or "name".

Excel Dstdev Function Examples

ABCDE
1NameGenderAgeSubjectScore
2AmyFemale10Math63%
3AmyFemale10English78%
4AmyFemale10Science39%
5BillMale8Math55%
6BillMale8English71%
7BillMale8Science51%
8SamMale9Math39%
9SamMale9English52%
10SamMale9Science48%
11TomMale9Math78%
12TomMale9English69%
13TomMale9Science65%
The following examples are based on the simple database on the right, which stores the examination marks scored by four children in three different subjects.

Example 1

In the example below, the Dstdev function is used to find the sample standard deviation of scores obtained in English, by male students. The criteria are specified in cells G1 - H2 and the Dstdev formula is shown in cell G3.
GH
1SubjectGender
2EnglishMale
3=DSTDEV( A1:E13, "Score", G1:H2 )

The above Dstdev function calculates the sample standard deviation of the values in cells E6, E9 & E12, and therefore returns the value 10.4%.

Example 2

In the example below, the Dstdev function is used to find the sample standard deviation for the Math scores obtained by students over 8 years of age.
GH
1SubjectAge
2Math>8
3=DSTDEV( A1:E13, "Score", G1:H2 )
The above Dstdev function finds the sample standard deviation of the values in cells E2, E8 & E11 and so returns the value 19.7%

Note that, in the above two examples, instead of typing in "Score" for the field argument, we could have simply used the number 5 (to denote the 5th column of the database).

No comments:

Post a Comment