Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Functions

D2 Function

computes the expected value of the sample range.

Syntax

D2(n)

where n is the sample size, with 2\leq n\leq 25.

Description

The D2 function returns the expected value of the sample range of n independent, normally distributed random variables with the same mean and a standard deviation of 1. This expected value is referred to as the control chart constant d2. The values returned by the D2 function are accurate to ten decimal places.

The value d2 can be expressed as

d_2 = \int_{-\infty}^{\infty} [ 1- (1-\Phi(x))^n
 -(\Phi(x))^n ] \; dx

where \Phi(\cdot) is the standard normal cumulative distribution function. Refer to Tippett (1925). In other chapters, d2 is written as d2(n) to emphasize the dependence on n.

In the SHEWHART procedure, d2 is used to calculate control limits for r charts, and it is used in the estimation of the process standard deviation based on subgroup ranges. Also refer to the ASQC Glossary and Tables for Statistical Quality Control, the ASTM Manual on Presentation of Data and Control Chart Analysis, Kume (1985), Montgomery (1996), and Wadsworth and others (1986).

You can use the constant d2 to calculate an unbiased estimate (\hat{\sigma}) of the standard deviation \sigma of a normal distribution from the sample range of n observations:

\hat{\sigma} = ({sample range})/d_2

Note that the statistical efficiency of this estimate relative to that of the sample standard deviation decreases as n increases.

Examples

The following statements result in a value of 2.3259289473:
   data;
      constant=d2(5);
      put constant;
   run;

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.