<%dim crumb crumb="DStDev & DStDevP Functions" crumb1="Statistical Calculations in Access" %> DStdev and DStdevP Access Functions
Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
<% response.write crumb1 %> <% response.write crumb2 %>
Home > MS Access Tutorials > VBA Aggregate Functions<% response.write " > " & crumb %>

Dlookup Function Example
Compound Dlookup Code
DMin & DMax Examples
DStDev & DStDevP Function


Microsoft Office VBA :
  MS Access 2003
  Access 2007
  Access 2010
  Access 2013
  Access 2016

DStDev Standard Deviation Function
DStDevP Population Standard Deviation Functions in Access

StDev Function & StDevP Function - calculate the sample (recordset) standard deviation and an estimate of the population standard deviation. It is nice to have some statistical measures immediately available to you with a single command. With the standard deviation, count, and mean you can generate a large number of statistical functions such as correlation coefficients.  Combine these with the histogram example and you can also figure out kertosis and skewness.  You can create your own custom functions which can be called directly from an Access SQL query for the more advanced statistical measures. Below is a simple example that calculates the sample and population standard deviation for the quantity shipped field. stdev function example

Sample standard deviation code is the record source for the unbound field in the form footer:


The population statistic is as follows:


Note that each of the statistical measure work on the entire Shipping table and ignores any filtering done on the form.

In the following example we restrict the calculations to only include those quantities for FedEx shipments:

stdevp function example

The sample StDev standard deviation function code is as follows:


And, the StDevP population standard deviation function calculation is similar:


To restrict the calculations to a subset of the shipping table records use a query as the source for the form and restrict the query based on a form field. Refer to the query name rather than the table name 'shipping' in the Dstdev code.

Contact Information

<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>