DStDev and DStDevP Aggregate Functions in Access
StDev & StDevP - 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.
Below is a simple example that calculates the sample and
population standard deviation for the quantity shipped field.

Sample standard deviation code is the record source for
the unbound field in the form footer:
=DStDev("Quantity","shipping")
The population statistic is as follows:
=DStDevP("Quantity","shipping")
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:

The sample StDev standard deviation code is as follows:
=DStDev("Quantity","shipping","Shipper_Id=1")
And, the StDevP population calc is similar:
=DStDevP("Quantity","shipping","Shipper_Id=1")
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.