home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Explore the World of Soft…e: Engineering & Science
/
Explore_the_World_of_Software_Engineering_and_Science_HRS_Software_1998.iso
/
programs
/
statistc
/
ocvs9402.exe
/
OCINTRVL.DOC
< prev
next >
Wrap
Text File
|
1994-02-01
|
29KB
|
518 lines
┌───────────────────────────────────────────────────────────┐
│ OCINTRVL.EXE................ver.9402 │
├───────────────────────────────────────────────────────────┤
│ A MS-DOS Software System for... │
│ │
│ *** Simulation of the Operating Characteristic Curve *** │
│ for 1-, 2- or 3-Stage Acceptance Sampling │
│ Defined by Intervals of the Form │
│ <<< Sample Mean +/- K * Standard Deviation >>> │
│ (when Sampling from a Normal Distribution) │
├───────────────────────────────────────────────────────────┤
│ A Quality Assurance Training Tool: │
│ Statistics Committee of the QA Section of the PMA │
│ │
│ Bob Obenchain, CompuServe User [72007,467] │
└───────────────────────────────────────────────────────────┘
*** TABLE of CONTENTS ***
Introduction to use of Xbar+/-K*S Intervals in Acceptance Sampling. . 1
Single-Stage Normal-Theory Plans. . . . . . . . . . . . . . . . . . . 4
Normal-Theory Tolerance Intervals . . . . . . . . . . . . . . . . . . 5
Strategy for Use of OCintrvl. . . . . . . . . . . . . . . . . . . . . 6
Responding to OCintrvl Prompts. . . . . . . . . . . . . . . . . . . . 7
Numerical Example: IQL approximately 0.005. . . . . . . . . . . . . . 8
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
OCintrvl Software Update History. . . . . . . . . . . . . . . . . . .10
┌─────────────────┐
│ INTRODUCTION │
└─────────────────┘
A "normal" distribution is commonly characterized as "a Bell-Shaped
Curve" with...
68.27% of its total area inside +/-1 standard deviation of the mean,
95.45% of its total area inside +/-2 standard deviations of the mean, &
99.73% of its total area inside +/-3 standard deviations of the mean.
▄ █ ▄
▄ █ █ █ ▄
▄ █ █ █ █ █ ▄
▄ █ █ █ █ █ █ █ ▄
█ █ █ █ █ █ █ █ █
█ █ █ █ █ █ █ █ █ █ █
_ ▄ █ █ █ █ █ █ █ █ █ █ █ █ █ ▄ _
-3 -2 -1 0 1 2 3
│ │ Standard Deviations │ │
│ │ │<──68.27%─>│ │ │
│ │<────────95.45%───────>│ │
│<──────────────99.73%─────────────>│
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 2 of 10
But the above "theoretical" statements describe only the situation
where intervals are formed using the "true" mean and "true" standard
error of the normal distribution. In actual practice, one rarely
knows the true mean and variance of the distribution that one is
sampling from, let alone that one's distribution is truly normal.
Instead, one usually collects data to estimate the mean and variance.
From a random sample of N items, the sample mean is then defined as
Xbar = Sum of the X values divided by N. Similarly, the sample
variance is defined by S-squared = Sum of squared deviations of the Xs
from Xbar divided by (N-1); the sample standard deviation is S =
square-root of S-squared.
What, then, should one expect in the following sort of situation?
Suppose one takes a random sample of N items from a batch and
measures a characteristic, X, on each item ...where the
specification limits on X are [ LS <= X <= US ]. Furthermore,
suppose that one's Acceptance Sampling rule is of the form:
==========================================================
Accept Lot at Sampling Stage M if and only if the interval
[Xbar-KL*S,Xbar+KU*S] falls entirely within specification
limits, [LS,US].
======================================================
Note: Xbar and S at stage M are computed using all measurements
from stages 1 to M, and the K for each stage is a fixed constant
that may depend upon, say, the total sample size, N[1]+...+N[M],
accumulated through stage M and/or the K's from other stages.
KL and KU above are positive constants. Default K-factor values
are KL=KU at each stage; an "asymmetrical" plan results when KL
and KU differ at one (or more) stages of the sampling.
OCintrvl.EXE then uses Monte-Carlo simulation to answer the question...
┌─────────────────────────────────────────────────────────────────────┐
│ What would be the probability of lot acceptance in 1-, 2- or │
│ 3-stage sampling plans using Xbar+/-K*S intervals, assuming that │
│ all observations are statistically independent and identically, │
│ normally distributed? │
└─────────────────────────────────────────────────────────────────────┘
OCintrvl.EXE uses "state-of-the-art" techniques to generate pseudo-
random variates that are (as closely as possible) truly independent
and normally distributed with mean zero and variance one. Note that,
if the true process mean is µ and true process standard deviation is
σ, then the Z-scores for the upper and lower process specification
limits, US and LS, would be
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 3 of 10
US - µ LS - µ
ZU = ────────── and ZL = ────────── .
σ σ
Specification limits need to be expressed as Z-scores to allow
OCintrvl to simulate all possibilities and yet actually use only the
mean=0 and variance=1 choice of scaling. Furthermore, OCintrvl treats
only the following six levels of true process capability...
Capability One-Tailed Two-Tailed
Level Fraction Process Z Score Z Scores
"name" Nonconforming YIELD [-7.5, ZU ] [ ZL, ZU ]
========== ============= ========== ========== ==============
"6 Sigma" 0.0000034 99.99966% 4.500 -4.645,+4.645
0.0005 99.95% 3.291 -3.480,+3.480
"3 Sigma" 0.005 99.5% 2.576 -2.807,+2.807
0.01 99% 2.326 -2.576,+2.576
"2 Sigma" 0.05 95% 1.645 -1.960,+1.960
0.10 90% 1.281 -1.645,+1.645
NOTES: One-Tailed limits of the form [-ZU,+7.5] would give the exact
same results as the [-7.5,+ZU] limits that are simulated. And
the chances of a normal (mean=0,variance=1) random variable
being greater than +7.5 or less than -7.5 are less than 1 chance
in a billion.
Technically, Motorola "6 Sigma" capability actually requires
that the specification range, US-LS, be 12*σ in length. But
the process mean is allowed to vary from the spec centerpoint,
(US+LS)/2, by +/-1.5*σ. As a result, the process mean ends up
being at least 4.5*σ from the nearer spec limit. Thus the above
"symmetric" 2-tailed Z-spec limits of [-4.645,+4.645] are not
truly Motorola "6 Sigma." On the other hand, each tail then
contributes 1.7 parts-per-million nonconforming. These two
tails thus sum to the same 3.4 parts-per-million found in the
"essentially" one-tailed [-7.5,+4.5] Z-limits.
"2 Sigma" and "3 Sigma" capability could be defined by the
2-Tailed ranges [-2.0,+2.0] and [-3.0,+3.0]. But "2 Sigma"
capability is widely accepted as implying 95% yield, and
[-2.0,+2.0] would correspond to the slightly higher yield of
95.45%. There is considerably less agreement on which yield
corresponds to "3 Sigma" capability. But the most frequently
heard "3 Sigma" yield is 99%, while [-3.0,+3.0] has yield 99.73%.
Here, the "compromise" yield of 99.5% is used for "3 Sigma."
OCintrvl Simulation Strategy:
=============================
OCintrvl always generates exactly N1+N2+N3 pseudo-random variates to
represent a single lot/batch of production. At each capability level,
stage 1 calculations use only the first N1 pseudo-observations. If a
lot fails at stage 1 for a given capability level (i.e. given "width"
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 4 of 10
between spec limit Z-scores), the first N1+N2 observations are used in
stage 2 calculations. Similarly, lot failure at stage 2 results in
use of all N1+N2+N3 of the pseudo-observations at stage 3.
Note that the exact same N1+N2+N3 pseudo-observations for a lot are
used at all 6 levels of process capability. This is a so-called
Monte-Carlo "swindle" that assures that accept/reject results are as
highly, positively correlated over capability levels as is possible.
This tactic assures that the simulated OC curves will be "smooth" in
the following sense. If an acceptance probability is either over-
estimated or under-estimated relative to its (unknown) true value, the
acceptance probabilities at adjacent capabilities should also tend to
deviated from their true values in the same direction.
┌──────────────────────────────────────┐
│ Single-Stage Normal-Theory Plans │
└──────────────────────────────────────┘
In his 1967 Technometrics paper, Owen tabulates the factors, K, that
yield SINGLE STAGE acceptance sampling plans based upon Xbar+/-K*S
intervals with 10% consumer's risk at UQL levels (see below) of 10%,
5%, and 1%, which are three of the levels simulated in OCintrvl.
Here are 10 rows and 4 columns extracted from Table II (39 by 7) of
Owen(1967); equivalently, see Table 5 (49 by 8) of Odeh and Owen(1980).
===================================================
K factors for 2-sided acceptance sampling plans that
"control the center" of the process distribution
...i.e. allow all lower vs. upper tail
splits in defectives with UQL=p1+p2.
===================================================
N UQL=.10 UQL=.05 UQL=.01
*** ******* ******* *******
2 10.253 13.090 18.500
5 2.742 3.400 4.666
10 2.112 2.576 3.532
15 1.981 2.395 3.219
20 1.916 2.312 3.090
25 1.877 2.262 3.017
50 1.794 2.154 2.859
100 1.744 2.089 2.764
500 1.686 2.013 2.654
infinity 1.645 1.960 2.567
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 5 of 10
Here are 10 rows and 4 columns extracted from Table III (39 by 7) of
Owen(1967); equivalently, see Table 6 (49 by 8) or Table 1.5.1 (196 by
8) GAMMA = 0.90 of Odeh and Owen(1980).
====================================================
K factors for 1-sided acceptance sampling plans and
tolerance intervals and for 2-sided acceptance
sampling plans that "control both tails" separately
...i.e. the lower(p1) tail and/or upper(p2) tail
is controlled at a specified fraction defective;
in 2-tailed acceptance sampling, overall UQL=p1+p2.
====================================================
N p=.10 p=.05 p=.01
*** ****** ****** ******
2 10.253 13.090 18.500
5 2.742 3.400 4.666
10 2.066 2.568 3.532
15 1.867 2.329 3.212
20 1.765 2.208 3.052
25 1.702 2.132 2.952
50 1.559 1.965 2.735
100 1.470 1.861 2.601
500 1.362 1.736 2.442
infinity 1.282 1.645 2.326
Example 1: Suppose the sample size is to be N=10. Then K=2.568
assures that the probability of rejecting batches with more than 0.05
defective in either tail will be at least 0.90. But a factor of only
K=2.112 is adequate to assure that the probability of rejecting
batches with more than 0.10 defective (divided ANY WAY between the
upper and lower tails) will be at least 0.90.
Example 2: Again suppose the sample size is to be N=10. But now we
desire a plan with a UQL of 0.06 in which 0.05 defective is allowed in
the lower tail but only 0.01 is allowed in the upper tail. This is an
"asymmetrical" 2-sided plan that rejects when Xbar-2.568*S is less
than the lower specification limit OR Xbar+3.32*S is greater than the
upper specification limit.
┌───────────────────────────────────────┐
│ Normal Theory Tolerance Intervals │
└───────────────────────────────────────┘
The K-factors for 1-sided acceptance sampling and 1-sided statistical
tolerance bounds given above were identical. On the other hand,
K-factors for 2-sided acceptance sampling (control the center) and
statistical tolerance intervals are NOT identical.
In their 1980 monograph, Odeh and Owen tabulate K-factors for 2-sided
procedures under normal distribution theory with true mean and true
variance both unknown. In both cases, the intervals of interest are
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 6 of 10
of the Xbar+/-K*S form. In acceptance sampling applications, K is set
to establish, say, the 10% UQL. In tolerance interval applications, K
is set to assure stated statistical confidence that at least a stated
minimum percentage of a normal distribution falls within the interval.
For example, Table 3.5.1 of Odeh and Owen(1980), page 102, shows how
the (90% minimum content; 90%, 95% and 99% statistical confidence)
tolerance interval K-factors decrease as the sample size, N,
increases. This is the basic information needed to compare Xbar+/-K*S
tolerance intervals with 2-sided acceptance sampling intervals.
=======================================================
K factors for tolerance intervals (control the center);
Content GAMMA = 0.900; Confidence .900, .950 and .990.
=======================================================
N P=.900 P=.950 P=.990
*** ****** ****** ******
2 15.512 18.221 23.423
5 3.499 4.142 5.387
10 2.546 3.026 3.958
15 2.285 2.720 3.565
20 2.158 2.570 3.372
25 2.081 2.479 3.254
50 1.918 2.285 3.003
100 1.823 2.172 2.855
500 1.717 2.046 2.689
infinity 1.645 1.960 2.576
Note that, in very large samples, the K-factors for tolerance
intervals given here approach the K-factors for single-stage, 2-tailed
acceptance sampling plans (control the center) given above. However,
especially in small samples, the K-factor appropriate for acceptance
sampling can be considerably SMALLER that the corresponding K-factor
for a tolerance interval.
┌──────────────────────────────────┐
│ Strategy for Use of OCintrvl │
└──────────────────────────────────┘
One plausible strategy for study of Multi-Stage Acceptance Sampling
properties of Xbar+/-K*S intervals using OCintrvl.EXE would be to...
(1) use values such as those tabulated above to study trade-offs
in the relative sizes of the K and the corresponding accumulated
N within each stage,
(2) consider tactics such as K1=K2=K3 or even K1<K2<K3 as well as
the K1>K2>K3 ordering suggested by N1<N1+N2<N1+N2+N3,
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 7 of 10
(3) simulate the probability of batch/lot acceptance for these
K's and N's at each of the above six stated levels of true
process capability, and
(4) repeat steps (1) to (3) to find both 2-stage and 3-stage plans
that have "similar" AQLs, IQLs, and/or UQLs to those of 1-stage
plans.
AQL = Acceptable Quality Level
= Fraction Nonconforming corresponding to Yield >= 95%.
IQL = Indifference Quality Level
= Fraction Nonconforming corresponding to 50% Yield.
UQL = Unacceptable Quality Level
= Fraction Nonconforming corresponding to Yield <= 10%.
Note: Do not fail to note any implied changes in administrative
and inspection load (assay manpower and cost) measured by the
"expected number of stages" and "expected sample size" required
to reach a pass/fail decision using a 2- or 3-stage procedure
relative to a 1-stage procedure with a "similar" OC curve.
┌────────────────────────────────────┐
│ Responding to OCintrvl Prompts │
└────────────────────────────────────┘
The OCintrvl.EXE software module is invoked from MS-DOS by entering its
7-character name, OCintrvl, at your DOS prompt...
Prompt> ocintrvl
OCintrvl does not expect nor accept any "command-line" arguments.
Instead, OCintrvl will prompt you to provide all information it needs
to perform analyses. And each such prompt usually displays a [default
value] in square brackets that you may accept by simply pressing the
ENTER key.
OCintrvl Output File Naming Conventions...
-----------------------------------------
The ASCII (text) files used by OCintrvl to save results consist of a
filename (of at most eight characters) specified by the user followed
by the four character extensions of ".OUT" and ".CSV".
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 8 of 10
┌────────────────────────────────────────────────┐
│ 1-, 2- and 3-Stage Plans with IQLs about 0.005 │
└────────────────────────────────────────────────┘
An initial run of OCintrvl.EXE was first used to establish that the
[Xbar-K*S,Xbar+K*S] interval for single-stage acceptance sampling
with K = 2.64 when N = 25 has an IQL (50% yield) at approximately
0.5% nonconforming (the 3-sigma capability level.)
Suppose your task were to design both a 2-stage plan (with sample
sizes N1=N2=25) and a 3-stage plan (with sample sizes N1=N2=N3=25)
that have this same approximate IQL.
First, note that K = 2.64 when N = 25 corresponds to a statistical
[Xbar-K*S,Xbar+K*S] tolerance interval with approximately 95%
confidence in 95% probability content under normal theory. This
observation encouraged me to try using K factors such as K2 = 2.382
(at N1+N2=50) and K3 = 2.286 (at N1+N2+N3=75), but the resulting
yields at 0.5% nonconforming were much larger than 50%.
Thus I decided to look for 2- and 3-stage plans with the same final
stage K factor is the 1-stage plan (K1=2.64 for N1=25) but larger K1
or K1,K2 factors than the single stage plan. In the table of K
factors for 95% confidence, 95% content tolerance intervals, I
simulated OC curves using early-stage K factors suggested by sample
sizes less than 25. I ended up using the N=15 factor of K=2.96 in
both the 1st stage of a 2-stage plan and the 2nd stage of a 3-stage
plan. Plus I used the N=10 factor of K=3.39 in the 1st stage of the
3-stage plan. Here are the results...
┌──────────────────────────────────────────────────────────────┐
│ 3-Stage Sample Sizes = 25, 25 and 25. │
│ Corresponding Numerical Values of K = 3.39, 2.96 and 2.64. │
│ │
│ p PaC PaV SSC SSV StgC StgV │
│ 0.0000034 100.00 100.00 25.37 25.44 1.01 1.02 │
│ 0.0005000 99.63 99.92 40.06 41.86 1.60 1.67 │
│ 0.0050000 43.53 66.09 67.18 69.21 2.69 2.77 │
│ 0.0100000 12.14 27.39 72.40 73.41 2.90 2.94 │
│ 0.0500000 0.03 0.07 74.99 74.99 3.00 3.00 │
│ 0.1000000 0.01 0.00 75.00 75.00 3.00 3.00 │
└──────────────────────────────────────────────────────────────┘
where...
p = True Process Fraction Nonconforming (Capability Level)
PaC = Percentage Yield when Off-Center (1-tailed case)
PaV = Percentage Yield as Variance Increases (2-tailed)
SSC = Average Sample Size when Off-Center
SSV = Average Sample Size as Variance Increases
StgC = Average Number of Stages when Off-Center
StgV = Average Number of Stages as Variance Increases
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 9 of 10
┌──────────────────────────────────────────────────────────────┐
│ 2-Stage Sample Sizes = 25 and 25. │
│ Corresponding Numerical Values of K = 2.96 and 2.64. │
│ │
│ p PaC PaV SSC SSV StgC StgV │
│ 0.0000034 100.00 100.00 25.02 25.02 1.00 1.00 │
│ 0.0005000 98.62 99.57 29.73 30.50 1.19 1.22 │
│ 0.0050000 47.99 62.98 43.21 44.25 1.73 1.77 │
│ 0.0100000 19.73 31.85 46.84 47.52 1.87 1.90 │
│ 0.0500000 0.18 0.38 49.94 49.96 2.00 2.00 │
│ 0.1000000 0.00 0.00 50.00 50.00 2.00 2.00 │
└──────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────┐
│ 1-Stage Sample Size = 25. │
│ Corresponding Numerical Value of K = 2.64. │
│ │
│ p PaC PaV SSC SSV StgC StgV │
│ 0.0000034 99.99 100.00 25.00 25.00 1.00 1.00 │
│ 0.0005000 94.40 95.99 25.00 25.00 1.00 1.00 │
│ 0.0050000 46.77 54.64 25.00 25.00 1.00 1.00 │
│ 0.0100000 25.26 31.72 25.00 25.00 1.00 1.00 │
│ 0.0500000 0.90 1.54 25.00 25.00 1.00 1.00 │
│ 0.1000000 0.05 0.09 25.00 25.00 1.00 1.00 │
└──────────────────────────────────────────────────────────────┘
where...
p = True Process Fraction Nonconforming (Capability Level)
PaC = Percentage Yield when Off-Center (1-tailed case)
PaV = Percentage Yield as Variance Increases (2-tailed)
SSC = Average Sample Size when Off-Center
SSV = Average Sample Size as Variance Increases
StgC = Average Number of Stages when Off-Center
StgV = Average Number of Stages as Variance Increases
Source Code...
==============
The C-language source code file, OCintrvl.C, used to create OCintrvl.EXE
is provided in the distribution archive.
OCintrvl.EXE, ver.9402 . . . . . . . . . . . . . . . . Page 10 of 10
┌─────────────────────────────────────────────────────────────────────┐
│ REFERENCES │
└─────────────────────────────────────────────────────────────────────┘
AMERICAN NATIONAL STANDARD ANSI/ASQC A1-1987. "Definitions, Symbols,
Formulas, and Tables for Control Charts." Milwaukee: American
Society for Quality Control.
L'Ecuyer, P. (1988). "Efficient and Portable Combined Random Number
Generators." Communications of the ACM 31, 742-749,774.
Obenchain, R.L. (1993). NORMAL.EXE: An Archive of MS-DOS Personal
Computer Software for Simulating the Statistical Confidence
and Probability Content of Normal Theory Tolerance Intervals.
[Content.EXE, Content.DOC, and Numerical Example Files.]
CompuServe, IBMAPP, Library 13 (Tech/Engr/Sci).
Odeh, R. E. (1978). "Tables of two-sided tolerance factors for a
normal distribution." Communications in Statistics, Simulation
and Computation, B, 7:183-201.
Odeh, R. E. and Owen, D. B. (1980). Tables for Normal Tolerance
Limits, Sampling Plans, and Screening. New York: Marcel Dekker.
Owen, D. B. (1967). Variables sampling plans based on the normal
distribution." Technometrics 9:417-423.
OCintrvl Software Update History:
================================
Version 9310 ...Beta-Test version of OCintrvl.EXE.
Version 9311 ...Write OC and Avg. Sample/Stage results to a separate
CSV file.
...Add 2- and 3-Stage sampling options.
...Created this documentation file.
Version 9402 ...Add Owen(1967) tables.
...Add simulation of asymmetrical acceptance plans.