Chapter Contents |
Previous |
Next |
SCHART Statement |
See SHWSARL in the SAS/QC Sample Library |
This example illustrates how you can compute the average run length of an s chart. The data used here are the power measurements in the data set TURBINE, which is introduced at "Creating Standard Deviation Charts from Raw Data" .
The in-control average run length of a Shewhart chart is ARL = [1/p], where p is the probability that a single point exceeds its control limits. Since this probability is saved as the value of the variable _ALPHA_ in an OUTLIMITS= data set, you can compute ARL for an s chart as follows:
title 'Average In-Control Run Length'; proc shewhart data=turbine; schart kwatts*day / outlimits=turblim nochart; data arlcomp; keep _var_ _sigmas_ _alpha_ arl; set turblim; arl = 1 / _alpha_; run;
The data set ARLCOMP is listed in Output 40.2.1, which shows that the ARL is equal to 358.
Output 40.2.1: The Data Set ARLCOMP
|
title 'Average Run Length Analysis'; data arlshift; keep f f_std p arl_f; set turblim; df = _limitn_ - 1; do f = 1 to 1.5 by 0.05; f_std = f * _stddev_; low = df * ( _lcls_ / f_std )**2; upp = df * ( _ucls_ / f_std )**2; p = probchi( low, df ) + 1 - probchi( upp, df ); arl_f = 1 / p; output; end; run;
The data set ARLSHIFT is listed in Output 40.2.2. For example, on average, 53 samples are required to detect a ten percent increase in (a shifted standard deviation of approximately 219). The computations use the fact that has a distribution with ni-1 degrees of freedom, assuming that the measurements are normally distributed.
Output 40.2.2: The Data Set ARLSHIFT
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.