0% found this document useful (0 votes)
461 views117 pages

A 279481

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 117

TECHNICAL REPORT RD-SE-94-1

~LOT

SAMPLNG (LAVAS) USER'S GUIDE

ACCEPTrANCE VIA AITRIBUTES

_!

Patrick B. Lawler Jr. System Engineering and Production Directorate Research, Development, and Engineering Center

Mach 1941

S?2
MAY, a9,1
35898-5000

DT

m Ftecftcorne A~resonmI, ^1ADabm.


Approvedfor public release; distributionis unlimited

94-13854

I
SMI FORM 1021, 1 AUG 85 PREVIOUS EDITION IS OBSOLETE
L

--

081

DESTRUCTION NOTICE
MR 1CLASSIrID DOCUMENTS, 10L.W TIM 13OCEDUEms 11

DOD 5200.22-N, INDUSTRIAL SECURITY MANUAL,

SECTION

11-19 OR DoD 5200.1-1, INFOMATION SECURITY PROGAM REGULATION, CAPE IX. FOR UICLASSIFIX, L-IITED DOCONETS, DESTROY BY ANY ETHD THAT WILL PREVENT DISCLOSURE oF CONTUTS OR RECONSTRUCTION or THE

DOC-lT.

DISCLAIIER
THE FINDINGS IN THIS REPORT AIE NOT TO BE CORSTRUID AS AN OFFICIAL DEARTMUNT OF THE hill POSITION UIZUSS SO DESIGNATED BY OTHER AUTHORIZED DOCUMETS.

TRADE NAMES
USE OF TRADE RANKS OR MANUFACTURERS IN THIS REPORT DOES NOT CONSTITUTE AN OFFICIAL NDORST OR APPROVAL OF THE USE OF SUCH COI]ECRCIAL IlAWARE OR

SOFTARE.

UNCLASSIFIED
Maryev MEW= OF

REPORT DOCUMENTATION PAGE


14. REPORT SECU11iTY CLASSIFICATION 2&. SICUHITY CLASSIFICATION AUTHO=TY Its. 06CLASSEFICA0#NID00
A.

1b. RESTRICTV

MARKINGS

3. DISTRISUITIOtdIAVAILAUNITV OF REPORT

RAD0ING SCHEDULE

Approved for Public Release; Distribution is Unlimited


MONITQMNG4 ORGANIZATION REPORT t4UMIEW(S

PRFOMIN N RPOR ORGAMM NU80.

TR-RD"SE--94--1
A. N"AM Or. PiRpopmNIG OGANIzATION

System Engineering and Production


RlT)&F. renter

64L Off"C SYMIOL of'*""iNCiN' ASIR-EE

7A. NAME 0; MONITORING ORGANIAT"O

SL. ADDRESS (Oty. Slate. wWW3W CdJ

7I ADDRESS (Oty. Slate.anZI

ft

Commander, U. S. Army Mfissile Command ATTN: AMSMI-RD-SE--EA


NAME 4111. OF FN0GIMNORaaG S.OFF"C SYMBOL.

I PROCUREMENT INSTRUMENT IDENTIFICATION NUMBER

S.ADDRESS (Cfty. Sr~tat

n65WC0J

PROGRAM ELEMEN NO. I. - ITUi (kodude S*awii CAUW&AW"

10. SOURC

OF FUNDINdG NUMUERS

PROJECT NO.

AEIOKtT to

-VOKUI

Lot Acceptance Via Attributes Sampling (LAVAS) User's Guide


12. P AL AUT

I(S

Patrick B. Lawler____________________
13a. TYPE OF REPORT

Final

IFROM_______''WI

13b. TIME COVERED

1M.W

(Yoar. MorU. 0a)

________
itS. PAGE COUNT 127

10. SUPPLEMENTARY NOTATION I a. SUBJECT TEiMS (Candow * romn N swmecmay and idmm

17.
FIELD

COSArI CODES
GROUP WIUGROUP

yb

W*~be,

19. ABSTRAC

(COOWN an hUWISI owl if UN(Uul7 -

IAIV

110CMoc Wboc

This user's guide describes an automation which will assist the user in the design and risk assessment of attributes sampling plans used in lot acceptance or for quality surveillance. This automation, entitled Lot Acceptance Via Attributes Sampling (LAVAS), provides for the construction of Operating Characteristic (OC) Curves and Average Sample Number (ASN) plots for single sampling, double sampling, multiple sampling, sequential sampling, and truncated sequential sampling plans. The OC Curves and ASN plots make exclusive use of the Binomial or Hypergeometric distributions for probability calculations, depending upon the conditions of application. This probabilistic approach will increase the precision of the probability of acceptance and the expected sample size to a decision since no approximation techniques, such as the Poisson and/or Normal, are used. Additionally, LAVAS provides specific design options which will expedite the design of sampling plans which are subject to risk constraints at specified quality levels.
20. DISTRINUTiONtAVAILASUTY OP ABSTRACT 0 SAME AS XPT. ED MCASIwIECuWAnIb 22s. NAME OF RESPONSIBLE MIOIIDUAL OICMPS L 21. AIISTRACT SECURITY CLASSIFICATION

UNCLASSIFIED

'_

22b. TELEPHONE tOdUd ARNa Od

22C. OFFI

YMB L

DO FORM 1473, " MAN

83 APR **'t'on Ia, bem umeo sa tgwleJTY

OLASSIFICATOON 00 THIS PAGE_

All00Wedewo;aftemwle.UNCLASSIFIED i/(ti. Blank)

TABLE OF CONTENTS Page

I.

LOT ACCEPTANCE VIA ATTRIBUTE SAMPLING (LAVAS) .........


................. A.. Acceptance Sampling Scope .... B. Types of Attribute Acceptance Sampling Plans ................... C. Sampling Plan Evaluation ..................................... ......... D. Binomial Versus Hypergeometric Applications E.Summ ary ...................................................

1 1

1
2 5 6 7

H.

SOFTWARE ILLUSTRATIONS ....................................

A. Lot Acceptance Via AttrbuteSampling (LAVAS)

.................

7
7 22 37
SO 56

B. SngleSampleDesgnandAssessment ............... ....... . C. Double SamplngDesgn andAssessment D. Multiple Sampling Plan Design and Assessment...............

E. Sequential Sampling Design and Assessment .....................


III. CONCLUSIONS AND EXTENSIONS ............................... REFERENCES ................................................. APPENDIX A: LAVAS's SOURCE CODE .......................... APPENDIX B: SINGLE SAMPLING DESIGN AND ASSESSMENT SOURCE CODE .................... APPENDIX C: DOUBLE SAMPLING DESIGN AND ASSESSMENT SOURCE CODE ....................

44

F. Truncated Sequential Sampling or Any Convergent Plan Assessment. G. Summary ...................................................

57
$9 A-1 B-1 C-1 D-1 E-1

APPENDIX D: SEQUENTIAL SAMPLING SOURCE CODE ......... APPENDIX E: MULTIPLE SAMPLING SOURCE CODE ............

APPENDIX F: SPECIAL PURPOSE ASSESSMENT SOURCE CODE . F-1

LooAsslon For ITIS GRA&I DTIC TAB Unannoiwced

Dits~ibutiaa

Av&U ability
Diet

oV ou

Speolal

L /

LIST OF ILLUSTRATIONS

1. 2. 3. 4.

OC Curve for a 'Lower is Better' Quality Characteristic ............... OC Curve for a 'Higher Is Better' Quality Characteristic .............. ASN Plot for n=50, c=2 with and without Sample Termination .......... M ain Menu ..................................................... Single Sampling Menu ........................................... Binomial OC Curve for n=50,c=l .................................. Sampling Termination OC Curve .................... Sampling Termination ASN Plot ................................... Hypergeomeic OC Curve for n=50,c=1, and Lot Size=144 ............ ............................. Double Sampling Menu ......... Double Sampling Binomial OC Curve .............................. Double Sampling Binomial, No Sampling Termination, ASN Plot ........ Double Sampling Hypergeometric OC Curve ........................ Double Sampling Hypergeometric, No Sampling Termination, ASN Plot ....................................................... Multiple Sampling Via Double Sample with Sample Termination, OC Curve ...................................................... Multiple Sampling Via Double Sample with Sample Termination Average Sample Number Plot ..................................... Multiple Sampling Plan Design Menu ............................... Multiple Sampling Plan, Option 1 Output for AQL = 2 Percent and LTPD z 12 Percent ........................................... OC Curve for Optional Multiple Sampling Plan #1 ................... ASN Plot for Optional Multiple Sampling Plan #1 (without Sample Termination) ........................................ aResults ............. MIL.-ST1051) Multiple Sampling Plan ........ OC Curve for Mlb-STD-101) Multiple Sampling Plan ASN Plot for MIL-STD-10D Multiple Sampling Plan ................ Parametric OC Curve for Wald's Sequential Sampling Plan ............ Parametric ASN Plot for Wald's Sequential Sampling Plan ............. OC Curve for the Truncated Sequential Sampling Plan ................ ASN Plot for the Truncated Sequential Sampling Plan ................. Cluster Sampling OC Curve ....................................... Cluster Sampling ASN Plot .........................................

3 4 5 7 8 9 12 13 14 23 25 27 28 28 31 32 38 39 40 41 42 43 43 49 50 52 53

5.
6. 7. 8. 9. 10.

11.
12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

55 56

iv

LIST OF TABLES

1. 2. 3. 4.

Tabular OC Curve Points for n=50, c=1 ............................. Single Sampling with Termination .................................. Tabular OC Curve Points for n=i0, c=1, and Lot Size=144 ............. Option 2 Prompt Response Summary ............................... Optional Feasible Single Sampling Plans ............................ Single Sampling Plans for an Indifference Quauty of 10 Percent ......... Single Sampling Plans for Point of Control Equal 2 Percent and Probability of Acceptance Equal 99 Percent ...................... Single Sampling Plans for Point of Control Equal 12 Percent and Probability of Acceptance Equal S Percent ....................... Binomially Feasible MIL-STD-105D Single Sampling Plans ............ Hypergeometric Feasible MIL-STI.10SD Single Sampling Plans ....... Double Sampling Binomial Option Input ............................ OC Curve and ASN Points Versus Percent Defective for Double Sampling (Binomial) ............................................. OC Curve and ASN Points Versus Percent Defective for Double Sampling (Hypergeometric) ....................... ............... Multiple Sampling Plan Resulting f~im Sample Termination of Double Sampling Plan ............................................. OC Curve and ASN Points from Multiple Sampling Via Double Sample with Sample Termination .................................. Poisson Approximated Double Sampling Plans in which the Second Sample isnwice the First ..................................... Poisson Approximated Double Sampling Plans in which the First and Second Samples are Equal ................................ Double Sampling Prompt/Response Data ............................ MIL-STD-10$D Double Sampling Plans Meeting the Design Tolerances (Binomial Evaluation) ............................ MIL-STD-10SD Double Sampling Plans Meeting the Design Tolerances (Hypergeometric Evaluation) ...................... OC Curve/ASN Points for Optional Multiple Sampling Plan #1 .........

10

U
15 16 17 18 19 20 21 22 24 2S 29 30 32 33 35 36 37 37 40

5.
6. 7. 8. 9. 10.

U.
12. 13. 14. 15. 16. 17.

18.
19. 20. 21.

LIST OF TABLES (continued)

22. 23. 24. 25. 26. 27.

OC Curve/ASN Points for MIL-STD-105D Multiple Sampling Plan ..... IntegerIzed Sequential Sampling Plan Specification ................... Parametric OC Curve and ASN Plot Points .......................... A Sequential Sampling Plan Truncation Alternative ................... Probability of Acceptance and Expected Sample Size for the Truncated Sequential Sampling Plan Alternative .................. Sequential Versus Truncated Sequential Comparison .................. Cluster Sampling Constraints ..................................... Cluster Sampling Acceptance/Rejection Criteria ....................

44

46
47 51 53 53 54 54 55

28.
29. 30.

Truncated Versus Cluster Sampling Comparison .....................

vi

I.

LOT ACCEPTANCE VIA ATrRIBUTE SAMPLING (LAVAS) A. Acceptance Sampling Scope

A substantial portion of quality assurance deals with acceptance sampling. One facet of this ongoing effort deals specifically with attribute sampling in which a sampled unit is judged to be conforming or nonconforming, good or bad, successful or unsuccessful, hit or miss, reliable or failed, and so on. A unit's performance is classified in one of two ways. The purpose of acceptance sampling attributes is to perform a hypothesis test which will lead to a decision to accept or reject an inference concerning the ratio of the number of units possessing one attribute classification to the total number of units comprising the population. In the case of missiles and/ or rockets, acceptance sampling is performed as a milestone which precedes the initial acceptance of a lot and as a means of monitoring stockpile reliability after the lot becomes government property. It is pertinent to emphasize that acceptance sampling is not an attempt to estimate or control lot quality. Moreover, it is but one part of the decision process which ultimately leads to the acceptance or rejection of defined inferences pertaining to lot quality. The act of accepting or rejecting is subject to the possibility of being the wrong act. That is, one might accept when the correct decision should be to reject, or one might reject when the correct decision should be to accept. A comprehensive analysis of any sampling plan should include a complete assessment of the probability of making the wrong decision. Additionally, the comprehensive analysis should also assess the sampling burden imposed by the sampling plan. The classical approach to these two assessments involve the construction of two schematics, the Operating Characteristic (OC) curve and the Average Sample Number (ASN) plot. The OC curve provides a graphical representation of the relationship between the sampling plan's probability of acceptance and the appropriate quality characteristic. The ASN plot serves the purpose of graphically illustrating the relationship between the expected number of samples to a decision, to accept or reject, and the appropriate quality characteristic. These two schematics will be discussed in greater detail subsequently. B. Types of Attribute Acceptance Sampling Plans The simplest type of acceptance sampling plan is the single sampling plan. The mechanics are straightforward in that a random sample of size n is drawn from a lot or process. If the total number of defectives is less than or equal to the acceptance number (cl) the lot is accepted (i. e., the hypothesis that quality is at an acceptable level cannot be rejected). Single sampling plans are the simplest, conceptually, but they require a relatively large sample size when compared to other types of plans. To reauce the expected sampling burden subject to constraints on the risks, double sampling plans are sometimes used. A double sampling plan is specified by five numbers, cl, c2, c3, nl, and n2. The mechanics of the plan involve drawing a random sample of ni units. If cl or less defectives are found in the sample, the lot is accepted without further sampling. If the sample contains c2 or more defectives, the lot is rejected with no further sampling done on the lot. If the total number of defectives is greater than cl but less than c2, a second random sample of size n2 is drawn from the lot. If the cumulative number of defectives, from both samples, is less than or equal to c3, the lot is accepted. Otherwise, the lot is rejected. The economies realized in total samples required to a decision by instigating double sampling in lieu of single sampling are somewhat offset by the complexity associated with implementation. However, in the case of high unit cost, destructive testing, and relatively small lot sizes, the complexity involved with the implementation will yield significant dividends.
I

The minimum expected number of samples to a decision is obtained by the use of a sequential sampling plan, such as Wald's item-by-item sequential sampling plan. A detailed discussion of Wald's plan can be found in Reference 1. Let it suffice to say that a lot can be accepted or rejected after the sampling of a single unit. Some restrictions apply pertaining to the minimum sample size for both the acceptance and rejection ranges. There are several distinct disadvantages to Wald's plan which in many cases prevent it from being applied. Specifically, the administration burden of the plan is extremely high, the number of units sampled to a decision is variable for lots of equal quality, and the possibility exists that an entire lot can be sampled without a decision to accept or reject. Sequential sampling plans are often truncated to limit the maximum sample size and preclude the possibility of sampling the entire lot. When this is done, the resulting plan is no longer a theoretical sequential plan. It becomes a multiple sampling plan. Multiple sampling plans specify drawing a random sample whose size is a design specification of the plan. If the total number of defectives observed in the sample is less than or equal to the first sampling tier's acceptance number, the lot is accepted. If the total number of defectives is greater than or equal to the first tier's rejection number, the lot is rejected. In either case, the decision is made and sampling ceases. If the number of defectives is greater than the acceptance number and less than the rejection number, another sample is drawn. It is not often the case nor is it necessary for the sample sizes to be equal. Each sampling tier's sample size, acceptance number, and rejection number are design parameters of the plan. After this subsequent sample is drawn and the cumulative number of defectives tabulated, the composite number of defectives is compared to the new tier's acceptance number and rejection number. If the cumulative number of defectives lies between the acceptance and rejection numbers, another sample is drawn and the procedure is repeated. This repetitive procedure continues until the lot is accepted or rejected. A decision is guaranteed with a multiple sampling plan since the plan converges on the last sample. Convergence occurs when the acceptance number plus one equals the rejection number. In other words, there are no continuation numbers at the convergence sampling tier. Even though multiple sampling plans possess expected sample sizes to a decision which are numerically greater than those obtainable through sequential sampling, multiple sampling plans are more commonly used. This is probably due to the convergence feature and the somewhat reduced implementation burden. C. Sampling Plan Evaluation

The evaluation of a sampling plan generally consists of two pa's, an evaluation of the plan's effectiveness stated in terms of probability of acceptance versus the chosen quality characteristic and an evaluation of the plan's operating cost stated in terms of the expected number of units sampled to a decision versus the chosen quality characteristic. Both evaluations require consideration of the probabilistic aspects of the sampling implementation. The probability of acceptance of a given sampling plan is a function of the plan itself and a function of the quality of the population of units from which the sample are drawn. The designer can exercise control over the specifics of the sampling plan, such as the numeric values of sample size and acceptance numbers, but no control is extended to the quality of the population. Therefore, the probability of acceptance must be examined over the entire range of values the quality characteristic can take on. This exercise is custcomarily accomplished by the use of a two-dimensional schematic called an operating characteristic curve, or simply OC curve. Figures I and 2 provide examples of OC curves commonly utilized. Figure 1 illustrates the case where the lower the numeric value of the quality characteristic, the better. Therefore, the
2

probability of acceptance is high for low values of the quality characteristic and is low for high values. The OC curve form shown in Figure I is the most frequently encountered and is appropriate when the quality characteristic is fraction defective or number of defectives per lot. Figure 2 provides an illustration of the case where the higher the numeric value of the quality characteristic, the better. This type of OC curve is frequently used when the quality characteristic is unit reliability or hit probability. Regardless of the numeric desirability of the quality characteristic, the OC curve provides a plot of the sampling plan's probability of acceptance versus

the entire range over which the quality characteristic can take on values.

P
0 so-

b b
I It

15 so 735
?a15 83Sm

y
0

of

53594:
4

P
t n
c

33
a6 25

15

Is-

Ouaity Characteristcl

Figure1. OC Curvefor a 'Lower is Better' Quality Characteristic

b b
t

IF

48 p t

25-

a.

C%

as-

tS

Quality characterIstle

Figure2. OC Curve for a 'Higheris Better' Quality Characteristic In a similar fashion, the expected number of units sampled to a decision is plotted versus the full range of the quality characteristic. This type of plot is called an ASN plot. Care must be exercised in dealing with ASN plots since there are two types, those in which sampling is terminated, or curtailed, and those in which sampling is not terminated. In the case of sample termination fewer units are sampled because sampling stops as soon as an appropriate rejection number is reached. Other economies are incurred via sample termination which further reduce the expected number sampled to a decision. Consider a single sampling plan in which the sample size is 50 with an acceptance number of 2. If 48 units are inspected and none are defective, the lot would be accepted without sampling the remaining 2 units. Figure 3 illustrates ASN plots which illustrate the contrast of instigating sample termination in this single sampling case as opposed to not instigating it. The plot shown in Figure 3 is based on a Binomial probability evaluation of the single sampling example.

SItthou, 45

Sample

Termination

4.

5 -

With

Sample

Termination

30

2'

is

S PERCD4Tf DMCITIVC

II

Figure3. ASN Plotfor n=50,c=2 with and without Sample Termination D. Binomial Versus Hypergeometric Applications

In lot acceptance sampling of attribute variables, event probabilities should be calculated by either the Binomial distribution or the Hypergeometric distribution. Historically, approximation techniques involving the Poisson distribution and the Normal distribution have been used to alleviate much of the calculation burden associated with the Binomial and the Hypergeometric. With the proliferation of personal computers and their expanding computational capabilities, it is no longer necessary to resort to these approximation techniques and incur the resulting error. This increase in precision can be extremely important in applications involving the destructive testing of high dollar units such as missiles or rockets. This increased precision is the rationale upon which the software described herein is based. All sampling plan assessments performed by this software are based strictly on one of two scenarios: (1) Scenario #1 - A lot is submitted for sampling which possesses a finite size, N, and a finite number of defectives, M. When n units are sampled at random, the probability that exactly X defectives will be found in the sample is given by the Hypergeometric distribution as, S, N( K M,! n! (N n)! (n-X)!(N-M-n+X)! X! (M-X)! N! (1)

Reference 1 states that this type of analysis leads to a Type A OC curve. To avoid confusion between Type A and Type B OC curves, all Type A curves provided by this source code will possess an X axis which is labeled defectives per lot. All Type B curves' X axis will be labeled

percent defective.
(2) Scenario #2If the units of production come from a process which is in

'statistical control', producing products which possess a

probability of being defective equal to p, and one desires

the proportion of lots of size N that will be accepted, then


the Binomial distribution should be used to calculate the probability. Specifically, when n units are randomly selected, the probability that exactly X will be defective

is given by the expression, p(Xn,M,N)


pX( n! n - X)! pX! p)n-X

(2)

All probability evaluations provided by this software are based on either Equation (1) or Equation (2). The appropriate selection is a user option which can be exercised via embedded response prompts. E. Summary

Section II provides a series of examples that, taken as a whole, constitute an exhaustive illustration of the software's applicability, input requirements, and output descriptions. The examples begin with single sampling plan design and assessment and progressively step though double sampling, multiple sampling, sequential sampling, and sequential plan truncation. In each case, the output will consist of an OC curve and an ASN plot which are free from approximation. Therefore, no spikes or points of discontinuity will be present in the schematics as is often the case when one switches approximation techniques. Section III provides a brief conclusion and extension discussion of the program's current status and envisioned enhancements. An attempt is made throughout this guide to provide a generic description of this software to divorce

the use from a particular type of computer.


The appendixes contain the existing source code for the entire program. As currently programmed, the code is written in Hewlett-Packard Enhanced BASIC which is acceptable on an -P9945B desktop computer. Upon reviewing the code contained in the appendixes, the reader will quickly see the similarity between the Enhanced BASIC code and classical FORTRAN (i.e., IMAGE statements are FORMAT statements, FOR/NEXT loops are DO loops, and variable names are structured alike except that in Enhanced BASIC only the first letter of the variable name is capitalized). In short, minimal effort will be required to reprogram the source code to FORTRAN or BASIC for compatibility with various host computers. The graphical segments of the source code provided may be more challenging to convert, but the simplistic design of the logic flow is readily transferable to modem graphic packages.

H.

SOFTWARE ILLUSTRATIONS A. Lot Acceptance Via Attribute Sampling (LAVAS)

The main program, entitled Lot Acceptance Via Attribute Sampling (LAVAS), serves to dimension the program variables, to input the standard values, to display the main menu containing the primary analysis options, and to load and execute the selected option. The source code comprising LAVAS is provided as Appendix A to this report. Figure 4 provides an illustration of the main menu which contains the five analyses options. This menu is displayed at the outset of program execution and immediately precedes the first user prompt for interactive input. The remainder of this section is devoted to describing, by example, each of the five options itemized in Figure 4. LOT ACCEPTANCE SAMPLING OPTIONS A ssnt1 SnSion Desirgtion "> Single Sampling Design And Assessment ............ "> Double Sampling Design And Assessment ............ "> Multiple Sampling Design And Assessment .......... "> Sequential Sampling Design And Assessment ......... "> Truncated Sequential Sampling or Any Convergent Plan Assessment (i.e., OC Curve & ASN Curve) ....... "> Program Termination ............................ Code 2 2 3 4 5 6

ENTER THE SELECT CODE OF THE DESIRED OPTION. Figure4. Main Menu B. Single Sample Design and Assessments

This segment of the software deals exclusively with single sampling by attributes and allows for five design and/or assessment options as shown in Figure 5. The first option, entitled 'OC Curve/Risk Assessment for a Specific Plan', is the fundamental risk assessment for single sampling plans. These single sampling plan are completely described by a sample size and an acceptance number. The rejection number is assumed to be equal to the acceptance number plus one, in all cases. By entering a I after the prompt shown in Figure 5, the user will access an option that will provide an operating characteristic curve for any specified single sampling plan. A series of user prompts will be display at that time which are designed to accrue the input required for the assessment.

> Single Sampling Plan Option Menu <


goton Description Select.Code >OC Curve/Risk Assessment for a Specific Plan ........................... 1

>Plan Derivation for Given AQL, LTPD, ALPHA and BETA ................. >Plan Derivation for a Single Point of Control at the Indifference Quality (Poisson Based) ............................................. >Plan Derivation Using J.M. Cameron's Poisson Approximation of the OC Curve ......................................................... >Plan Derivation Via MIL-STD-105D Search for Specified AQL, LTPD, ALPHA, and BETA ................................................. EXIT This Segment of the Program .................................... ENTER THE SELECT CODE OF THE DESIRED OPTION.
Figure5. Single Sampling Menu

2 3 4 5 6

1. OC Curve/Risk Assessment for a Specific Plan Two types of assessments are available, one based on a Binomial distribution evaluation of probabilities and one based on a Hypergeometric evaluation of probabilities. Dr. Acheson J. Duncan provides a detailed discussion of the assumptions and conditions pertaining to the applicability of each assessment type [1]. Therefore, a discussion of this topic will not be reiterated. Moreover, let it suffice to say that if a finite lot size is under investigation, the Hypergeometric should be used. Otherwise, the Binomial is appropriate. The assessment, in this single sampling case, is primarily the OC curve. The ASN plot is a horizontal line, if sampling termination is not imposed, hence a plot option was not included. However, an average sample number plot, with sampling termination, is obtainable for sample sizes of 50 or less by exercising Option 5 of the main menu. This will be illustrated for the Binomial case, and it is also available for the Hypergeometric case. Sample termination alters the average sample plot and the OC curve from that derived for the single sampling application because sampling termination transforms the single sampling plan into a multiple sampling plan. a. Binomial Evaluation of Single Sampling The two assessment types, discussed above, are applied at the user's discredion and are readily chosen by the prompt responses. Specifically, immediately following the entry of a 1 for the prompt shown in Figure 5 the user will be prompted for sample size. Then a prompt will signal entry of the acceptance number. These two entries are required for either assessment type. After the acceptance number is entered, the software will display the prompt, 'DO YOU HAVE A FINITE LOT SIZE?'. If the appropriate response is 'YES', then a Hypergeometric assessment will be performed which will be valid only for the finite lot size. If the appropriate response is 'NO', then a Binomial assessment will be performed. 7b illustrate the output, a sample size of 50 and an acceptance number of I was used to respond to the identified prompts. The response to the finite lot size prompt was 'NO'.

The curve shown in Figure 6 was obtained after entering a specification of the desired range on the percent defective axis and a desired labeling interval. These entries were prompted. Table 1 contains specific points from the OC curve. The printing of such a table is a user option. Any number of points of interest can be included in such a table. The 13 points shown are provided purely for illustration purposes.
PacZ) Operating Cheracterfatio Curew Binomial Probabilties 'S 45 .5 48

tO0

Saaple Sizes 50 As.eptanos Numbers I

.5

as
as 35 as

4S

a~~I a13

MOW4

ZECTVE

am It i

It

Figue 6. Binomial CC Curve for n=50, c=I

Table 1. Tabular OC Curve Points for n=50, c-l


Single Sampling Plan: n = Sample and c = 1 (Binomial Distribution Probabilities) Probability of Aceptance Percent Defective
.5000 1.0000 97.3868 91.0565

Operating Charaicteristic (OQ Curve

2.0000
3.0000 4.0000

73.5771
55.5280 40.0481

5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 12.0000 15.0000

27.9432 19.0003 12.6493 8.2712 53238 3.3786 1.3099 .2905

Before proceeding to the Hypergeometric assessment, it is pertinent to point out that sampling termination impacts both the OC curve and the ASN plot for single sampling. To illustrate this, suppose in the previous example that sampling terminates if two defectives have accrued at any point in the sampling of 50. Further, if zero defectives have occurred after the 49th unit, the 50th unit is not sampled. Under this scenario, the single sampling plan becomes the multiple sampling plan tabularized in Table 2. By exercising Option 5 of LAVAS's menu, the output shown as Figures 7 and 8 can be obtained. A detailed discussion of the use and operation of Option 5 will be provided in a following section. This discussion of sample termination is presented here to emphasize that if the assumptions and conditions imposed by single sampling are modified in anyway, the resulting risks and expected sample size are also altered and require evaluation.

10

Table 2. Single Sampling with Termination


Total Number of Units Sampled 2 3 cumulative Acceptance Number (A) 0* 00 Cumulative Continuance Numbers (c) 0 0 m mx m m m mx x mKI m mx m mx m mx x m n mK mx 1 xx mx mx mx mx mn mx mx mx 1 m m m mx m mx Min m R mx mx -1 m m U = m ixm t mm c m x mx m 1 mx mX mX mX MM mC mX XXXMI 1 mx mi mc mx mM mx m MI EM 1 MM c mmx Mm mz mcsxxxx mx 1 m ms m mx Mm= m mx m rsx mx 1m x x m xxxxxxxx mx mm xxx 1mxxmM Cmix MM M mmx m 1 1 xxx m
M

Cumiulative Rejedfion Number (R) 2 2

4
5 6 7 8 9

00
* 00 00 0 00

x
x x x x x

0*
0 0 0

2
2 2 2 2 2

*T
0

10
11

0
0*0 ___
_ _ _

x
x

0
0

2
2

12
13

x
x0

0
x 0

2
2

mix mi x

MctXM

14 15 16 17 1819 20 21 22 23 24
25

0 0*0O
____x

___zx *g
__ ____

00
_ __ ___0 _ _ _

0 0 x 0 ;0 0 a01
0__

1 mx mmx mmx xx mmx nxmm x 1 m ms m mx x m mx Mt x m mrmn 1 mx MM M MC m Mo MM X M m ____ 1 m mmx xx mc m xx ma nMM 1 mn MM mc MM mc mx m in m 1m mmx x mx xxxxx mm mixm 1 mix m Mtmc ms otm MCI smx 1 mmx m M msMatm m ms mMxx mm mm mm x mx
M M

2 2 2 2 2 2 2 2
2

TxM 0
x
0 x x

ixm
x x

ssm
xx

sm
z

c
x

2
x

26 27

00
__0_

x
x

0
0

28
29__ __ _ __ __

0*
__ _ Is

0
0

1
-

m ms x mx x xxx mn mmxxxxxsmmxxx m= mx mM mc ZmZ XmZ


x a o c ot M

mn mx m mmxxzuX c mn mX m
a o a

2 2

30 31 32 33

see_

*0 00
___

34 35
36 37 38 39 40 41 42 43
44
____

00 00
00 00 0*0 0 00 00
go*__

00 00
____

45 46
47

000

48 49

50

matmmxxxinm mx MM mc mx mx mx mx M MM m MM x10 1 Mm Mm MM MMM 1 mi mM sm mc mM mx m x01mxmixssm Mmt ssmm xxxMr: x 0 1 m mxM mI xm m mc xxn m mt 0 1 mx sm mx mc mM m m ma MM o 1 mmxxx sm m mmx mm x mx x xO0 1m xxmmc otscnmcMrs mmc mx MM 0 1 mm MMMM mM mm x 0 1 mmz mmx otEtsmm mx mmx mx x x x x x z 0 1 m mz xx mz xx x 0 a M sc a c i C z c M__MM_ 0 1 m mix Mx m mmxxx MM z x0 1 Mm M m = mm M2 mm x10 1 in MM xx Ma a a Mm Ma mX mX m 0 1 mU xxx ZE MM mX In mx mx n JM=c moc mx mx 0 m* m m z 1 mC x x mmt xsm mm mmx mms mC xxx m mn mx mx mx m~c m xmM mn
x

xxs m

atmm

x x

0 0

i 1

mx

mx sm M M M M mi ms

2 2 2

2 2
2 2 2 2 2 2 2 2

2 2 2 2

11c

Patt
I.
75

79 So
35

asC

4. 45

a. N.
15

'3
?s

4m a-

LC

Figwwe 7. Sampling Termination OC Curve

12

49 'So ,

44 43 43

36 as
36 34

as

IN Its tt Is 14

in
t4

1 1

a 4 5 P(RCENr DErECTIVE

Figure& Sampling TerminationASK Plot


Upon comparing Figure 6 and Figure 7, it should be noted that the probability of acceptance differs for specific values of percent defective and that the shape of the curve differs for percent defective values less than or equal to 4 percent. Finally, the ASN plot, Figure 8, will continue the exhibited decay until it reaches a percent defective of 100 percent. At a percent defective of 100 percent, the plot stops at an ASN of two. b. Hypergeometric Evaluation of Single Sampling

If the response to the prompt concerning a finite lot size is 'YES', sampling from a finite population containing M units of one classification and N-M units of another classification is assumed, where N reresents the lot's size. The conditions are such that the Hypergeometric distribution is the appropriate vehicle for calculating probabilities of specific events. Heretofore, without the aid of computing equipment, analysts have resorted to approximation techniques, such as the Poisson and/or Normal, to avoid the calculation burden of the Hypergeometric. While expedient and labor saving for the analyst, the results are that approximations of risk and expected sample size have been applied to multi-million dollar tests. The cost of error resulting from approximations need not be incurred, henceforth.

13

To illustrate the output features, a sample size of 50, an acceptance number of 1, and a finite lot size of 144 were entered as responses to the sequential prompts. Paralleling the Binomial output, Figure 9 provides the operating characteristic curve and Table 3 provides the optional output of number of defectives per lot versus the probability of acceptance. Since the number of defectives per lot is a finite, integer, random variable, percent defective is also a finite random variable (i.e., number of defectives per lot times 100 divided by lot size). The instigation of sampling termination will alter the OC curve and the ASN plot in this application as it did in the Binomial evaluation discussed in the previous section. Option 5 of the main program's menu (Fig. 4) can be used to evaluate this scenario, as required for either the Binomial or

the Hypergeometric case.


PsIX) Operattng charaoterlstic Curve Iumbe.rs I

iW

Sample Size# S8 ficaptanc

Hyegemtl

Pll~l~.

78 P5

'5

So 65 45 4.

S 25

4 5 i6 7 a 9FCOKC1I40B PIM LAT

1 I

13

14

19

1i

FigreA9 HypergeometricOC Cuyve for n=50, c=1, and Lot Size=144


4.i iI

14

Table 3. Tabular OC Curve Points for n=50, c=1, and Lot Size=144 Operating Chracteristic (OC) Curve Single Sampling Plan: n=50 and c-l (Hypergeometric Distribution Probabilities) Defectives per Lot Pobability of Acceptance
0 100.0000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 24 30 35 36

100.0000 88.1022 72.3501 56.7657 43.1107 31.9362 23.1910 16.5629 11.6614 8.1079 5.5738 3.7924 2.5557 1.7068 1.1302 .1279 .0196 .0009 .0001 .0000

2.

Plan Derivation for Given AQL, LTPD, ALPHA, and BETA

This design option assists in the derivation of single sampling plans which pass, or nearly pass, through two points on the OC curve. The two points are (AQL, 1-ALPHA) and (LTPD, BETA). The use of this symbolism is in accordance with that most commonly encountered in statistical quality control literature where AQL is considered to be an acceptable quality level, LTPD is an unacceptable quality level, ALPHA is the producer's risk and BETA is the

consumer's risk. In reality, any two desired points on the OC curve can be used equally effectively as design goals. In its current software configuration, this option derives single sampling plans which meet design specifications on risks by strict use of the Binomial distribution to calculate

event probabilities. This limitation is not considered to be restrictive since any plan derived with
the Hypergeometric distribution would be valid only for the imposed lot size. The approach utilizing the Binomial distribution will enhance the precision of the design process over that achieved by using a Poisson or Poisson/Normal approximation approach.

15

Upon entering a 2 for the prompt illustrated in Figure 5, the user will be sequentially prompted for AQL, LTPD, ALPHA, and BETA. The inputting of these four percentages establishes the design goals of the plan. It is very improbable, due to the nature of the discrete random variables in this analysis, that a single sampling plan can be found which passes, exactly, through the two design goal points on the OC curve. Therefore, the next two prompts will request tolerance limits on the producer's risk and on the consumer's risk. The tolerance limits need not be equal to each other, and they can be zero if no tolerances exist. In an effort to address economical considerations, a prompt has been included to allow the user to place an upper limit on the sample size. If no upper limit is placed on the sample size, the software sets the limit equal to one-million. Additionally, the user has the option to limit the size of the acceptance number. After plans are analyzed for a specific acceptance number, the user will be prompted concerning the desire to increase the acceptance number by one and to continue the search. To illustrate the use of the software, the data shown in Table 4 was used to respond to the serial prompts. Additionally, the search was limited to acceptance numbers less than or equal to five. In this application, 27 single sampling plans were found which met the design specifications and constraints. These plans are enumerated in Table 5. Table 4. Option 2 Prompt Response Summary
Prompt Request AQL Response 2

LTPD ALPHA BETA ALPHA Toleranc BETA Tolerance


Maximum Sample Size

10 2 10 1 5
144

16

Table 5. Optional Feasible Single Sampling Plans


Optional Single Sampling Plans which Producer's Risk = 2.00 1.00% Consumer's Risk = 10.00+ 5.00% For AOL = 2.00% and LTPD = 10.00%
(Binomial

Probabilities)
Producer's Risk
1.48% 1.56% 1.65% 1.74%

Sample Size
72 73 74 75

Acceptance Number
4 4 4 4

Consumer's Risk
14.17% 13.37% 12.62% 11.89%

76 77 78 79 80 81 82 83 84 85 86 91 92 93 94 95 96 97 98 99 100 101
102

4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 $ 5 5 5
5

1.83% 1.93% 2.03% 2.13% 2.24% 2.34% 2.46% 2.57% 2.69% 2.81% 2.94% 1.01% 1.06% 1.11% 1.17% 1.23% 1.29% 1.35% 1.41% 1.48% 1.55% 1.62%
1.69%

11.21% 10.56% 9.94% 9.35% 8.80% 8.27% 7.77% 7.30% 6.85% 6.43% 6.03% 9.76% 9.22% 8.70% 8.21% 7.75% 7.31% 6.89% 6.49% 6.12% 5.76% 5.42%
5.10%

If no plans are found which meet the design specifications, the user will be
prompted to that effect and allowed to loosen the design tolerances and rerun the search proce-

dure. If loosening the design tolerances is infeasible, the user may exit the design routine. 3. Plan Derivation for a Single Point of Control at the Indifference Quality (Poisson Based)

Indifference quality, sometimes called the point of oontrol, is the fraction defective at which the probability of acceptance equals 50 percent. Conversely, the probability of rejection equals 50 percent, also. Single sample lot acceptance plans can be derived for this situation by simply calculating the sample size as

(C + . 06 7 )/p(50%)
17

(3)

where C is the acceptance number and p(50 percent) is the fraction defective at which the probability of acceptance is to be 50 percent. This relationship is credited to G.A. Cambell and is based on a Poisson distribution [2]. To access this segment of the software, the user must enter a 3 for the prompt shown in Figure 5. After doing so, the user will be prompted for the percent defective which is to possess a probability of acceptance of 50 percent. This is the only input required. The algorithm calculates sample size via Equation (3), integerizes the results, and prints the results for acceptance numbers ranging from 0 to 50. Since the resulting plans are based on a Poisson Assumption, the user should exercise Option 1 (Fig. 5), to obtain an exact risk evaluation for the use environment anticipated, be it Binomial or Hypergeometric. To illustrate the application of this option, an indifference quality of 10 percent was entered. The resulting plans are tabularized in Table 6. Table 6. Single Sampling Plans for an Indifference Quality of 10 percent
Sample Size Acceptance Number Sample Size Acceptance Number 17 177 0 7 18 187 1 17 19 197 2 27 20 207 3 37 21 217 4 47 22 227 5 57 23 237 6 67 24 247 7 77 25 257 8 87 26 267 9 97 27 277 10 107 28 287 11 117 29 297 12 127 30 307 13 137 31 317 14 147 32 327 15 157 33 337 16 167 Any of these plans can be evaluated by exerdsing Option #1 Sample Size 347 357 367 377 387 397 407 417 427 437 447 457 467 477 487 497 507 Acceptance Number 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

4.

Plan Derivation Using J.M. Cameron's Poisson Approximation of the OC Curve

As used within this computer program, Mr. J.M. Cameron's original intent has been somewhat modified. Reference 2 provides a detailed discussion of Mr. Cameron's approach to designing single sampling plans via Poisson approximations and two desired points from the OC curve. As applied herein, Mr. Cameron's Industrial Quality Control, Vol. 9, July 1952 table is utilized to provide the user with a single point of control at specific points on the OC curve. Namely, the user can stipulate the probability of acceptance to be 1, 5, 10, 50, 90, 95, or 99 percent for any specified percent defective. The resulting plans will approximate, via the Poisson, this single point of control for acceptance numbers ranging from 0 to 50. Exact risk assessments, via the Binomial or Hypergeometric are available through Option 1 of the menu shown in Figure 5.
18

Table 7 contains the output generated by entering a point of control of 2 percet and a probability of acceptance of 99 percent. Table 8 provids similar output derived from a point of control of 12 percent and a probability of acceptance of 5 percent. Table 7. Single Sampling Plans for Point of Control Equal 2 Percent and Probability of Acceptance Equal 99 Percent
Single Sample Sampling Plans

Sample Size 1 8 22 42 64 90 117 146 176 207 239 272 305 340 374 410 445 481 518 555 592

J. M. Cameron's Poisson Approximations where the Probability of Acceptance is 99.00% when the Percent Defective is 2.00% Percent Defective Specifications for which the Poisson Acceptance Approximation of the Probability of Acceptance is Number 50% 10% 5% 1% 99% 95% 90% 299.60 460.50 1.00 5.10 10.50 69.30 230.30 0 59.30 82.96 1.86 4.44 6.65 20.98 48.63 1 12.15 24.19 28.62 38.21 2 1.98 3.72 5.01 15.91 18.46 23.92 1.96 3.25 4.15 8.74 3 14.30 18.13 2.00 3.08 3.80 7.30 12.49 4 2.90 3.50 6.30 10.31 11.68 14.56 5 1.98 3.33 5.70 9.00 10.12 12.45 6 1.99 2.81 10.96 3.19 5.25 8.06 9.01 7 1.99 2.73 9.89 2.67 3.09 4.93 7.38 8.20 8 1.99 7.59 9.07 2.00 2.62 3.01 4.67 6.86 9 4.46 6.45 7.10 8.43 10 2.00 2.58 2.94 6.10 6.69 7.90 11 2.00 2.55 2.88 4.29 6.37 7.48 2.00 2.52 2.83 4.15 578 12 4.02 5.58 6.08 7.10 13 1.99 2.49 2.79 2.75 3.92 5.38 5.85 6.80 14 2.00 2.47 5.63 6.52 2.00 2.45 2.72 3.82 5.19 15 5.05 5.46 6.30 2.00 2.43 2.69 3.75 16 4.91 5.30 6.09 17 2oo 2.42 2.67 3,67 5.15 5.90 2.00 2.40 2.64 3.60 4.78 18 4.67 5.02 5.74 2.00 2.39 2.62 3.54 19 2.60 3.49 4.57 4.91 5.59 20 2.00 2.38

629
667 705 743 782 977 1177 1380 1586 1794

21

2.00

2.37

2.58

3.44

4.48

4.81
4.71 4.62 4 4.46 4.16 3.94 3.77 3.64 3.53

5.46
5.34 5.23 512 5.03 4.65 4.37 4.16 3.99 3.85

4.40 2.00 2.36 2.56 3.40 22 4.32 23 2.00 2.35 2.55 3.36 3.32 4.25 2.00 2.34 254 24 3.28 4.18 25 2.00 2.33 2.52 2.90 30 2.00 2.30 2.47 3.14 2.43 3.03 3.73 35 2.00 2.27 2.95 3.58 40 2.00 2.25 2.39 2.23 2.37 2.88 3.46 45 2.00 2.35 2.82 3.36 50 2.oo 2.22 Any of these plans can be evaluated by exercising Option #1

19

Table 8. Single Sampling Plans for Point of Control Equal 12 Percent and Probability of Acceptance Equal 5 Percent
Single Sample Sampling Plans

J.M.Cameron's Poisson Approximations


Sample Size where the Probability of Acceptance is 5.00% when the Percent Defective is 12.00% Percent Defective Specifications for which the Poisson Acceptance Approximation of the Probability of Acceptance is Number 5% 50% 10% 95% 90% 99% 11.98 9.21 .42 2.77 .20 .04 0 11.86 9.73 1.33 4.20 .89 .37 1 10.04 11.88 5.05 1.54 2.08 2 .82 11.93 10.28 5.65 2.68 2.10 1.27 3 10.38 11.89 3.16 6.07 1.66 2.56 4 11.95 6.44 10.54 3.58 2.03 2.97 5

25 40 53 65 77 88

1% 18.42 16.60 15.86 15.45 15.07 14.90

99
110 121 131 142 152 163 173 183 193 203 213 223 233 243 253 262 272 282 291 340 387 434 481 528

2.35

3.32

3.93

6.74

10.64

11.96
11.95 11.93 11.99 11.95 11.98 11.93 11.95 11.96 11.97 11.97 11.97 11.97 11.97 11.96 11.95 11.99 11.98 11.97 12.00 11.97 11.99 12.00 11.99 11.99

14.72
14.55 14.38 14.34 14.19 14.14 14.00 13.95 13.90 13.86 13.81 13.76 13.71 13.67 13.62 13.58 13.59 13.54 13.50 13.51 13.35 13.28 13.21 13.15 13.08

10.70 6.97 3.62 4.23 2.64 7 7.16 10.74 3.88 4.49 2.90 8 10.84 4.75 7.38 3.15 4.14 9 10.85 7.51 4.34 4.94 10 3.36 7.68 10.92 4.56 5.15 3.57 11 7.77 10.91 4.72 5.30 12 3.74 10.96 7.90 4.89 5.47 13 3.92 8.02 11.0 5.05 5.63 4.09 14 11.03 812 5.20 5.77 15 4.24 8.21 11.06 5.34 5.90 4.38 16 11.08 6.02 8.29 4.51 5.46 17 11.10 6.13 8.37 4.64 5.58 18 8.44 11.12 5.69 6.23 4.76 19 8.51 11.13 5.79 6.33 4.87 20 11.14 8.56 589 6.42 21 4.97 8.65 11.19 6.00 6.53 5.09 22 8.70 11.20 6.08 6.61 5.18 23 11.20 6.68 8.75 5.27 6.16 24 8.82 11.24 6.26 6.78 5.37 25 9.02 8.33 6.60 7.09 5.74 30 11.34 7.38 9.22 6.08 6.91 35 11.38 7.61 9.37 6.36 7.16 40 9.49 11.14 7.37 7.81 6.59 45 11.43 7.97 9.60 6.79 7.55 50 Any of these plans can be evaluated by exercizing Option #1

20

5.

Plan Derivation Via MIL-STD-105D Search for Specified AOL, LTPD, ALMHA, and BETA

The last single sampling option, (select code 5 in Fig.5), provides a risk assessment of the sampling plans contained in M.L-STD-105D against user specified risk thresholds. Specifically, all feasible combinations of acceptance numbers and sample sizes from MI.,-STD-105D's Single Sample Normal Inspection, Reduced Inspection, and Tightened Inspection are considered. Each possible plan's probability of acceptance is calculated for AQL and LTPD. The associated risks are then compared to the producer's and consumer's risk thresholds. If the calculated risks simultaneously meet the specified thresholds, the plan is printed for user consideration. Otherwise, the plan is not printed, and the search continues. The software's logic flow enables the user to: (1) input two desired points from the OC curve (i. e., [AQL, 1-ALPHA] and [LTPD, BETA]); (2) input acceptable tolerances on the risks; (3) constrain the maximum sample size; and (4) choose either the Binomial or Hypergeometric as a means for calculating event probabilities. After accruing the specified input, the examination of the possible MIL-STD-105D plans begins. If a plan meets all design constraints, it is printed. Otherwise, the search continues until all feasible single sampling plans contained in MIL--SID-105D are exhausted. To illustrate the use of this software segment, an AQL of 1 percent, an LTPD of 12 percent, a producer's risk of 5 percent, a consumer's risk of 25 percent, 5 percent tolerances on the risks, and a maximum sample size of 50 were entered in response to the sequential prompts. The results of the Binomial evaluation are summarized in Table 9. Additionally, the results of the Hypergeometric evaluation are summarized in Table 10 for a lot size of 200. Note that the risks for the same plans, in the two tables, are different. This is due to the finite lot size associated with the Hypergeometric. The risks will converge as the lot size approaches infinity. Table 9. Binomially Feasible MIL-SSTD-105D Single Sampling Plans Optional Single Sampling Plans Via MIL,-STD-105D For AQL = 1.00% and LTPD = 12.00% That meet Producer's Risk = 5.00 5.00% And meet Consumer's Risk = 25.00 5.00% ""Binomial Probabilities*" Maximum Sample Size Constraint: 50
Smple Accepte
Number

Producer's
Risk

Size
20
32

1
2

1.69%

.40%

Consumer's Risk 28.91%


24.40%

A complete OC Curve for any of these plans can be obtained by exercising Option 1 of this program segment.

21

Table 10. Hypergeometric Feasible MIL-STD-105D Single Sampling Plans Optional Single Sampling Plans Via UML-T-105D For AQL = 1.00% and LTPD = 12.00% That meet Producer's Risk = 5.00 5.00% That meet Consumer's Risk = 25.00 5.00% Lot size = 200 ****Hypergeometric Probabilities"* Maximum Sample Size Constraint: 50 Sample Size 20
32

Acceptance Number 1
2

Producer's Risk
.95%
0.00%

Consumer's Risk 27.38%


21.96%

A complete OC Curve for any of these plans can be obtained by exercising Option 1 of this program segment. C. Double Sampling Design and Assessment

Though conceptually easy to understand, single sampling is an expensive means of accomplishing acceptance sampling to r .;trol percent defective. A more economical means, probabilistically speaking, is available through double sampling. The potential savings are possible even when producer's risk and , qnsumer's risk are constrained to be constant at the levels incurred with single sampling. References I and 2 provide comprehensive discussions of the advantages of double sampling over single sampling; therefore, the reader can refer to those texts if further information is desired. If a 2 is entered for the prompt shown in Figure 4, the double sampling code will be loaded and executed. Shown in Figure 10 is a narrative which briefly describes the three double sampling options currently available. Option 1, accessed by a select code of 1, provides a probabilistic risk assessment of any specified double sampling plan using either the Binomial or the Hypergeometric distribution, depending upon the sampling constraints.

22

> Double Sampling Plan Option Menu <

Ootion DescriptionSectCd
>

Double Sample Operating Characteristic Curve Construction and Risk Assessment ............................................. > Double Sampling Plan Derivation, Via Poisson Approximation of ALPHA = 5% and BETA = 10% for Given Specifications of AQL and LTPD ............................................ > Double Sampling Plan Derivation from MII.,-STD-105D Acceptance/Rejection Numbers and all Stated Sample Sizes. This option provides a Binomial or Hypergeometric Assessment of Alpha and Beta for Stated AQL and LTPD values. The assessments are limited to the feasible combinations of sample size and accept reject numbers specified in MIL,-STD-105D ............................ > EXIT this Selected Option ..................................... ENTER THE SELECT CODE OF THE DESIRED OPTION. Figure10. Double SamplingMenu

1
2

3 4

Additionally, this option provides an ASN plot which is simply a plot of the expected number sampled to a decision to accept or reject versus the quality characteristic. The provided ASN plot is based on the assumption that no sample termination is allowed, that is two events are possible. Once a decision is made after the first sample, or the decision is made after the second sample. No decisions can be made except at these two points in testing. If sample termination is to be allowed for economic and/or logic reasons, the user can evaluate the impact of this departure, for double sampling plans with combined sample sizes less than or equal to 50, by using Option 5 of the main menu, (Fig. 4). This evaluation will take the form of an OC curve and an ASN plot which take into consideration the sample termination policy. Sampling termination basically transforms the double sampling plan into a multiple sampling plan. Option 2 of the double sampling section provides an automation which will assist in the design of double sampling plans in which the producer's risk is 5 percent and the consumer's risk is 10 percent. The two fraction defective values, corresponding to these two risk specifications, are considered to be variable user inputs. It is pertinent to point out that the AQL must be numerically smaller than the LTPD. The design algorithm is based upon the Poisson approximation procedure as identified by the Chemical Corps Engineering Agency [6]. The final double sampling option provides an automation which searches all feasible double sampling plans contained in MIL-STD-105D for those that satisfy the user's inputted design specifications. In other words, this portion of the software combines MIL-STD-105D sample sizes with acceptance/rejection numbers for Normal Inspection, Reduced Inspection, and Tightened inspection; calculates the producer's risk and consumer's risk for the inputted AOL and LTPD; compares these calculated risks to the user inputted target values plus or minus the tolerances, and prints the plan if the calculated risks are within the tolerance specifications. The exhaustive search includes all double sampling plans contained in MIL-STD-105D. A feasible double sampling plan is one in which the acceptance and rejection numbers are less than the corresponding sample size.

23

Before proceding to the illustration of these three software options, a word of caution must be given concerning double sampling plan specifications. A double sampling plan is specified by six numbers. The first of these numbers is the first sample's size and the second number is the acceptance number on the first sample. Often overlooked is the third number, the rejection number on the first sample. If the first sample's rejection number is not specified, it is customary to assume that it is equal to the rejection number on the second sample. The rejection number on the second sample must be numerically equal to the acceptance number on the second sample plus one. To avoid confusion and possible misunderstanding, the best choice is to specify all six numbers. 1. Double Sampling OC Curve Construction and Risk Assessment

Option I of Figure 10 is the basic assessment algorithm for double sampling in that it provides an evaluation of the probability of acceptance, OC curve, and an ASN evaluation. If selected, the user will be serially prompted for the first sample's size, the second sample's size, the first sample's acceptance number, the second sample's acceptance number, the first sample's rejection number and the second sample's rejection number. These six inputs completely specify the double sampling plan. Attention is then focused on the conditions under which the sampling will be done (i. e., from a finite lot size or from lots such that the probability of a defective is constant from trial to trial). Following the plan specification, the user will be prompted to enter a YES or a NO concerning the existence of a finite lot size. If the response is NO, the Binomial distribution is assumed applicable for computing probabilities. Otherwise, the Hypergeometric is assumed. To illustrate the Binomial evaluation, the data shown in Table 11 was entered for the serial prompts. When the finite lot size prompt was displayed, a NO was entered. Figure 11 provides a graphical illustration of the resulting OC curve while Figure 12 displays the plot of the ASN. The ASN plot shown in Figure 12 is based upon the assumption that no sample termination is instigated. Table 12 provides an itemization of the analysis findings for user inputted percent defectives. The scope of coverage of this table is left to the user's discretion. Table 11. Double Sampling Binomial Option Input
PROMPT
S

First Sample's Size Second Sample's Size

RESPONSE 12 24

First Sample's Acceptance Number Second Sample's Acceptance Number


First Sample's Rejection Number Second Sample's Rejection Number

0 3
3 4

24

POWU)

fire%ll.aples
gassed

OpeeSting ChaepeostIatle Curve n- Is I CI- a RI- I samples n- 24 s CM- 3 Na- 4


11ftIelal ProbabllItles

I3

Us

45 74

Im
Is

Is

ma
43 4.

am

aI

16

lit

14

19

18

26i

It

24

81

as

So

Figure11. DoubleSampling Binomial OC Curve Table 12. OC Curve and ASN Point Versus Percent Defective For Double Sampling (Binmial) Risk Evaluaton fo the Double Samtping Piln First Sample: n=12 Accept on 0, Reject on 2 Second Sample: ns:24 Accept on 3, Reject on 4

Defective
0.0000 1.0000 2.0000 3.0000 4.0000. .5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 11.0000 12.O000 13.0000

Percent

Acceptance
100.080 88.6385 T8.4717 69.3842 61.2710 2 4 54.0360 47.5920 41.8596 36.7666 32.247.5 28.24-30 24.6990 21..5671 18.8032

First Sample Risks

Continue

Plan Risks

Averageii

Rejecton
0.0000 .6175 2.3108 4.69 8.10935 SI 11.8360 15.9U45 20.3317 2C.68 29.4806 34.0898 38.6687 43.1412 47.4808

Acetne
100.0000 99.3640 97.4619 94.2558 89.7&38 32 84.2071 77.7819 '70.8113 63.5M9 56.4187 49.4920 42.9845 37.0059 31.6163

Rejecton
0.0000 .6360 2.5381 .742 10.2162 63 15.7929 22.2181 29.1887 36.4007 43.5813 .50.5080 .57.01.55 62.9941 68.3837

Stample
12.00 14.58 16.61 M18.1 19.3.5 20.19 20.75 21.07 21.21 21.19 21.04 20.79 20.47 20.09 "

Ig

0.0000 10.7441 19.2176 2.5.7.509 30.635.5 IS 34.1280 36.4535 37.8W8' 38.3W.2 38.2718 37.6573 36.6323 35.2916 33.7160

Ii1

42

25

Table 12. OC Curve and ASN Points Versus Percent Defective for Double Sampling (Binomial)

(continued)
Risk Evaluation for the Double Sampling Plan First Sample: n=12 Accept on 0, Reject on 2 Second Sample: n=24 Accept on 3, Reject on 4 (Binomial Distribution Probabilities) Average Plan Risks First Sample Risks Percent Sample Rejection Acceptance Rejection Continue Acceptance Defective Number Probability Probability Probability Probability Probability 14.0000 15.0000 16.0000 17.0000 18.0000 19.0000 20.0000 21.0000 22.0000 23.0000 24.0000 25.0000 26.0000 27.0000 28.0000 29.0000 30.0000 31.0000 32.0000 33.0000 34.0000 35.0000 36.0000 37.0000 38.0000 39.0000 40.0000 45.0000 50.0000 60.0000 70.0000 75.0000 16.3675 14.2242 12.3410 10.6890 9.2420 7.9766 6.8719 5.9092 5.0715 4.3440 3.7133 3.1676 2.6964 2.2902 1.9408 1.6410 1.3841 1.1646 .9775 .8183 .6832 .5688 .4722 .3909 .3226 .2654 .2177 .0766 .0244 .0017 .0001 .0000 31.9737 30.1218 28.2081 26.2718 24.3448 22.4528 20.6158 18.8494 17.1650 15.5707 14.0716 12.6705 113685 10.1647 9.0573 8.0431 7.1184 6.2789 5.5199 4.8364 4.2232 3.6753 3.1876 2.7550 2.3729 2.0365 1.7414 .7523 .2930 .0302 .0015 .0002 51.6589 55.6540 59.4509 63.0392 66.4132 69.5706 72.5122 75.2414 77.7635 80.0853 82.2151 84.1618 85.9351 87.5451 89.0019 90.3160 91.4975 92.5565 93.5026 94.3454 95.0936 95.7559 96.3402 96.8540 97.3045 97.6981 98.0409 99.1711 99.6826 99.9681 99.9985 99.9998 26.8356 22.6531 19.0365 15.9402 13.3109 11.0932 9.2328 7.6785 6.3838 5.3076 4.4138 3.6719 3.0560 2.5442 2.1185 1.7641 1.4687 1.2221 1.0162 .8441 .7002 .5800 .4795 .3956 .3256 .2673 .2188 .0767 .0244 .0017 .0001 .0000 73.1644 77.3469 80.9635 84.0598 86.6891 88.9068 90.7672 92.3215 93.6162 94.6924 95.5862 96.3281 96.9440 97.4558 97.8815 98.2359 98.5313 98.7779 98.9838 99.1559 99.2998 99.4200 99.5205 99.6044 99.6744 99.7327 99.7812 99.9233 99.9756 99.9963 99.9999 100.0000 19.67 19.23 18.77 18.31 17.84 17.39 16.95 16.52 16.12 15.74 15.38 15.04 14.73 14.44 14.17 13.93 13.71 13.51 13.32 13.16 13.01 12.88 12.77 12.66 12.57 12.49 12.42 12.18 12.07 12.01 12.00 12.00

26

24 JvNeoage 23

ma
to

4iret Sampls, Se-and S60ple6

Bawpl Number Curve pa- a c i- g n- 1i n24 Ci 3 fi. 4 Stnomlel PreoahlatI~lo

13 14

IS
is is IM 14

I S 3
4 2

a
9l a 4 6

PEf
a 19

DEFECTIVE
It 14 18 11 8 22l 2426 63

Figure12. DoubleSampling Binomia4 No Sampling Termination,ASAV Plot To illustrate the Hypergeometric evaluation, a YES was entered for the finite lot size prompL The preceding input prompts were repeated, from the Binomial illustration. Following the finite lot prompt, the user is prompted to enter the lot size. One-hundred fortyfour was entered in this illustration example. Figures 13 and 14 provide schematics of the resulting OC curve and ASN plot, respectively. Table 13 contains selected points on the OC curve and the plot Again, the number of points included in this table is the user's discretion.

27

IN P's.1)
s

first *popet%'* so"plo.

Cherem p Iatls CUp.O I a c1. a NJ a

Nl- 4 seem"d Samples fet 24 8 ca 3 LaS iSlne 144 PpegblbIItMeO so.p smgmimtll

SS 7 so . 7.

' \

4S

'S

'as

SO It I

14

WI It

U~ U8

1I U

38 BE 24

W I0

46

OC Curve Figure 13. Double SamplingHypergeometric,


JM 2,4 43s%
11S***" O 0

Plvperses """Isl li leg 5


*01 owill &4

NWOlMP. a Curve MI- a


ca 31at 0"

o-tio -. N'.l VOO"

Proba.bil itioes

Is 34Smq ta
7imSmlau-m

33Sae Is 14 Is 3 I?

apig e3 UUMTZVUPER LOT

aam.a

am

aw

Figure1F.Duble 13
as It
328 IS 14OICZ~C
1 . 3.

obeSampling Hyper

o metric CC Cwve;;jSN geem,

O
. . ; O; ; 4 l ; a;

II

iII

II

Fiue1.DubeSplnHpeem
S2

i,

oSplnTeintn

ANPt

p I

Table 13. OC Curve and ASN Points Versus Percent Defective for Double Sampling (Hypergeometric)
Risk Evaluation for the Double Sampling Plan First Sample: n=12 Accept on 0, Reject on 2 Second Sample: n=24 Accept on 3, Reject on 4 Lot Size = 144 (Hypergeometric Distribution Probabilities) First Sample Risks Plan Risks Average Defective Acceptance Continue Rejection Acceptance Rejection Sample Per Lot Probability Probability Probability Probability Probability Number 0 1 2 3 4 5 6 8 10 12 14 16 18 20 24 25 30 35 40 45 50 60 70 75 80 100 100.0000 91.6667 83.9744 76.8779 70.3351 64.3064 58.7548 48.9468 40.6610 33.6796 27.8131 22.8973 18.7900 15.3684 10.1746 9.1571 5.3301 3.0242 1.6682 .8921 .4609 .1090 .0212 .0085 .0032 .0000 0.0000 8.3333 15.3846 21.2893 26.1712 30.1436 33.3098 37.5911 39.6693 40.0815 39.2656 37.5751 35.2925 32.6409 26.8834 25.4365 18.6296 12.9607 8.6102 5.4741 3.3315 1.0755 .2824 .1320 .0574 .0007 00000 -. 0000 .6410 1.8328 3.4937 5.5500 7.9354 13.4621 19.6697 26.2389 32.9213 39.5276 45.9175 51.9906 62.9420 65.4063 76.0402 84.0151 89.7216 93.6338 96.2076 98.8154 99.6965 99.8595 99.9394 99.9992 100.0000 100.0000 99.3590 98.1672 96.3650 93.8782 90.6770 82.3030 72.0200 60.9395 50.0868 40.1896 31.6419 24.5619 14.4320 12.6036 6.4119 3.3138 1.7349 .9053 .4631 .1091 .0212 .0085 .0032 .0000 0.0000 -. 0000 .6410 1.8328 3.6350 6.1218 9.3230 17.6970 27.9800 39.0605 49.9132 59.8104 68.3581 75.4381 85.5680 87.3964 93.5881 96.6862 98.2651 99.0947 99.5369 99.8909 99.9788 99.9915 99.9968 100.0000 12.00 14.00 15.69 17.11 18.28 19.23 19.99 21.02 21.52 21.62 21.42 21.02 20.47 19.83 18.45 18.10 16.47 15.11 14.07 13.31 12.80 12.26 12.07 12.03 12.01 12.00

In the discussion of single sampling, the instigation of sample termination was discussed for the Binomial case. To illustrate the effect of sample termination in the Hypergeometric cue, the previous double sampling plan was modified to reflect the effect of sample termination. The resulting multiple sampling plan is shown in Table 14. Loading Option 5 of the Main Menu (Fig. 4), and entering the plan shown in Table 14, resulted in the OC curve and ASN plot shown herein as Figure 15 and Figure 16, respectively. For comparison purposes, Table 15 was printed with common defectives per lot. Note that no significant differences exist between
the probabilities of acceptance for specific defectives per lot; however economies of expected

sampled units are accrued. These inferences are valid only for lot sizes of 144.

29

Table 14. Multiple Sampling Plan Resulting from Sample Termination of Double Sampling Plan
_____ _____ ____ ____Multiple

Plan Specification

Total Numbe of 2
3

Cumulative Unit

Sople

C~~lauAve Couninuance Numibers (c) AccptinceRejction 1 1 1


1

Qaultusive Number MMI mx mx


ni mx MM m= Kx

~x
z z z

4
Sx

0 0 0
0

mi I EC mn ma mx mx
ME mu

UK

Mc
in
in
XKx

mn mx ma
mx mx mx

urMX
mx = xxx
Uat Uma

K miMC

ZKU
KUx mu MM

mO
mx m MM
Ux

2 2 2
2

6
7 -8

0
0 0

1
1 1

mxn ux
KUx mix MM EM xxx

2
2 2

mix
KCI

Ux
Uix

zu IK
KUr

10
10

x z 0 0 0 0 0 0 0 0 0
210

mn
xKU

mmx
KUx

mmx x
UKx

mx xMI
xx
Ux K

2
2

12 13 14 15 16 17 18 19 20 22 23 25 26 28 29 30 31 32 33
34

0 1 0 1 m

m 3 3 3 3 3m 3 3 3
3T

xxx

xx UKx xx
KUx

mc
mm

xxx
Ku

mc
m

2x mx 4 4 4 4 4 4 4 4 4 4 4

x z x
K K K K

0 0

Is It x

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3
U

2 2 2 21 2 2 2 2 2 2 2

mcrmc xxU mix xxx


xn xxx x ma xxx mm mc KUe xxx mm

mmx IC

mixm mcrmc mcmKxxx


= =
UU

mi
KK

UKx KUx x M xxx mm mm xxxxxxxxx mKU xx KU UCK ms m KU Kr m

x
UK UU UKx UK KU =m K KK KU KU

3 3

mx

xxx

24 0
0 0 0 0 0 0 0 0
1

x
K

=
2 2 2 2 2 2 2 2 2
3

='

MEMx ME

mc

ma

4
4 4 4 4 4 4 4 4 4
4

x K7 x
K K K K K K K

KU KUx KU 3 1 m mc KUx mu MC CKUm mcx 3 mar mi mm m mm mm mm mr UK XI KU x xxx mmx m 3 xxx 3 m mm mm mmx matm mm = KU KU UK 3 = UK UK xm KUE mK 3 mx xm mmx mmx ~ m inmxx mmx 3 mx m mx mmz mCK 3 mz UK KUz KU KU KU KU KU KUx KU Was UK KU KU

35
36

2
3

z
K

mo
U

mo
KU

MM

ma

4
4

EKU KU

MKU KU

30

IS .
73 IS

'U 45

$U

38 S.I
4S ?15 45

to
3

IS

1 I1416 16 11 2224 292 MM LOT. Lot Biae 'IDCIT]VCE

34 36 S41 28 34 144 Units

42 44 46 41

Figure15. Multile Sampling Via Double Sample with Sample Termination OC Curve

31

I1 -

Is

t'

lt

'4 13

'a

II

p ,

16153134II2S3I32242SN41 144 unite UOECTZVCS PRI LOT. Lot Bias wi

314 is

44 II415I

Figure16. Multiple Sampling Wa Double Sample with Sample Terminato Average Sample Number Plot Table 15. OC Curve and ASN Points from Multiple Sampling Via Double Sample with Sample Termination
Defectives Per Lot 1 3 Acceptsnce Probability 100.00% 98.17% Sample Number 13.8 16.7

4
6

9.36%
90.68%

17.8
19.2

9
10 12 16

77.33%
72.02% 60.94% 40.19%

20.0
20.0 19.5 17.7

20
24

24.56%
14.43%

15.4
13.2

25
30 35 40 45 5o 60 70

1260%
6.41% 3.31% 1.73% .91% .46% .11% .02%

12.7
10.5 8.8 7.5 6.6 5.8 4.8 4.1

32

2.

Double Sampling Plan Derivation Via Poisson Approximation of ALPHA=5 Percent and BETA=10 Percent for given Specifications of AQL and LTPD

This option provides the capability to derive double sampling plans for specified values of AQL and LTPD in which the ALPHA is 5 percent and BETA is 10 percent. Additionally, two types of double sampling plans are considered, those in which the first sample is equal in size to the second sample, and those in which the second sample is twice the first sample's size. The design algorithm is based on a Poisson approximation technique, as identified by the Chemical Corps Engineering Agency, [6]. The procedure for using this option is straightforward. A 2 is entered for the prompt shown in Figure 10 to access the software. If it is desired to have the second sample's size to be twice the first sample's size, a 1 should be entered for the prompt requesting the selection. The only other two user inputs are the numeric values of AOL and LTPD which will be entered via prompts and must be stated as percents. To obtain an output for illustration, an AQL of 2 percent and an LTPD of 8 percent were entered. Table 16 provides a copy of the resulting output. In this case, 32 double sampling plans are itemized which approximate the design specifications. Plan number 13 is very close to the desired risk values. To implement the plan, one would draw a sample of 49 units. If no defectives are found in these units, the lot is accepted with no further sampling. If six defectives are found, the lot is rejected with no further sampling. Otherwise, a second sample, consisting of 98 units must be drawn. If the cumulative number of defectives, from both samples, is less than six, the lot is accepted. If this cumulative number is six or more, the lot is rejected. The footnote at the bottom of the table is printed to remind the user that a Binomial and/or a Hypergeometric risk asessment is available for any plan selected frcn the table. Table 16. Poisson Approximated Double Sampling Plans in which the Second Sample is Twice the First Sampling Plan Specification
sample size Acceptance On

Percent Defective at which the


P(AccSptance) is 50% 9.3333 2.8000 6.6875 3.4516 5.8065 3.6735 5.4000 3.9706 5.0513 3.9400 4.6857 4.4324 4.4490 4.2745 4.1356 4.6038
A ximately Equal

Average
Sample

Plan Option
Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

First
Sample 9 30 16 31 31 49 25 34 39 50 35 37 49 51 59 53

Second
Sample 18 60 32 62 62 98 50 68 78 100 70 74 98 102 118 106

First
Sample 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Second
Sample 1 1 2 2 3 3 3 3 4 4 4 4 5 5 6 6

Number
95% 2.0000 .5333 2.0000 .9677 2.0000 1.2245 2.0000 1.4412 2.0000 1.5400 2.0000 1.8378 2.0000 1.8824 2.0000 2.1887 10% 25.7778 8.0000 15.1250 8.0000 12.5484 8.0000 10.5600 8.0000 10.0513 8.0000 8.3714 8.0000 8.2041 8.0000 7.0678 8.0000

Pa=95% 11.46 38.19 24,18 46.84 38.38 60.66 44.28 60.21 53.00 67.95 69.48 73.45 73.40 76.40 97.11 87.24

33

Table 16. Poisson Approximated Double Sampling Plans in which the Second Sample is " ice the First (continued)
Sampling Plan Specification
Sample Size Acceptance On

Percera Defective at which the P(Acceptance) is


Approximately Equal

Average
Sample

Number Second First Second First Plan Option Pa=95% 10% 50% 95% Sample Sample Sample Sample Number 125.46 6.4353 3.8588 2.0000 8 0 170 85 17 101.84 8.0000 4.7536 2.4348 8 0 138 69 18 158.23 5.8947 3.6228 10 2.0000 0 228 114 19 -17.98 8.0000 4.8588 2.6706 10 0 170 85 20 182.03 5.5000 3.5161 2.0000 11 0 248 124 21 126.25 8.0000 5.0698 2.8605 11 0 172 86 22 214.68 5.2273 3.3831 2.0000 13 0 308 154 23 140.79 8.0000 5.1584 3.0369 13 0 202 101 24 242.88 4.9152 3.2727 2.0000 14 0 330 165 25 150.14 8.0000 5.2941 3.2255 14 0 204 102 26 322.85 4.4152 3.1579 2.0000 15 0 342 171 27 179.36 8.0000 5.6842 15 3.5895 0 190 95 28 482.90 3.9286 2.9496 2.0000 20 0 476 238 29 237.39 8.0000 6.0000 4.0598 20 0 234 117 -30 831.79 3.4745 2.7641 2.0000 30 0 746 373 31 363.49 8.0000 6.3252 4.5706 30 0 326 163 32 Exact risk assessments are available for any selected plan by exercising selection number I of the Double Sampling Menu.

If it is desired that both sample sizes be equal, a 2 should be entered after the prompt requesting the decision. The AQL and LTPD are entered in the same manner as discussed above. Table 17 was obtained by entering an AQL of 2 percent and an LTPD of 8 percent. In this case, 34 plans are provided for the user's consideration. These plans approximate the design risk specifications and possess equal sample sizes for both samples.

34

Table 17. Poisson Approximated Double Sampling Plans in which the First and Second Samples are Equal
Sampling Plan Specification Sample Size Acceptance On Percent Defective at which the P(Acceptance) is Approximately Equal Average Sample Number Pag95% 12.87 29.19 540 29.48 50.92 45.59 60.79 65.20 75.14 67.52 71.34 84.24 81.90 105.00 94.95 108.58 91.10 126.68 102.05 148.37 114.65 170.38 121.37 215.71 139.92 244.22 149.45 277.08 161.42 314.12 174.36 392.04 207.64

Second First Second First Plan Option 10% 50% 95% Sample Sample Sample Sample Number 1 11 11 0 1 2.0000 9.0909 22.7273 2 32 32 0 1 .6563 3.1250 8.0000 3 27 27 0 2 2.0000 6.7407 14.5185 4 50 50 0 2 1.0400 3.6400 8.0000 5 22 22 0 2 2.0000 6.4545 13.4545 6 38 38 0 2 1.1316 3.7368 8.0000 7 39 39 0 3 2.0000 5.4103 10.5385 8 52 52 0 3 1.4615 4.0577 8.0000 9 59 59 0 4 2.0000 4.9153 9.1356 10 68 68 0 4 1.7059 4.2647 8.0000 11 53 53 0 4 2.0000 4.7170 8.3396 12 56 56 0 4 1.8571 4.4643 8.0000 13 72 72 0 5 2.0000 4.4444 7.7083 14 70 70 0 5 2.0429 4.5714 8.0000 15 94 94 0 6 2.0000 4.2340 7.2128 16 85 85 0 6 2.2000 4.6824 8.0000 17 87 87 0 6 2.0000 4.0920 6.6897 18 73 73 0 6 2.3562 4.8767 8.0000 19 108 108 0 7 2.0000 3.9537 6.3981 20 87 87 0 7 2.4713 4.9080 8.0000 21 132 132 0 8 2.0000 3.8030 6.1364 22 102 102 0 8 2.5686 4.9216 8.0000 23 146 146 0 9 2.0000 3.6507 5.6575 24 104 104 0 9 2.7885 5.1250 8.0000 25 185 185 0 11 2.0000 3.4595 5.1676 26 120 120 0 11 3.0667 5.3333 8.0000 27 201 201 0 12 2.0000 3.3483 4.8607 28 123 123 0 12 3.2520 5.4715 8.0000 29 218 218 0 13 2.0000 3.2385 4.6239 30 127 127 0 13 3.4252 5.5591 8.0000 31 236 236 0 14 2.0000 3.1864 4.4280 32 131 131 0 14 3.5878 5.7405 8.0000 33 270 270 0 16 2.0000 3.1111 4.2259 34 143 143 0 16 3.7692 5.8741 8.0000 Exact risk assessments are available for any selected plan by exercising selection number I of the Double Sampling Menu.

35

3.

Double Sampling Plan Derivation from MIL-STD-105D Acceptance Rejection Numbers and All Stated Sample Sizes

This final double sampling option, illustrated in Figure 10, provides a search of the feasible double sampling contained in MII-STD-105D for Normal Inspection, Tightened Inspection and Reduced Inspection. The search is initiated by inputting the AQL, LTPD, producer's risk, consumer's risk, producer's risk tolerance and consumer's risk tolerance. To expedite the search, a provision has been added within the source code to allow the user to specify a maximum total sample size. If no maximum is entered, one-million is assumed. Additionally, if the search is being conducted for a specific lot size (i . e., Hypergeometric evaluation), the user will be prompted for the numeric value of the finite lot size. The search algorithm begins with the formulation of a double sampling plan from MII-STD-105D. Any plan in which the acceptance, rejection, and sample numbers are compatible is considered to be feasible. The producer's risk and consumer's risk are calculated for the generated plan. If the risks are simultaneously within the risk tolerance limits, the plan is printed for user consideration. Otherwise, the plan is not printed. In either case, the formulation of another plan is initiated and the process is repeated. This iterative formulation, evaluation, and comparison is continued until all of the possible plans contained in MIL-STD-105D have been exhausted. To illustrate this design option, the data shown in Table 18 was entered for the indicated prompts. Since the Binomial option has a faster processing time, no constraint on sample size was imposed. Table 19, contains the five ML.-STD-105D plans, output for this scenario, found to possess risks that are within the risk design tolerances. Similarly, the Hypergeometric evaluation was constrained to a total sample size of 100 or less units and a finite lot size of 250. The results of the MIL-STD--105D search are the two plans shown in Table 20. Table 18. Double Sampling Prompt/Response Data
Prompt AOL LTPD ALPHA BEMA ALPHA Toleance BETA Tolerance Response 2 8 5 10 5 8

36

Table 19. MIL-STD-105D Double Sampling Plans Meeting the Design Tolerances (Binomial Evaluation)
Binomial Probability Evaluation Optional MILSTD-105D Sampling Plans AQL = 2% and LT7PD - 8% Producer's Risk = 5 * 5% and Consumer's Risk a 10 8% Risk and Sampling Burden at Desied Speification Accept/Reject Criteria First Second Acceptable Quality Level Tolerance %D efetv Rej Acc Rej 4 5 4 5 6 7 7 8 9 13 9 1 121 14 2324 Pa 95.2 95.5 99.5 99.8 100.0 Pc 24.6 19.3 7.6 3.9 .7 Alpha 4.8 4.5 .5 .2 .0 ASN 62.3 95.5 86.1 129.9 201.5 Beta 13.2 5.2 15.8 7.5 6.8 Pc 34.3 18.3 43.1 26.4 22.7 Pr 86.8 94.8 84.2 92.5 93.2 ASN 67.1 94.6 114.5 158.0 245.5

Sample size

Ist I2nd Acc 50 So 1 2 80 80 80 80 3 S125 1 5 200200 9

Table 20. Ml,-STD-105D Double Sampling Plans Meeting the Design Tolerances (Hypergeometric Evaluation)
Hypergeometric Probability Evaluation Optional MIL-STD-105D Sampling Plans AQL = 2% and LTPD - 8% Producers Risk = 5 * 5% and Consumer's Risk = 10 * 8% Maximum Tbtal Sample Constraint: 120 Lot Size = 250 Risk and Sampling Burden at Desired Specification Accept/Reject Criteria Sample size First Second Acceptable Quality Level Tolerance % Defective Pc Pr ASN BETA Pa I Pc IALPHA I ASN 1st 2nd Acc Rej Ac I Rej 67.1 62.8 8.7 1 34.3 91.3 5 98.8 25.6 1.2 50150 1 [4 14 A complete assessment of any of these plans is obtainable by exercising Option #1 of this software segment.

D.

Multiple Sampling Plan Design and Assessment

Multiple sampling plans, in the form presented herein, are rarely utilized. Though somewhat more complex than double sampling, multiple sampling is instigated in an effort to reduce the expected number of units sampled to a decision for constant, specified risk levels. As used in this application, multiple sampling involves the repetitive drawing of an incremental sample size, usually represented by n. After each incremental sample is drawn, the total number of defectives is tabulated and compared to the progressive acceptance/rejection numbers. If the cumulative number of defectives is less than or equal to the acceptance number, the lot is accepted. If the cumulative number of defectives is greater than or equal to the rejection number, the lot is rejected. Otherwise, the next incremental sample size is drawn. The analyses associated with this segment of the software deal exclusively with plans in which this incremental sample size is constant. The procedure described above is repeated until the lot is either accepted or rejected. A decision to accept or reject is guaranteed since all of these plans converge. Convergence occurs when the acceptance number plus one equals the rejection number. References 1, 2, 6, and 7 provide extensive discussions and examples of these type of plans. Specifically, MLL-STD-105D provides tables of multiple sampling plans for Normal Inspection, lightened Inspection, and Reduced Inspection, but these plans are not indexed as functions of acceptable quality, unacceptable quality, and risks. Reference 6 does provide plans indexed in the specified maner, but the risks are approximated by the use of the Poisson distribution.
37

However, when a plan is specified, precise risks can and should be evaluated with either the Binomial distribution or the Hypergeometric, depending upon the conditions under which the plan is to be implemented. To assist the user in designing multiple sampling plans whose OC curves pass, or early pass, through two desired points, Option 3 of Figure 4 was created. If this option is exercised, the two design aids illustrated in Figure 17 will be displayed on the CRT. Option l's software provides an algorithm based on the article entitled, 'Master Sampling Plans for Single, Duplicate, Double, and Multiple Sampling' by Enters and Hamaker [6]. These plans possess the common trait that they approximate a producer's risk of 5 percent for an inputted AOL and/or they approximate a consumer's risk of 10 percent for an inputted LTPD. The approximation is based on a Poisson distribution. Once the plans are identified, the algorithm uses the Binomial distribution to assess the actual risk levels. The option was not added to obtain a Hypergeometric assessment since it is anticipated that in the plan design phase the user is primarily concerned with generic lot sizes. If warranted, the Hypergeometric option can and should be included. This departure from the Chemical Corps Engineering Agency's procedure will provide a more accurate risk assessment.

Multiple Sampling Design Options Opton Dosriton "> Barnard-Enters-Hamaker's Poisson Approximation of Sample Size for Producer's Risk of Five Percent & Consumer's Risk of Ten Percent. Achieved Risks are Calculated Via the Binomial ........................ "> MIL-STD-105D Alternate Plans For Specified AQL, Producer's Risk, LTPD, and Consumer's Risk. Achieved risks are Calculated Via the Binomial ................................................. ENTER THE SELECT CODE OF THE DESIRED OPTION. Selec Code

I 2

Figure17. Multiple SamplingPlanDesignMenu To illustrate the option's use, an AOL of 2 percent and an LTPD of 12 percent were used as responses to the appropriate prompts. The Chemical Corps Engineering Agency procedure indicated a ratio of six (i.e., LTPD/AQL). This yields an incremental sample size of 12. As illustrated in Figure 18, the software prints, as output, a series of plans which are derived by a sensitivity analysis of the incremental sample size (i.e., the incremental sample size ranges from 11 to 15). This feature was included to provide a measure of the marginal relationship between the achieved risks and the incremental values of n. Upon reviewing Figure 18, it will be noted that each multiple sampling plan specification is followed by a note which states that a complete risk assessment is obtainable by exercising Option 5 of the main menu, (Fig. 4). If this feature is chosen, a complete Binomial assessment is available. Additionally, a complete Hypergeometric assessment is available if the plan is to be evaluated against a specified finite lot size. To illustrate the use of Option 5 in this application, a Binomial assessment was chosen. A Hypergeometric assessment will be illustrated later within this section.
38

To0 a.-~t

:10000 lo00'0.i0l0.0 so.' 10411ol Volo

a 10'00 4160h - 000 of000 W'.

also

.'

00

01.0lot~ to I0 S.Bom40 0.

Ill.

M-1-0 h 86-1..1

g 00* 0..o~ .. o PSt0o t oO..*

000i 00

. ...

at

00 is 00. Comolo..a." *0.0 2~~ * .. flboOj"

0.

4"to

0 .000b os . of ttis

oov'

lo

1.

1.114o7

._

0.I. 1,1

l. .1

@-0.0

." Notll

..

109.33

of

01000.W

of,01 Us.

..

...

ob00

.MINK

....

a 44W0000

140. eatoloass

is 00040010 01'

0."W.

sob0 son....o.

olt*.f.ool by

Th 4-

ek00.0. 10.1010.9 P1400 0* 040 al.-booo.0oo - 11.1.4o. o0.0 or ft wo at Is 10.1071911 0 *O&.0 IloVsoo 4"so* of0000 Goos.*0 also 0. *.0flamM"0

11

Too

Gollol 0 0oesiloPlan a0 .1.0 S.0 o 0.4" .. 0.0, P* ft 140. . a. .0* 0000 381 so. .6 P0ot 0 9000 000.. of co-W .6.. also Is 1R.007 ob000. .

ii.

000401

Moo. s00tiols

00 0.

061"l

Viso 0900st 0014000oot 0ftl -

000. Joek4004

Sto..0oCooo

09

floo

asolloti

00..
Willo

000.,0.
0.0009

to to

40000 0.00..40 031. 00000bPot

..

.1040-9 000 . so a0assalsit'00 4.6 I00 t 0 C.4toolow 000000ls t 0.9011104991 11.

00o

00401

00000~mo aola Cslsos.fj

0.009OO

ose.

Figure18. Multile Sampling Plan, Option 1 OutpistforAQL =2Percent andLMP = 12 Percent Figure 19 provides a schematic of the resulting OC curve for Plan #1, n = 11, while Table 21 contains specific points from the curve along with the expected sample size to a decision. Shown as Figure 20 is the average sample number plot. The expected sample sizes shown in Figure 20 are based on Binomial risk evaluations and the assumption that there is no sample termination.

39

T.,

as

4' IS

IS. 40 Its Is 'S


A9.

00~

to1 0

Ia

Figure19. OC Curvefor OptionalMultip* Sampling Plan#1 Table 21. OC Curve/ASN Points for Optional Multiple Sapling Plan #1 Percent Defective 1.00% 2.0095 3.00% Acuc Pwbaldity 96.8U% 94.11% 85.82% Avernge Sample Number 24.7 27.4 29.4

4.00%
5.00%

75.16%

30.6
31.0

63.57%

6.00%
-- --- ,==." ,, .,,. ..uam

52.25%
i

30.7
30.0 28.9 27.6 26.3 24.9 23.6 22.4 21.2 20.1 19.2 18.3 1"7.5 16.7 16.1.

7.00% a .n &.00% a uum 9.00% 10.00% 11.00% U200% 13.00%5 14.0095 15.00% 16.00% 1.05 l&00% 19.00%5 270.00%

41797 i i33.11% 25.75 19.81% 15.11% 11.4695 8.64% 6.49%5 4.86% 3.63% 2.71% 2.01% 1.49% 1.1095

40

24

Il14 Is

a S

O I

IO

It

14

lig

to

incmw WKCTZVE

FiguR

20. ASN Plotfor OpionalMultile Sampling Plan#1 (wtout Sample Termination)

Option 2 of Figure 17 provides the user with the capability of searching the multiple sampling plan possibilities contained in MIL-STD-105D. The search is conducted to determine which plan contained therein comes closest to meeting the desired, inputted quality levels and risks. The 'closeness' criteria specified herein is stated quantitatively as

D = V'(Prisk - Alpha)2 + (Crisk - Beta)2


where Prisk is the computed producer's risk for an identified plan Crisk is the identified plan's consumer's risk, Alpha is the desired producer's risk, and Beta is the desired consumer's risk. lb illustrate the operation of this option, an AQL of 2 percent, an LTPD of 12 percent, a producer's risk of 5 percent and a consumer's risk of 10 percent was entered for the corresponding input prompts. The resulting output is illustrated in Figure 21. Of the multiple plans contained in ML,-.STD-105D, the plan with the incremental sample size of 11 and the acceptance/rejection numbers shown in the lower right-hand corner of Figure 21 is the closest to the design criteria, where closeness is computed by Equation (4). To illustrate the complete assessment capability of Option 5 of Figure 4, the derived multiple sampling plan and a finite lot size of 500 were provided as input The resulting Hypergeometric assessment is summarized in Figure 22, Figure 23, and Table 22. It is pertinent to point out that the results illustrated for this application are valid only for lots containing 500 units and that the ASN plot is further constrained by the assumption of no sample termination.
41

RII

'! i
:

,, I
!i
*.2

I I
:

i:
....

i"
Ii
.I
jii

Iii
;'

ii
I!

III,! I"!ii!
j

: ,1
-

I.

i i.

,:.,
i

Ij
,.a,
"n I

*.

:.,. II "
all' -I

ta..l I
"|
a.

ii

a.

a.
2i

Iij

r.

jji

ij:

tiI
I;i

,. J1"!
i,
i
*.4*

U
C! 4

.,s

Hi!

j~3

Si'

'In ?11

so
Is

so
PIN IS so 4' so

SS aso

3'
to

to

Is Al

as 46 41 mpC~v O LaP. L"

U II II a sows-40*nt

is

PS II

Figure22. CC Curvefor MIL-ST-105D MultipleSampling Plan

94.

'So

34

to to

343

Table 22. OC Curve/ASN Points for MI,-STD-105D Multiple Sampling Plan Defectives Per Lot 1 4 10 20
30 40 50

Acceptance Probability 100.00% 99.66% 95.89% 77.00%


50.86% 29.33% 15.71%

Sample Number 23.0 25.9 31.1 36.2


36.0 32.8 28.7

60
70

8.21%
4.31_%

25.0
21.9

80
90 100

2.31%
1.26% .69%

19.4
17.5 16.1

E.

Sequential Sampling Design and Assessment

The final design aid provided by this automation deals with Wald's Sequential Sampling Theory. Mr. Acheson J. Duncan, [1], provides a comprehensive and thorough discussion of Wald's Sequential Sampling Plan design and assessment; therefore, Mr. Duncan's discussion will not be reiterated here. Let it suffice to say that the software contained herein, as Option 4 in Figure 4 simply automates Mr. Duncan's approach. This automation is inclusive of the operating characteristic curve and average sample number plot construction via the parametric equation approach. The software comprising this option is attached as Appendix D of this reportBefore proceeding to an example, it must be stated that the OC curve and average sample number plot, obtained via the cited parametric evaluation, are valid only if the sequential plan is adopted in its entirety. That is, no modification of any type is permitted. If this compliance is met, the austere possibility exists that an entire lot can be sampled without an acceptance or rejection decision. If destructive testing and/or high unit test cost are associated with the sampling, sequential sampling is often abandoned because of this possibility. Not withstanding this austere possibility and the relative complexity of applying the the plan, WaW's Sequential Sampling Plans do minimize the expected number of units sampled to a decision, for specified quality levels and risks. Additionally, the sequential plans often provide the basis of tailor made plans which result from truncations of the sequential sampling. If the user requires a more indepth discussion of this topic, Reference I should be consulted. Upon entering a 4 for the prompt, illustrated in Figure 4 the user will be sequentially prompted for the A0L, LTPD, the producer's risk, and the consumer's risk. To illustrate the use of the sequential portion of the software, 2 percent, 12 percent, 5 percent, and 10 percent were entered for the identified prompts. The first output segment provided is an option to print the computed acceptance line and the computed rejection line. For this application, the lines were Acceptance Line: X = -(1.18527087142) + .0566659067544n and Rejection Line: X = (1.52173674436) + .0566659067544n
44

(5)

(6)

where n is the chronological number of the unit sampled. The acceptance and rejection numbers
are undefined for X values less than zero. Additionally, for application purposes the rejection line values are always rounded up to the higher integer while the acceptance numbers are always

rounded down to the lower integer. This procedure tends to widen the continue region and does cause variation in the actual probability of acceptance and expected sample size from those expected via the aforementioned parametric evaluations. These departures are customarily assumed to be negligible. Table 23 contains a output summary of the derived sequential sampling plan which was derived by calculating the acceptance and and rejection numbers for n values ranging from 1 to 100. It is pertinent to point out that the plan infinitely extends beyond a sample of 100. The acceptance and rejection numbers provided in Table 23 have been subjected to the rounding procedure previously discussed. Table 24 contains the results of applying the parametric equations discussed by Mr. Duncan. As such, these points, for both the probability of acceptance and the expected sample size to a decision, constitute estimates. Figures 24 and 25 provide schematics of the OC curve and the ASN plot which were derived from the points shown in Table 24. A word of caution is in order. The OC curve and the ASN plot are valid estimates only for the unbounded Wald Sequential Sampling Plan defined by the parallel lines stated as Equations (5) and (6). Any alteration of the plan in any way invalidates the referenced schematics. Alterations usually take the form of sequential plan truncation which will be subsequently addressed.

45

Table 23. Integerized Sequential Sampling Plan Specification


Wald's Sequential Sampling Table AOL = 2% and LTPD = 12%, Producer's Risk = 5% Consumer's Risk = 10%, Number of If Total Number of If Total Number of If Total Units Defective Units Defective Units Defective

!
If Total Defective

Number of Units

Sampled
1
2

Acpt
***

Rejt
***
2

Sampled
26
27

Acpt
0
0

Rejt
3
4

Sampled
51
52

Acp
1
1

Rejt
5
5

Sampled
76
77

Acpt
3
3

Rejt
6
6

3 4
5 6 7
8 *

2 2
2

28 29
30

0 0
0

4 4
4

53 54
55

1 1
1

5 5
5

78 79
80

3 3
3

6 6
7

2 2
2 *

31 32
33

0 0
0

4 4
4

56 57
58

1 2
2

5 5
5

81 82
83

3 3
3

7 7
7

9 10 11 12

3 3 3 3

34 35 36 37

0 0 0 0

4 4 4 4

59 60 61 -62

2 2 2 2

5 5 5 6

84 85 86 87

3 3 3 3

7 7 7 7

13 14
15 16 17 18 19 20 21

3 3
3 3 3 3 3 3 3

38 39
40 41 42 43 44 45 46

*0
1
1 1 1 1 1 1 1

4 4
4 4 4 4 5 5 5

63 64
65 66 67 68 69 70 71

2 2
2 2 2 2 2 2 2

6 6
6 6 6 6 6 6 6

88 89
90 91 92 93 94 95 96

3 3
3 3 4 4 4 4 4

7 7
7 7 7 7 7 7 7

***

22
23 24 25

0
0 0 0

3
3 3 3

47
48 49 50

1
1 1 1

5
5 5 5

72
73 74 75

2
2 3 3

6
6 6 6

97
98 99 100

4
4 4 4

a
8 8 8

46

Table 24. Parametric OC Curve and ASN Plot Points


Sequential Sampling AQL = 2%, Producer's Risk = 5%, LTPD = 12%, and Consumer's Risk z 10% Probability of Acceptance and Average Sample Size Versus Percent Defective Percent Defective .55 .58 .61 .65 .69 .72 .76 .81 .85 .90 .95 1.00 1.05 1.10 1.16 1.22 1.29 1.35 1.42 1.50 1.57 1.65 1.73 1.82 1.91 2.00 2.10 2.20 2.30 2.41 2.52 2.63 2.75 Probability of Acceptance 99.69% 99.66% 99.62% 99.57% 99.52% 99.46% 99.39% 99.32% 99.24% 99.15% 99.05% 98.93% 98.80% 98.66% 98.50% 98.33% 98.13% 97.91% 97.66% 97.39% 97.09% 96.75% 96.38% 95.96% 95.51% 95.00% 94.44% 93.83% 93.15% 92.41% 91.59% 90.70% 89.73% Average Sample Number 23.01 23.13 23.26 23.29 23.53 23.68 23.84 24.01 24A.18 24.36 24.56 24.76 24.97 25.19 25.42 25.66 25.91 26.17 26.45 26.73 27.02 27.33 27.64 27.96 28.29 28.63 28.98 29.34 29.70 30.06 30.43 30.79 31.15 Percent Defective 5.78 6.08 6.30 6.51 6.74 6.97 7.20 7.43 7.67 7.92 8.17 8.42 8.67 8.93 9.20 9.46 9.73 10.01 10.28 10.56 10.84 11.13 11.42 11.71 12.00 12.30 12.59 12.89 13.19 13.50 13.80 14.11 14.42 Probability of Acceptance 53.68% 51.13% 48.58% 46.06% 43.57% 41.11% 38.71% 36.38% 34.12% 31.93% 29.83% 27.82% 25.90% 24.08% 22.35% 20.72% 19.19% 17.74% 16.39% 15.12% 13.95% 12.85% 11.83% 10.88% 10.00% 9.19% 8.44% 7.74% 7.10% 6.51% 5.97% 5.47% 5.01% Average Sample Number 33.48 33.17 32.81 32.41 31.96 31.47 30.95 30.39 29.81 29.20 28.58 27.94 27.29 26.63 25.97 25.31 24.66 24.00 23.36 22.73 22.10 21.49 20.90 20.32 19.75 19.20 18.67 18.16 17.66 17.18 16.71 16.27 15.84

47

Table 24. Parametric OC Curve and ASN Plot Points (continued)


Percent Defective 2.88 3.01 3.14 3.28 3.42 3.56 3.71 3.87 4.03 4.19 4.36 4.53 4.71 4.89 5.08 5.27 5.47 Probability of Acceptance 88.68% 87.53% 86.29% 84.95% 83.52% 81.97% 80.33% 78.58% 76.73% 74.77% 72.72% 70.57% 68.34% 66.03% 63.65% 61.22% 58.73% Average Sample Number 31.51 31.86 32.20 32.53 32.84 33.13 33.40 33.63 33.84 34.01 34.14 34.23 34.27 34.27 34.21 34.11 33.95 Percent Defective 14.73 15.04 15.35 15.67 15.98 16.30 16.62 16.93 17.25 17.57 17.89 18.21 18.53 18.85 19.17 19.49 19.81 Probability of Acceptance 4.59% 4.21% 3.85% 3.52% 3.23% 2.95% 2.70% 2.47% 2.26% 2.07% 1.89% 1.73% 1.58% 1.45% 1.32% 1.21% 1.10% Average Sample Number 15.42 15.02 14.63 14.26 13.90 13.56 13.23 12.91 12.61 12.31 12.03 11.76 11.50 11.25 11.00 10.77 10.55

48

pas

"F
"I73

*S.

"so ;a.
as 45 Is

"4 4 j ID A ICA in It It. 1 3 1'4 LS1L617 to is t Figure24. Parametric OC Curve'orWald's SequentialSampling Plan

49

48~

as

I'

14

gL~..--.- .L-.
1 2

-L, 4

.5

... 4-- .L-6 7 0

-... L 0

L..-. .1..L..-..t IS II t1

.... 4. 13

.. 14

.L_..t...L 15 IS

L,.,.,-..... 17? 10 t

'.,,_.., 20

PCRCENT MFECTZIVC

Figure25. Parametric AS Plotfor Wald's SequentialSampling Plan F. Truncated Sequential Sampling or Any Convergent Plan Assessment

The greatest disadvantages associated with a sequential sampling plan are the complexity of implementing the plan and the possibility of an indefinite sample size. Consequently, many sequential sampling plans are 'made' to converge by truncating the plan. Truncating a sequential plan simply means that at some point in sampling the acceptance number plus one is made to equal the rejection number. This assures that sampling will not go beyond that point. Further modifications are often made by adjusting the numerical values of either the acceptance number or the rejection number or both. The result of this process is that the maximum sample size is guaranteed to be less than or equal to the n value associated with the point of convergence. This guarantee is offset by changes in the probability of acceptance and ASN from that assessed for the original sequential sampling plan. As an example, consider the sequential plan shown in Table 23. Suppose the plan was altered to assure that the maximum sample size would be 50. One such alteration is shown in Table 25. The altered plan is similar to the sequential plan, but upon a dose comparison it will be seen that both the acceptance and rejection numbers have been slightly altered for selected values of cumulative sample size. These alterations convert the sequential plan into a multiple sampling plan and as such possesses its own unique OC curve and ASN relationship. Option 5 (Fig. 4) can be used to expedite the assessment of the probability of acceptance and expected 5o

sample size versus the appropriate quality characteristic, percent defective or defectives per lot.

The choice of which quality characteristic is dependent on the assumption concerning lot size.
Table 25. A Sequential Sampling Plan Truncation Alternative
Total Number of Units Sampled 2 3 4 5 6 7 _x 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Cumulative

Accptance
Number (A)

x x x x x

0
0 0

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3

_x

27 28
28 29 30

31
32 33 34 36 37 38 39

0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 2 2 '2

0 0 x 0 x 0 x 0 0 , 0 x 0 0 x 0 x. 0 x 0 x 0 x 0 x 1 X1 1 x 1 x 1 x 1 x 1 x 1 x x 1 1 x 1 x 12 x 2 x 2 x 2 x 2 x 2 x x x x 3 3 3 3

Cumulative Rejection Number (R) 2 X= xxx xxx xxx mCK xxx xxx xxx mX 2 MM MCK xxx ]MM =xM aM a mx xxx 2 xxx xMxx xU xxx rx xxx MMMM xxx xxx xxx XXX mmx XXX m XXX m X= 2 2 xxx xxx 3= xxx M m XXXMM mx xxx MM xxx mK 2 mix xxxM U mxm xxx M 2 xME MM xxx xxx xxx XmM xxx MM xxx 2 xxx xxx xxx XXX 1= MXm XXX XXX 1= 2 M MCK in xxx xxx xxx xxx xxx in 3 2 mm mix mu mm mm mumm xxxm 3 M xxx xxx 2 xxx mix MM xxx 3 2 xxx xxx xxx xxx xxx xxx xxx xxx 3 Mrs Irn ]CM ]CM rn1 2 xxxmix mmr IM 3 2 XxxMxxx xxx XMI xxx xxx 3 mm mix xxx xxx xxxmim xxx xxx 2 3 mix m xxx 2 mm m mx xxx 3 xxx xxx MMx 2 mmxxx mM 3 xxx mm x=m XM xxx xxx mm xxx 2 3 mm xxx i= m ;-= m 1= 1= xxx xxm 4 mm m mMMrnII MCI mix IMM 4 xxx xxx m mI 3 1xm xxx 4 m 3 mm mix m MMm Wm Mu Mu M xxx 4 3 mix mu mm xxx xxx xxx 4 xxx mix xxx xxx xxx mxxx mu nxm 3 4 3 mm mm rmm xxx xxx xxx xxx Xmx mix mm mx 4 3 m m m xxx xxx 4 3 mmx mx mmx zu mm mx mmx I= M=xxx 4 xx I xxx xxxxx xxxxx 3 xxx 4 MMC xxx xxx M MMxxx 3 mm m= x 4 mix xm mam xxx mm xm m 4 xxx ma xmr xxx xxx mm xxx xxx xxx 4 xxx xxx xxx xxx xxx xxx xxx xxx x=r m= XME mK M 4 xxx m xxxMM MM xxx m 4 =r x= xxx r x m xx xxx xxx mu xxx xxxmxxx mu mm xxx X= xn xxx xxt 1= mix MCK xxx R E= 1= MMM xxx xxx xm xxx xxx 1= xxxmxxx xxx _t 4 4 4 4

Cumulative Continuance Numbers (C)

xxx xxx = mix xCx xxx xxx

51

Table 25. A Sequential Sampling Plan Truncation Alternative (continued) Total Cumulative Number of Acceptance Units Number Sampled (A) 40 2 x 41 2 x
42 43 44 2
2

Cumulative Continuance Numbers (C)

3
3 3
3

xxx xxx m xxx tx xxx m xxx x xxx xxxm x xxx xxx m 'm
x
xxx

xxx I m xm xm
mu

Cumulative Rejection Number (R) 4


4

x x x

xxx
xxx

mu
x=

x = mm
xxx xxx x=

xxx
x=

mm
x=

m
x=

4
4

xxx Irmxxx xxx xxx

xxx

xxx _]=

1=

45 46 47 48 49 50

2 2 2 2 2 3

x x x x x x

3 xxx xxx xxx xxx m xxx xxx 3 xxx xxx xxx xxx m xxxm 3 xxx xxx m m M xxx xxx xx 3 mxxx xxx xxx xxx x = 3 xm xmx x = m xxx xxx xxx m m = m m

mK xxxmm x= xxx xxx x M 1= M xxx xxx m x m xm m m_ m

4 4 4 4 4
4

The multiple sampling plan shown in Table 25 was entered via the Option 5 prompts in Figure 4. The resulting OC curve is depicted in Figure 26, and the average sample number plot is shown in Figure 27. Table 26 contains selected points from the two referenced schematics. Also, the impacts of of altering the sequential sampling plan to assure a maximum, sample size of 50 is shown in Table 27. It is important to point out that the comparisons shown in Table 27 are valid only for the multiple sampling plan contained in Table 25. Any other alteration of the sequential sampling plan would require a similar comparison.

as

so as
Iso
4S 4.

3.

IS
IS

a1

is

Figure26. OC Curvefor the TruncatedSequentialSampling Plan


' ' , , l I I I I

I I

II

II

52

all

1a as 14

113 at
&I Is Is In 15 IS

Is I'
l2 17 'a 11 14

4 3

1 12 PERCET DCTIVE

14

Figure27. ASN Plotfor the TruncatedSequentialSampling Plan Table 26. Probability of Acceptance and Expected Sample Size for the Truncated Sequential Sampling Plan Alternative Percent Defective
1.00%

Accqft

Pbbility
97.60% 87.68% 53.59% 25.30% 10-35% 3.93% 1.44%

Average Sample Number


23.5 26.0 26.0 22.0 17.6 14.0 11.3

Z00%
4.00% 6,00% 8.00% 10.00%

"1200%

Table 27. Sequential Versus Truncated Sequential Comparison Plan Pameter Produe's Risk Consumer's Risk ASN @ AQL
ASN @ 1TPD

Wald's Sequential 5% 10% 28.63


19.20

T1ble 25's Tmncated Plan 12.32% 1.44% 26.00


11.30

53

It is not the intention of this guide to discuss the relative value of one plan over another. The intent is simply to present automated quantitative techniques to enhance the user's ability to efficiently and precisely design and assess lot acceptance sampling plans. The example discussed above is based on a Binomial evaluation of event probabilities. A Hypergeometric evaluation and another aspect of Option 5 of Figure 4 are discussed below. The manner in which samples are drawn alters the risks and expected sample sizes, if the method of sampling departs from that specified by the plan. To illustrate, suppose the plan shown in Table 25 is to be used in conjunction with a lot containing 500 units. Instead of the single unit, consecutive sampling indicated in Table 25, the sampling is constrained to be clustered as shown in Table 28. Simply stated, accept/reject decisions can occur only after a sample number has been drawn (i . e., there are thirteen points at which a lot can be accepted or rejected). This type of sampling often occurs in ripple firing or multiple launch missile/rocket firings. The sampling plan shown in Table 25 can easily be modified to accommodate the duster sampling scenario and can he detailed as shown in Table 29. Table 28. Cluster Sampling Constraints
Sample Number Sampling Increment Cumulative Sample Size #1 6 6 #2 9 #3 11 #4 1 12 #5 6 18 #6 2 20 #7 26 #8 30 #9 6 36 #10 5 41 #11 4 45 #12 3 48 #13 2 50

Table 29. Cluster Sampling Acceptance/Rejection Criteria


Total NumCumulative Cumulative Continuance Numbers (C) Cumulative

ber of
Units Sampled 6 9 11 12 18 20 26 30 36
41 45

Acceptance
Number (A)
**

Rejection
1 x X 0 O 0 0 0 1 1 1 1 1 2 2 3 xmi Number (R) XXX xxx xxx xxx xxx XX xx xxx 2 XXXMX mix mix xxx xxx mixm ix 2 2 xxx MX mix rmix mix U mix MM 3 2 xxx xxx xxx xxx xxx xxx xxx 3 2 xxx x xxx xxx xxx xxx xxx M 3 3 xxx mmx mix 1x MM XMMx xxx xnr 4 3 1x XXX XXX xxx XXX xxx xxx XXX 4 mx XXX m m mE m m x= mXX M 4 4 x= ma xxx xxx xxx xxx xxxm m mC
xxx xxx M xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx XXX xxx xxx 4 4

*** __ 0 0 1 2
2 2

x
x x x x x
x x

0
1 1 2 3
3 3

48 50

2 3

x 3 x XXX

xxxm mx m XXX XXX

x XXXm

x xxx

xxx mCK

= XXX

Mr xxx

1= MM

1xxx MM

4 4

Two alterations of the assumptions under which Figure 26 and Figure 27 were constructed will cause significant departures in the actual operating characteristic curve and average sample number plot of the implemented plan. The first alteration is the fact that a finite lot size of 500 units is known which requires a Hypergeometric evaluation in lieu of a Binomial evaluation. The second alteration is that there are 49 accept/reject decision points in Table 25, and there are only 13 such points in Table 29. The effect of these two alterations can be readily assessed by Option 5 of Figure 4.
54

Upon entering the sample size values at which accept/reject decisions are made and the respective acceptance numbers and rejection numbers at these sample sizes, via Option 5's prompts the OC curve shown in Figure 28 is obtained. Additionally, the expected number sampled to a decision is shown in the ASN plot included as Figure 29, the effect of clustering the samples, as described above, and the application of a finite lot size of 500 on the truncated sampling plan, shown in Table 25 is summarized in Table 30.
in
35

as

SI

PS $5

55 5.

LtL

as

18

15

2l 25 30 35ll 41 45 5l 55 69 IS DECTk"IVES PER LOT. Lot Size - Sir

7I 75 UMUtl

II

IS

is

9 ISSI

Figure28. Cluster Sampling OC Curve Table 30. Truncated Versus Clust-er Sampling Compaisn Pian Parmdae Producer's Risk Consumer's Risk ASN @ AQL ASN @? LTPD
Tmncated 12.23% Clustaed 1.93%

1.44%
28.63 19.20

21.22%
28.30 23.30

55

.-

13

al a' to to '3 ,!

Ga

71e purpose of this section is to provide a series of example problems and the asscite output which collectvely, provde an exhutive illustration of the scope of applicadon of the software attached hereto as appndxe. Ile prie conideration, repetitively stated within this section, is that no approximations of event probabilities awe made. Moreover, the event probabilities are calculated by the Hypergeometric distribution when finite lot sizes are a consideration, and they are calculated by the Binomial distribution when finite lot sizes are not a consideration. 71e increased precision of risk forecasts and eqxpeced sample size expenditures to a decision is a significant advantage; however it is only one aspect of this software. Option 5 of Figure 4 is perhaps the most significant advantage in that it affords expedient risk assessments and ASN evaluations for any and all convergent sampling plans. This generic evaluator could, if desired, replace lIrge portions of the software devoted to the evaluation of these parameters in Options 1, 2, and 3.

S I II

IS

453I

IS I S

I5

MrI. CONCLUSIONS AND EXTENSIONS The primary technical advantage provided by the use of LAVAS is the automation of the tremendous calculation burden imposed in performing event probability evaluations using the Binomial or the Hypergeometric distributions. The burden is well recognized as being significant as evidenced by the proliferation of approximation techniques found in current literature pertaining to attribute sampling for lot acceptance. Regardless of the efficiency of a particular approximation technique, it is just that, an approximation technique which infers some degree of error. Destructive testing of modern missiles and/or rockets imposes such austere cost accruals that precision in risk assessments is vital. Additionally, LAVAS provides risk assessments for any convergent sampling plan, in addition to the common plan types. This feature is particularly useful and expeditious when sequential sampling plans are truncated or when multiple sampling plans with variable incremental sample sizes are to be evaluated. In short, LAVAS can be effectively used to precisely construct OC curves and ASN plots for any attribute sampling plan. LAVAS also includes selected design algorithms which will aid the user in deriving attributes sampling plans which are constrained at specified risk levels. These design features also include provisions set forth in MIL,-STD-105D in that risk design thresholds can be provided as input and MJ,-STD-105D sampling plans, which meet the inputted risk thresholds will be specified as output. In conclusion, LAVAS can be viewed as a sampling plan design aid and an extensive, precise sampling plan risk assessor. Future efforts to enhance the methodology automated in LAVAS are envisioned to be focused on two areas. First, faster execution is desirable. To that end, faster techniques will be researched to perform the factorial ratios required for both the Binomial and the Hypergeometric distributions. Additionally, a design feature is desired which will aid in the derivation of tailor made multiple sampling plans with variable incremental sample sizes which will allow the user to constrain the total number sampled at specified risk levels.

57

REFERENCE
1. 2. 3. 4. Duncan, Acheson J., "Quality Control and Industrial Statistics", Fourth Edition, Richard D. Irwin, 1974. Grant, Eugene L. and Leavenworth, Richard S., "Statistical Quality Control", Fifth Edition, McGraw-Hill Book Company, 1980. Lapin, Lawrence L., "Probability & Statistics for Modern Engineering", Second Edition, PWS-KENT Publishing Company, 1990. Lawler, Patrick B. Jr., "Total Quality Management (TQM) Measurement Tools for Selected On-Line and Off-Line Applications", U. S. Army Missile Command Report, 30 April 1992. Miller, Irwin, and Fruend, John E. and Johnson, Richard, "Probability and Statistics for Engineers", Fourth Edition, Prentice-Hall, Inc., 1990. United States Department of the Army, Chemical Corps Engineering Agency, ENASR No. DR-7 (1953), Master Sampling Plans for Single, Duplicate, Double, and Multiple Sampling, Manual No. 2, Army Chemical Center, Md., 1953. United States Department of Defense. Military Standard, Sampling Procedures and Tables for Inspection by Attributes [MIL-STD-105D]. Washington, D.C.: U. S. Government Printing Office, 1963.

5. 6.

7.

58

APPENDIX A LAVAS's SOURCE CODE

APPENDIX A LAVAS's SOURCE CODE


PRINTER IS S DIN P&(16.301),Asn(361),DItSICIS2,Pd(361),F(16)DJ~C 131,9),Con(56I ),Conp(S6 1).PV(5,501).Cont(561),CCea(2,17.S).Nhila(17,2)oNhr(1?.2).n11c1(|) 30 DIN S1655(1?),D165C(1S).NumS(1S2)[32,TabS(20)132,TabI.(561,3),Nultt.56.,13) 16

!S

40 50
2-,-

DIN Ccmt(26,24), Asplar(IS,7,2), 2",t 3$", 4" , DATA " I'"


13-.14".IS-,16-,1?-,-

splan(3$) ' 6',' S., 5"


19",-

?*,"S'
21-,-

0","
22","

11"s..

IOV,-

26",-

23",1 241

6G DATA - 25"," 26"," 27'," 28"," 29-," 30"," 31-,- 32."o 33",' 34'." 33"." 3 6G," 3?-,- 386," 39-,- 40-,- 41-,- 42-,- 43",0 44"-. 45-.- 46',- 47-,- 48-,- 49' ",,SO-,-3-, 52-," 53"," 54'," 55"," 56"," 57"." So6," 50', 66"," 6 ?0 DATA 1"," 62"." 63'." 64"," 65',- 66",' 67'," 6g'o" 69", 76"," ?1-.' 72'," 73',' 74" so DATA - 75-,- 76-',- ??, ?1'," 79-,- 068,' $1-,- 82-," 63'," S4-,- IS-.- 6 V.'- W-'," W-', *)S", " 02"," 93-," 94"," 95"-. 9,'," S6"," 9?7,' 00"," 99" 90 DATA "166"," 6""..." 106 FOR 1-1 TO 102
11i

126
136

READ NusS(I)

140 150 160 176 10 190 266 216 220 236 240 256 266 270 260 296 306 310 320 330 340 350 368 370 360 390 400 416 '20 430 448 450 466 476 460 490 560 510 526 530 540 556 560 570 568 590
600

NEXT I DEEP FOR 1:1 TO 31 FOR J I TO 9


READ JaccI,J)

NEXT J DEEP NEXT 1 DATA 6,.61,.651,.165,.603,2.303,2.006,4.665,44.69 DATA 1,.149,.355,.532,1.6?76,.69,4.744,6.636,10.946 DATA 2,.436,.616,l.102,2.674,5.322,6.296,6.466.6.569 DATA 3,.623,1.366,1.745,3.672,6.601,?.754,16.643,4.89 DATA 4,1.270,1.0?,2.433,4.6?1,?.0940.154,11.665,4.657 DATA 5,1.70S,2.613,3.152,$.6?,9.275,10.513,13.168,3.549 DATA 6,2.33.3.266,3.605,6.6?,1.532,11.642,14.571,3.206 DATA ?,2.006,3.01,4.6$6,7.69,11.??1,15.146,16,2.057 DATA 0,3.507,4.693,5.432,9.669,12.995,14.434,17.483,2.769 DATA 0,4.13,5.426,6.221,0.66,14.266,15.765,16.?83,2.611 DATA 16,4.?71,6.160,?.621,16.666,15.46?,16.062,26.145,2.4o? DATA 11,5.420,6.024,?.620,11.666,16,50,1I.266,21.40,2.3o? DATA 12,6.600,?.60,6.646,12.666,17.2,10.442,22.62x,2.312 DATA 13,6.7?2,8.464,9.47,13.660,19.959,29.660,24.139,3.24 DATA 14,7.477,9.246,10.3,14.666,26.120,21.606,25.446,2.177 DATA 15,0.181,10.035,11.125,15.668,21.292,23.098,26.743,2.122 DATA 16,9.695,19.931,11.976,16.669,22.452,24.392,28.031,2.073 DATA 17,0.616,11.633,12.822,17.668,23.666,25.5,29.31,2.029 DATA 10,16.346,12.442,13.672,16.668,24.756,26.692,30.561,1.99 DATA 19,11.692,13.254,14.525,19.668,2.9062,27.979,31.s45,1.954 DATA 26,11.825,14.672,15.383,20.668,27.045,29.662,33.103.1.922 DATA 21,12.574,14.094,16.244,21.664,26.164,38.241,34.355,1.092 DATA 22,13.329,15.719,17.100,22.666,29.32,31.416,35.601.1.965 DATA 23,14.060,16.548,1?.975,23.666,30.453,32.546,36.841,1.94 DATA 24,14.053,17.362,16.944,24.668,31.504,33.752,30.?77,t.$g7 DATA 25,15.623,18.210,19.717,25.667,32.711,34.916,39.306,1.795 DATA 36,19.532,22.444,24.113,36.667,26.315,40.69,45.4.1.707 DATA 35,23.525,26.731,20.556,35.667,43.072,46.464,51.4o9,1.641 DATA 46.27.387,31.666,33.638,40.667,49.$9,52.069,5?.347,1.59 DATA 45,31.704,35.441,37.530,45.66?,54.8?8,57.695,63.231,1.546 DATA 56,35.067,30.0,42.0,56.667,66.330,63.26?,60.66,1.515 FOR lot TO 2 IF lo. THEN Liml6 IF I12 THEN 1.168? FOR Jel TO Lis FOR Kal TO 6 READ Cce(CIJ,K) NEXT K NEXT J DEEP
NEXT I

610 626 636 646 656 668 676

FOR lot TO 16 READ NI la(I,1),NIla(l,2),N~lr(1,1),Nilp(I,2) NEXT I FOR 11 TO 16 READ NilS(1) NEXT 1 DEEP

A-1

god

6 6,.2123206,.,3l*,.2 DATA 11.,,, DATA 3.9.49, 1,3,.6,1.6,3.099.1.236,4,5.39,S,3,.49. 1.35,2.64, 1.771,,..1 690 4,.77,1.97,3.92,1.359 DATA ,.1,,.6.6,.3165,.1,,.92.I.6,.9,3.I 760 .6,1.36,2.44.4.17,1.646.9,3.26.2,93,.69.3.29.5.47,1.476 DATA 16,2.96,3, 16,2.27.4.13,6.72,1.360.11.2.77,3, lI,2.46,4.36,6.62, 1.466,1 716 2,2.62,4, 13.3,67,5.21,.SS,.1.394.13,2.46.4,14.2.29,5.4,3.11,1.472 726 DATA 1,.131,.15475,.0,519,,647,.,.522.1 ,1. 74, 6, 36,7.45.16. 31, 12.94, 2. 23 DATA 11.,,,2,,.,.1,,.412.216,.2161367.,, M2 746 756 766 DATA 6,4.25,1,4,1.64,2.5,4.42.1.274,7,3.66,2,5,1.43,3.2,5.55, 1.17,8,3.63,3 DATA 16,3.21,3,7,2. 15.4.27.6.91,1.173.11,3.09,4,0.2 62.5.02, .0.11.1I20,12,2 DATA 14,2.44,5,12,4,6.73,9.77,1.215,15,2.32,5,13,4.35,7.66,6.108,1.271.16,

6,7,16,1I,19,9,23,14,24,11,26,16,27,13,34,26,35, 15,24,26,35,17,37,22,36 DATA 23,52.29,33,25,56,31,57 796 DATA 2 ,3 ,5 ,g,1), 2 0,32,50,66,125,2g6,315,566,966S,1256,2666 796 DATA 2,3,5.9,13,29,32,50,96,125,266,315,5S6,909,12516,2000,3150 666 DATA 1,2,3,5.,?,10l,12.14,10,21,27,34,41,44 616 DATA 11.6-,,,,,,,6,0 626 DATA 2,2,2,2,3,4,4,106,100 336 DATA .649,.39,.89,3.243 646 6 DATA 21.5-,5-,,,,,16 656 866 DATA 2,2,2,2,2,3,3,1"S, 106 DATA .063,.31,.79,4.373 676 DATA ,,5-,5661241016 606 DATA 2,2,2,3,3,4,5,106.,166 690 DATA .1..43.1,3.461 966 7,.7 66.' DATA 469,5-,,,,,,,162222222210 *16 7,.7 DATA 5S6,5-,,,,,,1222233D333.9,.6 926 DATA ,.4-6,,1,2,1S2,,3444,10,1,6,.2,.2 936 7,.125 0,1S.4 6,162332455 946 DATA 762,561l234 S 4.5-,l,44,,6l62,4,,,,,6,6,3,1,.,.0 956 DATA 6 ,.1-,S12,,,,6,3,4S,,,,6,3,7,13328 DATA 966 64S7,101111616.3,.,.3 DATA1642,23,,,166S 976 91.727 DATA1142,1,,4,71616,4,,,,,1616,4,11,.,. 900 366 DATA1235,.1123571616,4,,,,,,SS,.,.2,.12 996 e39

92.210 1620 DATA1530S,,,,611416164791,211516161,243 .64,1.991 1630 DATA 62613,9l111766S657S13113S1S161.,.5 .4.20,1.839 1646 DATA 7251,,,131161616501121,,11616,.,23 4,4.74,1. 982 1066 DATA 19,2.16,1,5,9,13,19,22,25,106,1669,7,IS,13,38,22,25,26,166,106,2.46,3. 77,5.19,2.138 1070 DATA 019,,,31,43,6101061,62,04,7161,.45 .46,7.26,1.967 1609 DATA -5,-5,90,6,1,1,2,2,2,2,3,2,3,3 16960 DATA -S,*,6,1,2,3,4,2,3,3,4,4.,S, 1100 DATA -S,*,1,2,3,4,6,3,3,4,S,G,6,7 6 1116 DATAS12,,,,4S,,69 1126 DATA 012571,1,,,,61,21 1136 DATA 0,2,4,6,9,12,14,4,7,9,11, 12,14,15 71 1146 DATA 63661,41,,,61,S 1156 DATA 0,3.7.10.14,10,21.6,9,12,15.17,29,22 1160 DATA 1.4.6.12,17,21,25,7,16,13,17,20,23.26 1176 DATA 3,6,11,16,22,27.32,6,12,17,22,25,29,33 1166 DATA 2,7,13,19,25,31,37,9,14.19,25,29,33,39 1190 DATA 3,10,1?,24,32,40.46.10.17,24,31,37,43,49 1266 DATA 4,11,19.27.36,45,53,12,19,27,34,40,47,54

A-2

1210 1220 1230 1240 1250 1260 1270 1200 1290 1360 1310 1322 1330 1340 1350 1360 1370 1300 1390 1400 1410 1420 1430 1440 1450 1460 1470 1480 1490

DATA 6,16,26,3?,49,61,72.15,25,36,46,55,64,73 DATA 6,17,29,40,53,65,77,16,27,39,49.5S,60.70 DATA 2,3,4,5,6,?,0,9,10,11,12.13,14,15,10,20,24,32.36,43,50 FOR 1-1 TO I? READ S1S5s(1) NEXT I FOR 1-1 TO 15 READ S15c(CI) NEXT I DEEP FOR l1t TO 20 FOR Jet TO 24 READ Ccim(R,J) NEXT J DEEP DISP NEXT I FOR 1-1 TO 15 FOR Je1 TO 7 READ Msptar(RJel) NEXT J FOR Jet TO 7 READ Nsplar(I,J,2) NEXT J DEEP NEXT I FOR 1.1 TO 21 READ Nspln(I) NEXT 1

1560
1510 1520 1530 1540 1550 1560 1570 1580 1590 1600 1610 1620 1630 1640 1650 1660 1670 1660 1690 1700 1710 1720 1730

DEEP

DROP DRSP DORP DORP DOPR PRSP DISP DISP DISP DISP DISP * * LOT ACCEPTANCE SAIPLING OPTIONS Option Description o )Single Sampling Design And Assessment .............. > )Double Sampling Design And Assessment .............. > )Nultiple > Sampling Design And Assessment ............ Select Code I 2 3 4

)Sequential Sampling Design And Assessment .......... )Truncatta Sequential Plwm Assessment(i.e., )Prograsm Any convergeE. Sampling ort OC Curve & ASH Cur-u) ........

5 i

DISP *

Termination ................................

DlIP DISP DIRP 'ENTER THE SELECT CODE OF THE DESIRED OPTION.DisP SEEP INPUT Sc IF Sew6 THEN DISP IF $cm6 THEN DISP "I3* Bytet IF Osmi THEN DRSP IF Scw6 THEN DEEP IF $cm6 THEN STOP

1740
1750 1760 1770 1760 1790 1000 1010 1020 1030 1040

DROP
LOADING SELECTED OPTION! DisP * DisP oSingle:C12*,2080 IF Scot THEN LINK IF Sc2 THEN LINK 'Double:C12*,2909 IF Ocm3 THEN LINK "Multl:C12*,2060 IF Scm4 THEN LINK "Seque:C12",200 IF Scm THEN LINK "Spec:C12",200 IF (ScoI) OR (Sc2) OR (Sc-3) OR (Sc-4) OR (SceS) FOR l1. TO it DISO

THEN 1960

A-3

Iss 1St, too$ IsIs IM~ Me5 1924 1936 1940 1959 196. 19M

DRIP DRIP DRiP DRIP DISP DISP DIIP DEEP INPUT RS GOTO 1516 GOSUD 2606 STOP

A-4

APPENDIX B SINGLE SAMPLING DESIGN AND ASSESSMENT SOURCE CODE

APPENDIX B CODE SINGLE SAMPLING DESIGN AND ASSESSMENT SOURCE


200S REA **e* SINGLE SAMPLE DESIGN AHD'OR RISK ASSESSMENT .***

2010 226:
2626 2841 2056 2060 2!78 2!06 2690 2160 2116 2126 2136 2140 2156 2166 2176 2106 2190 2260 2210 2229 2230 2246 2256 2240 2274 2260 2290 2306 2310 2320 2220 2340 2350 2260 2320 23600 2329 2466 2410 2420 243 2440 2456 2466 2476 2406 2490 2500 2510 2520 2530 2546 2550 2566 2570 2566 2590 2666 2610 2620 2636

DISP 31S
lISP " DISP DISP DISP DISP DISP DISP DISP
* *

) Single Sampling Plan Option Menu Option Description )OC Curve./Risk Assessment for & Specific Plan ........ > )Plan Derivation for Given AOL, LTPD, ALPHA L BETA ... at 3 Select Code I 2

)Plan Derivation for a Single Point the Indifference

of Control

Quality (Poisson Based) ............ Cameron's Poisson

)Plan Derivation Using J.". > Approximation

of the OC Curve ....................... Search for

DISP * lISP * DISP *

PlIan Der'vation Via MIL-STD-ISSD SpeciftAOL, LTPD, ALPHA,

& SETA ..................

5 6

EXIT This Segment

of the Program ....................

DISP DISP 'ENTER THE SELECT CODE OF THE DESIRED OPTION.DISP SEEP INPUT Sc IF $cog THEN RETURN IF Sc()1 THEN 4960 DISP ENTER THE SAMPLE SIZEI" lISP * DISP DEEP INPUT Sample DISP ENTER THE THE ACCEPTANCE NUMBER!* DISP DISP SEEP INPUT Accept lISP DO YOU HAVE A FINITE LOT SIZE." D lISP lISP SEEP INPUT ReDs IF RQs~euNO* THEN Diste.'IINOMIAL' IF ResSu'NO* THEN 2556 ISP ENTER THE FINITE LOT SIZE aISP " DISP DEEP INPUT Laize Rat io.Sampi..'Laze IF Ratio)m.1 THEN DistwmNYPER" IF Ratio)m.1 THEN 3796 DISP DISP *Since the ratio of sample size to lot size Is less than ten percent, DISP 'it maybe acceptable to use a Binomial Approximation to the Nvpergeom

etric.'

DISP *10 YOU NISH TO USE THIS APPROXIMATION?" lISP DEEP INPUT Res$ IF ReSw'NO' THEN DistsuoHYPER" IF Rems"YES' THEN DitStlINH3fOMIAL' IF bistSm'HYPER" THEN 3790 SSample Pw.661 CAccept FOR X&6 TO C GOSUB 2660 IF Xw6 THEN PacptoProb IF X08 THEN Pacpt.Pacpt.Prob NEXT X

B-1

2645

IF Pacpt(.O2 THEN 201$

2655 267?

2694 2*6" 269O 270i 271O

PaP#. O5
DEEP

GOTO 2590
REM BINOMIAL SUBROUTINE IF (S-x(S) OR (X(s) THEN Probes IF (S-XN() OR (X(S) THEN RETURN IF (I-Nag) OR (Xa8) THEN ProebP-Xe(I-P)-(S-X)

2720 2730 2140 2755 2?$S 2770 27S0 279 2000

"2s1o

2520 2530 2040 285E

IF (S-Xet) OR (x.i) THEN RETURN Probsi FOR loIs TO N ProboProbtP Is NEXT FOR last TO S-X ProbuPrebe((NIs)'Is)e(1-P) HNEXT Is RETURN 3ISP DISP "The probability Of Acceptance Is *;Pacpt#leS;*% at Percent Defective 3lsp "*cusi to .|PeIS8N.* 3ISP 31SP *hhat range do you wan% to include on the OC Curve's Percent Defectlv entry must be stated as & percent(l.e., fifty percent's entry i

31SP 'Th. 2150 a Do).*

"2DE SEP
2090 296O 2910 2920 2930 5). 2940

"2t56

INPUT Maxx MxxaeHax1el 31SP 3ISP 'ENTER THE DESIRED LABELIHG INTERVAL ON THE PERCENT DEFECTIVE AXIS.* 3ISP *The entry oust be st&ted as & percent(i.t.. five percent's entry is e 31SF
DEEP

"2960

INPUT Xint 2970 IncenaxelfSf 2950 FOR l1o TO 105 2990 Pd(I)olelnc 3006 PaPE(I)d1R 3010 CeAccept 3026 SNSAmple 3O30 FOR XaS TO C 3040 GOSUS 2688 305s If Kee THEN Pa(1,l).Prob 3860 IF XN)O THEN Pa(II)iprob.Pa(lI) 3307 NEXT 9 3600 NEXT 3696 LIm|OSS 3100 GOSUD 4640 3110 3ISP 3129 31SP "DO YOU MANT ANY SPECIFIC POINTS PRINTE3?1 3130 31Sp 3140 -SEEP 2138 INPUT Re$ 3160 IF ReSsUNO" THEN 2010 3170 PRINT LIN(4)3SPA(l1);*Oper&tinq CharacterIstIc (OC) Curve 3106 PRINT SPACID);'Single Sampling Plan : o a ';*Sample *;' S C a ';Accept 3190 PRINT SPA(I?);1(uinosIal Distribution Probabilities);.LIN(I) 3200 PRINT USING 3266 3210 PRINT USING 3240 3220 PRINT USING 3250 3230 PRINT USING 3240 3240 IMAGE 2SX,'j Percent I Probablity l 3250 IMAGE *,20X,g13Jefct4uel4o Acceptancel" 3260 IMAGE 20N," 3276 IMAGE *.208K'I',1D.43177 ',81.43,'I 3290 3ISP 3290 31SP 'ENTER THE PERCENT DEFECTIVE ...... 3366 31SF 3310 DEEP 3320 INPUT P 3330 POP01ii 3340 FOR XNS TO C 3350 GOSU3 2666

B-2

3366 2376 3360

3396

IF Xm4 THEN PacptrnProb IF X006 THEN Pagp%&Prob.*scpt NEXT X

PRINT USING

26P1Pape6

3468 PRINT USING 3266 3410 31SP 3420 31SP DO3YOU MANY AN-RONE? 3436 32SF 34460 DRIP 3456 INPUT Moo 3466 IF ReSmeNO, THEN 2616 3476 COTO 3266 3466 REM NYPERGEONETRIC DISTR:3jTION 3496 IF X~l THEN ProbeS 3566 IF X(O THEN RETURN 2516 IF X)N THEN ProbeS 3526 IF X)M THEN RETURN 3536 Probe I 3546 F(1)*K 3556 F(2)0N-K 3566 FC3ISN 3576 F(4)0N-N 3566 F(S)oX 33596 F(S)oK-X 3600 F(7)*MNX 3616 FC6)oN.K-N.*X 3626 F(96N 3636 FOR 15.2 TO 9 3646 IF PCIs)(1 THEN FCIs)nI 3656 HEXT Is t 3666 ProbeProbef(l)eF(2)eP(3). :4).(F(5)eF($).FC7).F(6)eF(9)) 3676 FOR Isel TO 9 3666 (4 u(s3696 IF Ftls)(1 TNEN F(Is)al 3768 NEXT Is 3716 Ckel 3726 FOR Is*% TO 9 3736 IF FCls)ml THEN 3756 3746 Ck.1 3756 NEXT Is 3766 IF ChinS THEN RETURN 3776 6010 3666 3786 RETURN 2796 lissasole 3666 Kin1 3616 Ceoecept 3626 R.Ls~z* 3638 FOR Nag TO C 3646 COSUS 3466 3656 IF NOS THEN Pagp%*Prob 38666 IF X0)6 THEN PacptePsCpt.F.2b 3676 IF Pacps)- THEN Pacptal 3666 NEXT X 3690 DIUP *K.;jKg it Son.ipP&**;P&Cpt 3966 IF P"P%<.82 THEN 3940 3910 K.Ko1 3925 DEEP 3S30 C0T0 3636 3946 31SF 3956 D15P 'The probatility of~ #::.ptasict is ";Pacpt#I00;"% for *;K;"Dafectiv*& 3966 31SF *in the lot., 3975 OI$P 3956 O15P 19hat range do you wa-t to include on the OC Curve's Defectives Per L at Axis?" 3996 DISP 'The entry uswtbe staled a sinteger. 466$ 4616 4020 4636 4646 4656 4666 4676 4065 DISP DEEP INPUT maxx M~exmax.1 DISP 31SF EN!EIR THE DESIRED LAIE.ANG INTERVAL ON THE DlEFECTIVES PER LOT AXIS.' 3ISP *Th* entry uswtbe sta%*d as a& integer. DISP 3EEP

B-3

4080 4100 4118 4124 4130 4144 4150 4168 4170

INPUT Xint IF Nawtu)166 THIN Lim-is# IF Naxx(19s THEN Lfm.amau FOR 101 TO Lis P4(I).I K*Pd(I) Cagc~opt NaLsize Se9ample Als0 or FOR O TO C 4180 GOSUB 34S0 4200 IF XES THEN Pa(1,I)OProb 4231 IF X(>4 THEN P([email protected] 4920 IF Pa(1,I)>1 THNI Pa(I,I).1 4236 HNET X 4240 DSlP UWoek~d K a I 42$0 MNET 1 4250 600113 4640 4278 DSlP 4200 DSlP 'DO YOU WANT ANY SPECIFIC POINTS PRINTED7* 4290 DSlP 4300 &gap 4310 INPUT me# 4320 IF tessuMo- THIN 2010 4330 PRINT LIH(4);5PA104;*Op*r&%inq Charactoristic COC) Curve 4340 PRINT SPA(12);-Singlo Sampling Plan :n a -;Saa,1e1 I C '* ecp 4358 PRINT OPM(I4);"4NVS.erqome~rjc DistributionPobilta;LNI 4360 PRINT USING 4420 4378 PRINT USING 4400 4380 PRINT USING 4410 4388 PRINT USING 4428

4408
4410
4420

IMAGE 26XN*i0@fecttu~sI 7robabillli,


NARGE #02SX,Il Per Lot
1

ot~ Acceptancolj

ARGE te._____________

4430 4440 4450 4460 4470 4406 4488 4540 4510 4528 4530 4549 4550 4560 4570 4500 4580 4608 4610 4620 4630 4640 4650 4668 4670 4608 4680 4700 4710 4728 4730 4748 4750 4768 477@ 4700 47806 4000 4010 gaq2 4150 4648 4450

IMAGE *,20X.,I,3X,43.S,2X 1,80.45,1I lISP DISP 'ENTER THE NUMBER Of DEFECTIVES PER LOT.... DSlP DEEP INPUT K pop AmO TO C GOSUS32400 IF X&$ THIN PacpteFrob IF Mo)O THIN Pacp%%Pvob*Pacp% IF Poep%)I THNM fteptal NEXT N PRINT USING 4430;KPacPtqlOO PRINT USING 4420 DISP SISP 00S YOU MANT ANYMORE? DISP 299P INPUT Me$ If R*#uNO1 THIN 264: COTO 4440 nail cc CURVE PL.OTTER It 19072' PLOTTER 7,5 It O.v LOCATE 10,100,18,14t SCALE Go ftxx,0, 204 C9121 2 LAXISMntS.0-, MOVE 2*Xtnt, 101 Operating Characetristic Curve* LABEL I LABEL 'Sample SlX:.:;S~mpl*;1A~ctptAnCe Humber:*;C NIypwr0*.motc Probabilftiesl If DSmatNYPER1 THIN LABEL I B inomial Probabilities* IF lstowtSU14ONIAL THIN LABEL PEN 2 MOVE 0,19$ FOR Iml TO Lis DRAW dIaII00 HNET 1 PIN I MOVE **Xint.-S IF q5$atSSII"NOMAL* THIN LA2EL PERCENT DEFECTIVE' IF 5I 0%$,mUyPIR- THIN LABEL -DEFECTIVES PER LOT' MOVE Xinto4. 101

R-4

44660 4879 4966 4696 4966 4916 4926 4936 4946 4950 4966
4976

LABEL IPa(%) MOVE 120,120 RETURN IF Sc(>3 THEN 5226 REM Point of Control at Indifference Quality lisp DSlP *ENTER THE INDIFFERENCE QUALITY...." DSlP * ENTER THIS PERCENT DEFECTIVE AS A PERCENT. DISP step INPUT PS6p PlopuPSp6618 4966 FOR C-0 TO 56 4996 Asn(C+1)s(C+.6?)#'PS~p S60S CkwINTtAsn(C#I)) 5616 IF Asn(I)>Ck THEN Asn(I).Ck+1 5626 PaCSC*1)sC 50362 NEXT C 5646 IMAGE 2SX.-Single Sample Sampling Plans" 5656 IM1AGE 24X.1For An Indifference Quality of *,3D.2D,"%" 56s6 IMAGE ISN,' epac ml cetne apeAcpac 5676 IMAGE ISN," m Hu Nube Size : 1Ac::711 SI e Aer:.~'N Size!* cNumbVer 56so IMAGE 16X, 5696 IMAGE *1XJ3I,2I,.X4,XI 5166 PRINT LINC4) 5116 PRINT USING 5646 5126 PRINT USING 65S;PUSp*l66 9136 PRINT USING 5666 5146 PRINT USING 5676S 5116 PRINT USING 5666 5160 FOR lot TO 17 5176 PRINT USING 6SAnIaSIAs(17,a5I1)AnI4)PS,.4 5166 PRINT USING 50606 5196 KNET I 5266 PRINT LIN(2);SPA(16);ARny of theme plans can be evaluated by exercising Op tien SItLIN(4) 5216 GOTO 2616 5226 IF Sc(04 THEN 5856 5236 lISP 5246 DISP 90DYOU NAVE A QUALITY LEVEL AT WHICH YOU WISH A 99%. 95%, 90%, 50% 110 5256 DISP *5% OR 1% PROBABILITY OF ACCEPTANCE. 5266 5276 5266 5296 5366 5310 5326 5236 5246 5256 5366 5276 5366 3396 5466 5416 vISP DEEP INPUT Res IF Rs.NO* THEN 5706 DISP DISP *ENTER THE QUALITY LEVEL AND THE PROBABILITY Of ACCEPTANCE AT THAT DISP
*QUALITY

LEVEL.

BOTH ENTRIES MUST DE STATED AS PERCENTS.

*5426 5426 5446 5456 5460 5476 5466 5496


3566

Deep INPUT Pert*Pofa PertmPert'166 PofauPofa.IlSS IF Pofa..99 THEN Col=2 IF Pofas.95 THEN Colw3 IF Polam.9 THEN Cels4 IF Pefa-..S THEN Colo$ IF Pofaw.1 THEN Colu6 IF Pofaw..5 THEN Col.? IF Pofao..1 THEN Colo$ PRINT LINC4) IMAGE 2SX,-Singlo Sample Sampling Plans, IMAGE 2*X,-J.M. Cameron's Poisson Approximations' IMAGE 17N,-Wher* The Probability~ of Acceptance Is1,3D.2D,1% IMAGE 19NU~hon The Percent Defective Is 6v3D.2D#*%ws.' PRINT USING 5456
IMAGE
*
_______________________

5516 IMAGE Poisson 1


5526 IMAGE

Percent Defective Specifications For Which The


________________________________

B-5

5520

IARGE "iSamplejAcceptancel

Ampproximation Or the Probabillty of Accepta& 1 95% 1 99% I-,?(4.2D,-I)


0

554-6 TGE 'I Size I Number


5560 5e57 PRINT USING 5460

1 99

1 0%

SUN "M GS,-.- IX,4,,IX,-I.4X,25,4X,


550 5590 e560 510 5620 5430 5648 5650 5660
5670

PRINT USING 3470;Pof~losI PRINT USING 54Si;Pert*lS0 PRINT USING $SSO PRINT USING 5510 PRINT USING 5520 PRINT USING 5540 FOR leiTO 21 F(2)oJmc(ll) s$mejec(ICo))'Pert
CkolNT(SamS) IF Sam)Ck THEN SAs.Ck.

5710

5690 5700

F(2)sJmc(II) POR Jw2 TO 8 F(J*1)mIOOeJmc(IoJ)4am

5720 NEXT J 573O PRINT USING 555OF(I),F(2),F(2),F(4),F(5),F(6),F(7),FCS).FC9) 5?40 PRINT USING 5520 5750 NEXT I 5760 PRINT LIN(2);SPA(IS)I"Any of these plans can be evaluated by exercising Op tion WILIM(4) 577i GOTO am10 5?00 lisP 5790 lISP * TO EXERCISE THIS OPTION, YOU MUST ENTER ONE OF THE OPTIONAL POINT a SPECIFIEDI" $401 lisp 5010 DEEP 5020 lISP TRY AGAINI I 5040 5050 safe 5?70 5600
INTl

GOTO 2910 IF Sc 2 THEN lat1 lIsP FOR 1o1 T0 6 IF 101 THEN DISP *

Enter the Acceptable Ouality Level,

STATED AS A PERC

5090 IF 1.2 THEN VISP * Enter the Lot Tolerance Percent lefectiueoSTATEI AS A PERCENTI " 59N0 IF 1s2 THEN DISP * Enter the Producer's RiskSTRTEI AS A PERCENTI 5910 If 1.4 THEN DISP * Enter the Consumer's Risk,STATED AS A PERCENT! 5920 IF Is5 THEN lISP * Enter the Producer's Risk Tolerance limitSTATED AS A PERCENT 1 * 5930 IF Io1 THEN BISP " Enter the Consumer's Risk Tolerance limitSTATEI AS A PERCENT I 5940 slIP e5se DEEP 5960 IF lot THEN INPUT Rqi 5970 IF 1.2 THEN INPUT Ltpd 590 IF l1. THEN INPUT Alpha 5990 IF 1.4 THEN INPUT Beta 6800 IF 1.S THEN INPUT Atel 6010 IF lg THEN INPUT SItol Se0a NEXT I 6020 AqlwAqleIO6 6040 Ltpd-Ltpd.'1l 6050 AlphasAlph"lOO 606t lDei-leta'eil 6070 atol.stol.I.' 6ees Atolmftso.l"16 6oa9 Printin 6100 MaxnouIOsOsO 6ile DISP 6120 SItP I s0 YOU NHAVE A maXImUm SAMPLE SIZE? 6120 step 6140 DEEP 6150 INPUT Roe 616S IF ReN.NO THEN 6220 $170 lisp 610o DISP * ENTER THE MAXIMUM SAMPLE SIZEE 6190 lISP 6211 SEEP

R-6

621S 622S 6236 k a 6246

INPUT Mamn IMAGE 1,',-OI6,O*pt ionaI Single Sampling Plean Which IMAGE 16X.*Producer's Risk a ,'1XCnus' 3.3 3.D~~1X~e AOL-',3.23,21)* L LTPD-*.3D.2D."*./ IMAGE 16x,. nue' ap*Acetne 9ues I&X, 6260 IMAGE IOX,' 625 IMAGE of Nume:r Risk Ris 6266 62 6 6360 6310 6320 6330 6348 6356 6366 6370 6366 6361 6396 6466 6410 420 66438 6446 6456 6466 6470 6486 6496 6566 6516 6526 6533 Vtstm*3IMOMIAL* PRINT USING 6226 PRINT USING 63;lh.6.tl16 eaI63o PRINT SPAC12)'D1(PnomJsl Probabilitiesll PRINT USING 6246 PRINT USING 6256 PRINT USING 6266 REM *0055 NOLDING ALPHA ###to Coo Samplemi BEEF IF Sample)Msmn THEN 6626 Papu"eIXP(Sampl@*Aql) Ckm1-Pae Ck2mAlpha-Asol IF Ck2(.6 THEN Ck2m.665 IF Ck(Ck2 THEN 4646 SamplesSamplo*I GOT* 6366 IF Samplo(I6 THEN LoumC+1 IF Saaple)m16 THEN LohaSaaplo-16 FOR $-Low TO Sample+1SSS PuAql Xe6 G05153 2666 ies~ikul-Prob PmLpd

t3.D3.3 it

16Al1SLp.6

6355 COSUS 2666 6566 CeitkmPeeb 6576 IF CA3SCPrisk-Alphs)(.Atoll AND (A35(Criok-3.ta)(.Rtol) THEN PRINT USIHG 6 2761S, C, Prieko16, Cii akelg 6566 IF (ADSCPrisk-Alpha)(ofA,.l) AND CA3S(Crisk-3eta&(3tcl) THEN PrintePrint#i 6596 IF CA2SCPrisk-Alph&)<mA%ol) AND (A3SCCiiek-Sea)(.3%ol) THEN PRINT USING 6 240 6666 IF Criek(Sos-3tol+..64 TENt 6626 6616 NEXT S 6626 FOR Cal To 56 6636 SamplesC.1 66461 IF Sampl*>Ilamn TNEN 711@ 6656 P4am.e9XPCSsfPl@*AqI) 6666 Cueupap 6676 FOR P~ssmi TO C 6696 6766 6716 6726 6736 6740 6756 6766 0776 6766 6796 6666 6616 6626 6630 6646 6656 6666 6676 6666 66g6 6066 6916 6926 CUDBCum*Pap IF Cub)1 THEN Cumml NEXT Pass CksAlpha Ppiskel-Cum If Piisk(mCk2 THEN 6766 Samplousampl..1 IF Samole)Naic THEN ?116 GOTO 6646 IF Sasplo>Maxn THEN 7116 IF Samplo(25 THEN LwusC+l IF Sampl.)25 THEN Lowalasplo-25 FOR $-Low TO Sampl**1666 IF $>Mamn THEN 7646 PiAgl1 FOR X.6 To C GOSUS 2666 IF X.6 THEN PiiskePg-.b If X( " THEN PpiskPPiob+Prisk IF P.1.1)1 THEN Priskel NEXT x Piefk*1-Prisk PLPd FOR Hal To C

B-7

6936 GOSUP 26S6 56140 IF X88 TNEN CreskinProk 6956 IF X04 THIN CisakoProb#Crisk 5696 If C'1%k)1 THIN Criskel 6678 INETX 6ges DEEP 69S0 IF (AVS(PriSk-Alph&)(w~so1) AND (ASS(Crtik-lota)(0s~o1) THEN PRINT USING 6 276:SC,Prisk*1**,Cr~sk*%66 PRINT USING 6 7660 IF (APS(Pr sk-AjphAL)(.A~o1) AND (SCtsP.amP1)THEN 240 7036 IF (AvS(Pifzk-A~ph6)<.A~o1) AND (SCfk-.)6PO)THEN Print-Print*I

7626

IF

Crfsk(leta-lIo1#..64

THEN 7646

?063 HNET S 7640 DISP WHILE HOLDING ALPHA TO WITHIN 5A~*6;NOF THE SPECS 7656 Dlisp FICATION, 7660 DISP "DO YOU MANT TO EXAMNIE PLANS WdITH AN ACCEPTANCE NUNPER EQUAL TO';C.I 76r6 DISP 766IPUT as ?180 IF RUNHO' 7110 HNET c
?126 NEW in....

THEN 7126 HOLDING PIITA


*400*

7`130 7146 7150

7168
7176 7100 ?IS6 7206 7216 7226 ?230 7246 7256 ?260 7270 7206 7266 7310 7326 7326 7346 7356 7356 7370

Cal DEEP IsaplesI PapalIXP(iSaxp1*Lspd) ChuPap Ck2.ksea-111eI IF Ck2(uf TNEN CkhasOOS IF Ck<Ck* THEN 7246 S&&plewSaapl.*I IF $ampte)-aftu THEN 7420 GOTO ?1ee IF Sample(16 THIN LotauC*1 IF Saaple>m10 THIN Lowm$&mplo-I0 IF Sample)nau THIN 7426 FOR SoLow TO Saaplo+16 IF S)Nexn THIN 7426 PwLspd GOSUP 2566 CrfskeProk Pw~q1 Xm6 GOSUP 2566 Prisket-Prob IF CARS(Puisk-Alpha)(oft@1)

AND (ASS(Crisk-2fS)(SltO)

THEN PRINT USING 5

A6P4&AhaintS 7366 If 246 7390 If (At35(PPIsk-ARphC)(ftAS@1) AND (AlS(Crisk-Pinta)(iP%ol) THEN Pr~hintPi-Int*1 7466 IF Prisk)Al1ph&+A%o1#.604 THIN 7426 7416 HNET S 7426 FOR Col TO 56 7436 PEEP 7446 Sasplin.CoI 7456 IF Samph.)N~amn THIN 7966 7460 Papal.INXPtSaa#1~nLOpd) 7470 CummPap 7466 FOR Passol TO C 7498 PapoPapinSaspi .Ltpd1P~s* 7500 Cumocus*P&4 7516 IF Cum>I THEN Cuesti 75326 NEXT Pass 7530 Crisk.Cuin 7546 CkuCrisk 7250 IF Ck(Ck2 THEN 7590 7570 7566 7566 7666 7516 76*0 7630 7640 IF Sample>11mfn THEN 7906 GOTO 7456 IF Saap1&(25 THEN LeuinC*I if Sample)25 THEN LowaSaapI@-25 FOR $OLov TO Sampl.*1888 IF 1>flaxn THEN 7630 PwL~pS FOR X%9 TO C

AND (PCH&in)(PO)THEN PRINT USING 6

B-8

7615 7660
7678

GO4UD 2600 If Has THEN CriskeProb


IF X<)l THEN CrlskoProboCrisk

7680 7690 770? ?710 7720 7730 7?40


7?50

IF Crisk)I THEN Crisk-i NEXT x PUAq1 FOR Xsf TO C GOSUB 2600 IF X%9 THIN PriskeProb IF Xt>9 THEN PriskmProb+Prtsk
IF PPIsk)I THEN Priskel

7760
7770

NEXT X
Priskel-Prisk

7700 IF (ADS(Prisk-Alpha).Atol) 2?OiCoPritskOIO ,Cr ske10S

AND (ASS(Crisk-3eta)(-D3ol)

?WEN PRINT USING 6


THEN PRINT USING 6 THEN PrintePrint.I

7790 IF (%DS(Pr|ik-olph&)(sAtol) AND (RAS(Crlsk-1et&)<3t.ol) 240 7000 IF (ADS(Prisk-Alph&)(.Atol) AND (ASS(Crisk-Seta)<(3tol) 7010 IF PFrsk)Alpha.Atol..004 THEN 7030 ?020 NEXT S

7?40 3ISP WHNILI HOLDING BETA TO WITHIN ;3te100;k OF THE SPECIFI CATION, 7650 3ISP ISO YOU WANT TO EXAMINE PLANS WITH AN ACCEPTANCE NUMS[R EQUAL TO-;Cot

7070

DEEP

?800 INPUT as 790" IF R~oNO* THEN 7910 7900 NEXT C 7910 IF PrintIs THNIH PRINT LIN(2);*No plans were found that saittliled the state d design t.oer&nces.*;LIN(4) 7920 IF Printsi THEN 3ISP 7303 IF Prints# THEN 3ISP *YOU CAN LOOSEN THE TOLERANCES ON ALPHA & BETA AND TR Y AGAIN, IF YOU WANT TOI* 7940 IF Printis THIN 3ISP 79r0 DEEP 7960 FOR 1le TO 5 ?660 IF Xu6 THNE CriskeProb 7676 IF X(NS THEN CriskeProb*Crisk 7680 IF Crisk)I THEN Criskel 7690 NEXT X 7766 PsAql 7710 FOR Koo TO C 7720 GOSUB 2666 7790 IF X%4 THIN PriskeProb 7740 IF XI)f THEN PrtskeProb*Prlsk 7758 IF Prisk)l THEN Priskul 7760 NEXT X 7770 Priskil-Prisk 7700 IF (AVSCPrisk-Alph&)(<Atol) AND CA3S(Crfsk-Deta)(<3.ol) THEN PRINT USING 6 270;SCPri skqtO4CrisklSlO 7790 IF (AIS(Prisk-Alpha)(mAtol) AND (A35(Crtsk-Deta)(33t01) THEN PRINT USING 6 240 7600 IF (ANS(Prisk-Alpha)(uatel) AN) (A3S(Crtik-Deta)(mDt.1) THEN PrintmPrint.S 7010 IF Prisk)Alph&*Rtol..604 THEN 7630 7P20 NEXT S 7030 3ISP 7040 I1SP WHILE HOLDING BETA TO WITHIN W ;3t.1el06;X OF THE SPECIFI CATION, 7850 DIOP ISO YOU WANT TO EXAMINE PLANS WITH AN ACCEPTANCE NURIDER EQUAL TO;C.I

7070

DEEP

7000 INPUT Re 7090 IF RsuINO" THEN 7916 7900 NEXT C 7910 IF Printsi THEN PRINT LIHC2);*No plans ware Found that satisfied the state d design teler&nces.,;LIN(4) 7920 IF Printvi THEN DISP 7936 IF Printsi THEN I1SP *YOU CAN LOOSEN THE TOLERANCES ON ALPHA SETA AND TR B V AGAIN, IF YOU WANT TO1 7940 IF Printsi THEN I1SP 7950 BEEP 7960 FOR l1o TO 5 7970 WAIT 200-1#20

7906
7990 0000

DEEP
NEXT I GOTO 2010

B-9

sole 9020
8036 8046 0050 0060 0676 8000 0906 0120 0130 0146 0150 616" 0170 0100 6196l 6266

IF Sc()5 THEN arnie

FOR let TO 6 IF 101 THENM 315P ENTER 1TH1ACCEPTABLE QUALITY LEVL IF 1.2 THEN DIOP * ENTER THE LOT TOLERANCE PEWItCET DEFECTIVE IF 1.3 THEN 31SF ENTER THE PRODUCER'S RISKC IF 1.4 THEN DISP ENTER THE CONSUMER'S RISK IF 1el5THEN D1SP ENTER THE PRODUCER'S RISK TOLERANCE LIMIT IF 1.6 THEN DISP * ENTER THE CONSUMER'S RISK TOLERANCE LIMIT DSlP * THE ENTRY MUST 1E STATED AS A PERCENT! If 1.1 THEN INPUT IF 1.2 TNEN INPUT IF 1.3 TNEN INPUT IF 1.4 THEN INPUT IF 1.5 THEN INPUT IF 1og THEN INPUT NEXT I Aq1uAq1les0 LI pdeLIpde1 66 Aql Ltpd Alph& aeta At.1 Niel

8220 Amxsametessess 0230 DISP *IS THERE A CONSTRAINT ON THE MAXIMUM SAMPLE SIZE?* 0240 31SF, Ba56 SEEP 0260 INPUT Rest 0276 IF R06W.N0 THEN 6320 0200 Stop , Enter the maximum Sample SVae 03"0 0316 6336 0340 0350 6366 0378 0300 0390 6400 6416 0420 6430 0440 0450 0460 0470 6400 0490 0500 0510 0520 0530 6546 0556 6560 0576 0500 0590 SEEP INPUT Maxima 31SF " 1S TNERE A FINITE LOT SIZE? DSlP sEEp INPUT Res$ If ReassuN0 THEN DissS.SINOMIAL' IF Ress.'NO THEN 0466 SlOP slISp ENTER THE NUMBER OF UNITS COMPRISING THE FINITE LOT SIZE

DISP DEEP INPUT Lola* IF PMaxsa&)Lsiae THEN MaxaaafLmize DistSw.NYPER Prinusw FOR let TO 15 FOR Je1 TO 17 IF S165c(I)>.SIG~s(J) THEN 9356 IF SIO5ms(.)),Mamsam THEN 9360 IF DissS.NYPER1 THEN 6696 .081455.3) CeslOescI) PwAql FOR Kee TO C GOSUB 2ges IF NOO THEN Pa(II).Prob IF X<)@ TNEN P(,)PC,)Po NEXT X "as0P.Lpd 9610 FOR XeS TO C 6626 GOSUS 2690 6630 IF X&O THEN PaC2.1).Prob 6640 IF X(>6 TWEN Pa(2,I)OPaC2,1)+Prob e656 NEXT X 0670 Rlicakpc.a(.I)o160 0606 GoTa to50 O69o NmLsive ar66 Nm1o~s(J) 0716 Ces1OscIl) 0720 K-AQI*Lsize 0736 IF KvINT(K) THEN 0262 0740 VISP

B-10

630940

0754 DISP "The product of ROL and Lot Size is equal to *;K;". ?P'isis the n uaber otf 9760 lISP 'defoctives er lot which must be an integer, so *^%or the number of d eftct ives" 0770 DISP 'per lot that corresponds to ROLE' 8730 DISP 9790 DEEP se00 INPUT K @I$I COTO 6730 0320 FOR XwO TO C 9a38 GOSUD 2480 IF Xm9 THEN Pa(1,I)wPpob 0050 IF X<)& THEN P~,)~(*~Po 066609MU 0070 NEXT X 3503 K&Ltpd*Lsize 9039 IF IKmINTCK) THEN 0990 *996 DISP 0913 DISP 'The product of LYTPD and Lot Size IS equal to ';;* This IS the number of I 092f DISP 'defectives or lot which must be an integer, So e"ter %he number of d efeetives' 0930 DISP 'per lot that corresponds to LTPDII' 3943 DISP 3950 DEEP aosg INPUT K a970 COTO a096 6930 FOR Mae TO C

0990
9069 9310 9020 9030 9050

COSiJD 3496
IF Xm8 THEN PaC2.I)mProb IF X<>4 THEN P(,~~(,)Po PRE NEXT X

9040 COTO 666a 9064


IMAGE SWOPtional Single Sampling Plans Via MIL-STS-i9WI DHEp 9070 in"!E :X'__________________ g000 InAgE OX:llapl ccoptanciiI rodvucerlsr-onumr5 RisTk Number IRisk 9990 IRAE *.ax,'ISize D2,% VISO IMAGE 1%X,*For AOL *'.3D.2D,*% 6 LTPD * pD2,2ll'' Risk meet Producer'$ 9110 IMAGE SX,*That '9120 IMAGE SX.'And seet Consumer's Risk m3,l'.l2,~ THEN 9150 9130 IF (M2SCRIskp-Mlpha)(*Atol) ROD CADS(Riskc-3ea, .tl 9140 COTO 9350 9150 IF Print()# THEN 9329 9160 PRINT LINCO) 9170 PRINT USING 9550 9106 PRINT USING 9I66;Aqlol8oaLtPde300 9190 PRINT USING 9116JAlph&.Atol 9200 PRINT USING 9120;o%&.tDtoI 9213 IF DIstoe'DINOMIAL* THEN 9250 9223 PRINT SPAC24);'Lot Site a 'ILsize 92238 PRIN4T SPACIS); 'e4lypergeooetric ProbabilIities** 9240 COTO 9260 9250 PRINT $PA(01-44'00einomial ProbabIl Itieseeee' 9260 IF Maxsam<1000090 THEN PRINT SPA(9);*Ma~imum Sample Size Constraint:';Kaxs am 9270 Print'S 9203 PRINT USING 9707 9290 PRINT USING 9800 9333 PRINT USING 9093 9310 PRINT USING 9074 xI 'X6.X'I,22.''6.l 9320 IMAGE *X''5. 9233 PRINT USING 9320;Slass(J),S10sc CI).Riskp.Riskc

9340
9350 9366 9370

PRINT USING 9670

NEXT J NEXT I IF Print<)@ THEN PRINT LIN(1);"A compet O Crv for any of these plans tf I.H.A."thi! program sgment'% sinOE'ILINC1IO x~ebALeR 4011iUHRIA NCNRIAFLIH(6)1'Ho Plans. simultaneously' meeting the design AN tolerances en Producer's and'

~rIt

B-11

IF Print-@ THEN PRINT 940S V Obtaining optional plans.* 4140 GOTO 261t

this .*.-running

option will

incgase your Chance$ 0

B.-12

APPENDIX C DOUBLE SAMPLING DESIGN AND ASSESSMENT SOURCE CODE

APPENDIX C DOUBLE SAMPLING DESIGN AND ASSESSMENT SOURCE CODE

2066 2:16
2626 2636 2046 2656 2069 2067 2660 2090 2106 2110 2126 2136 2146 2136 2166 2170 2166 2190 2266 2220 2226 2236 2240 2250 2260 2270 2280 2290 2380 2316 2326 2236 2346 2358 2366 2370 2320 2390 2400

REM DISP
3iSF DISP " DISP * 3iSP * ISP

*eee DOUBLE SAMPLE DESIGN AND-OR RISK ASSESSMENT a...


) Double Sampling Plani Option Description )Double Sample Operating Characteristic 1 Option Menu ( Select Code

Curve Construction And Risk Assessment .............. IDouble Sampling Plan Deriwatlon, ) Via Poisson 10% for

3ISP
DISP ISPF 3iSP
* *

Approximation of ALPHA - 5% AND let&a

Given Specifications of AOL 6 LTPD .................. )>ouble Sampling Plain Derivation from MIL-STD-ISSD Acceptance'Rejection Numbers and all Sizes. Stated Sample or Nyper-

3ISP " DISP " D3SP 3iSP " 31SP


*

This option provides a Binomial

geometric

Assessment of Alpha and Dota for Stated The assessments are limited to

AOL & LTPD values. R

the feasible combinations of sample size and accept reject numbers specified in MIL-ST0-1605 ............ 3 4

DISP *

>EXIT this

Selected Option...........................

3ISP 3ISP *ENTER THE SELECT CODE OF THE DESIRED OPTIOH.3iSP 39EF INPUT Sc IF Sco4 THEN RETURN IF Sc(1 THEN 7140 FOR lt TO 6 IF 1.o THEN 3ISP * Enter the First Sample's Size .... IF 1.2 THEN 3ISP " Enter the Second Sample's Size .... " IF 1.3 THEN 3iSP * Enter the First Sample's Acceptance Number ..... IF Im4 THEN 3ISP * Enter the Second Sample's Acceptance Number ..... IF 1.5 THEN DISP * Enter the First Sample's Rejection Number .... " IF log THEN 1SPF Enter the Second Sample's Rejection Number .... 31SP DEEP IF 1.1 THEN INPUT 3ss1 IF 1.2 THEN INPUT Dss2 IF tel THEN INPUT Dapi IF 1.4 THEN INPUT Dap2 IF 15 THEN INPUT Drea IF lag THEN INPUT Dre2 NEXT I SamplewDssS+Dss2 2416 3ISP " DO YOU HAVE A FINITE LOT SIZE? 2420 1DISP 2436 DEEP 2440 INPUT Ross 5 2450 IF Reos$*NO' THEN Dist$e. INOMf1IL2466 IF Res~ssNO* TNEN 2626 2476 3ISP * ENTER THE FINITE LOT SIZE 2466 31SP 2496 DEEP 2560 INPUT Liize 2516 RitiomSampleoLsize 2526 IF Ratio>&.I THEN Dist$s.NYPER" 2530 IF Ratiole.l THEN 4826 2540 D3SP *Since the ratio of total possible sample size to 1ot size is less.th an 10%., 2556 DISP 'it maybe acceptable to use a linomial Approximation to the Nypergeom

etric.1
2566 2570 2560 DISP '90 YOU WISH TO USE THIS APPROXIMATION?* 3iSP DEEP

C-1

2590 2606 2616 2626 2636 2646 2656 2"f0 2676 2600 2965 2700 2710 2726 2730 2740 9 2755 2766 2770 2706 2790 2000 2316 2026 2636 2040 2230 2806 2670 2500 2990 2905 2910 2926 2936 2946 2950 2960 2976 2996 3600 3161 3402 3030 3046 3050 3066 3076 3660 3096 3160 31se 3120 3136 3140 3150 3160 3176 3190 3190 3220 3210 3220 3230 3240 3210 3266 3270 3204 3290 3300 3316

INPUT Res$ IF *em-*NO- THEN Di5sts-NypER* IF ROSR'VgS. THIN 3lst5-3INOMIAL' If 21151W3HYPER. THEN 4020 IF DistW&IIGNOIAL. THEN 3100 RtEi BINOMIAL SUBROUTINE IF (S-H(f) Oft (X(S) THEN Probe$ IF (S-H(S) OR (H(S) THEN RETURN IF (S-X.0) OR CXNG) THEN Prob-P^X(I-p)-($-X) IF (S-H-a) OR (X-S) THEN RETURN Probst FOR last TO H Prob-P,.b*P NEXT Is FOR last TO S-H bP~.(.s~1~C.p NEXT Is RETURN RE" HVPERGtONEYRIC DISTRIBUTION IF H(S THEN Probe$S IF H(S THEN RETURN IF H)K THEN Probe@ IF H)X THEN RETURN IF X)M THEN Probe$ IF H)N THEN RETURN Probst FQ)-K F(2)-N.K F(x)sM F(4)w-NF(S)wH Fc6)G-IcX F(?)m-N. F(S)st-N-Ic-n FcS)sN FOR last TO 9 IF F(IZ)(I THEN F(Zs)-j NEXT Is ProbaPreob*PloF(2)aF(3)*F4). CF(S).F(6).Fc7,.F(S).F(,)) F(Is)uFcls)..I IF F(Is)( THEN FMostNEXT Is CkoS FOR Iast To 9 IF FC1s)-I THENH 3060 CkeI NEXT IS If 0006 THEN RETURN g070 2973 RETURN RIM BINOMIAL EVALUATION Pe-st $-fasse Cetapl FOR H~s TO C C05UD 2640 IF H-S THEN P4(IvI.mProb IF X(01 THEN P&41,IuProb*Pa(II) NEXT H Cent()se FOR HmC# To 3'r.I-s Con(M)OH GOSUD 2648 Cenp(X)wfeob C~flt(I)-C*9ft%(1)#Cep(H) NEXT X RAnCI )m3ssI#Con~cIb.3hss $muess Pa(20l)84 FOR 1C.I# To Dre2.2FOR X"I TO Dr*2-1-Con(I) GOSUS 2640

C-2

3320 Pa(2.1).Pa(2,1)+Conp(I)eProb 3330 NEXT X 3346 NEXT I 3350 PaC2.1).Pa(1,1)+Pa(2,I) 3360PrlI.-al1Cot) 3376 PrC2,I).1-PaC3, I) 2330 IF PaC3,1)(.02 THENM 3446 3390 IF CPA(3.1)(.9) AND (Pa(3,1))-.23) THENM P.P..01 3400 IF PaC3.1))..9 THENM P.P..05 3410 IF PaC3,1)(.25 THENM PoP*..0 3420 DIOP P 3430 GOTO 3120 3440 DISP *The Probabilityr Of acceptance is8;Pa(3vI)#IS0;*% at percent defoctiw 3458 3460 CTIVE 3470 3480 3490 3596 3510 3520 3530 3540 3550 3560 3570 3560 3590 2600 3610 3620 3630 3640 3650 3660 3970 3630 3690 3760 3710 3720 3736 3740 3750 3760 3770 3700 3790 3000 3010 3020 3030 3040 3050 3070 3000 3090 3900 3910 3920 3930 3940 3950 3960 3978 3900 3990 IDre2 4000 4010 4020 DISP 'equal .P10. DIOP WHMAT RANGE DO YOU WANT TO INCLUDE ON TNE OC CURVE'$ PERCENT DEFE AXIS? DISP * The entry must be stated as a percent(i.e.. fifty~ percent is 50 DISP DEEP INPUT Maxx flaxxwoamxx. DIOP 'ENTER TNE DESIRED LABELING INTERVAL ON TNE PERCENT DEFECTIVE AXIS." DROP * The entry must be stated as a percent(t.e., one percent Is 1). DSOP SEEP INPUT Xint IncwMax~.'I00 FOR tel TO 100 PdCI)wlelnc: PlOP DROP Pd(I) PwPd(I)e100 Saellal CoDaeI FOR X*0 TO C GOSUS 2640 IF X-9 THEN Pa(l,I~wProb IF X08 THENP~.~urbPalZ NEXT X Cen%(I)m8 FOR MwC+I TO 3ral-I Csn(eX~ GOSUD 2648 ConC(X)uProb Con%(I)udon%(l)+Conp(X) NEXT X Asn( I)sDsI+Cent (I *asa2 0mD*&2 Pa(2.).04 FOR JnC#I TO Dr*2-I FOR XwS TO Dr*2-1-Con(J) GOSUU 2640 Pa(2, I uPa(2 I)+Costp(JeProb NEXT X NEXT J PrCI,I).I-Pa(11 1)-Con%(I) Pr(2 I )uI-Pa(3. I) NEXT I Lioulle GOSUD 4510 DROP "DO YOU WANT ANY SPECIFIC POINTS PRINTED?' DROP $REP INPUT Rgo$ IF Re~s"NO 114CM 2010 PRINT LINC4);SPA10;);Risk gwaluation For the Double Sampling Plan' PRINT SPA(19);-First Sample: n -*;Vast;, Accept on *;aIReject PRINT SPA(lO);"Oecond Sample: n a ";9ss2;

on"

I,11ra

Accept on *;Dap2;', Reject on

PRINT SPA(I7);g(34nomial Distribution Probabilitihs)';LINdI) PRINT USING 4060 PRINT USING 4070

C,3

4636 4646 4656


4666

PRINT USING 4666 PRINT USING 40t$ PRINT USING 410S


IMAGE
____________________________

iwr~i rr
460 IMAGE 1
4166

I first-Samoi. Risks I Plan. Risks Percent JAectptance IConttnue I R*Jection tAccepsa,.ce f R.jecsi

an ISampl* 1* "t3.4ecsiv.IPrsbabIisityProbab4IityIPf-o4bailtiIpIPrebab4ilty4Probab IMAGE 4469


IhMAGE_________________________ _____

4120 4136 4146 4156 41S6 4176 4166 4190 4266 4216 4220 4236 4248 4256 4266 4270 4280 4290 4366 4216 43226 4)36 4346 4350 4364 4376 4366 4390

DISP 'ENTER TN! PERCENT DEFECTIVE.... Blip DEEP INPUT P PP-PuSS S.3ssI CuDapI FOR XoG To C GOSUD 2646 IF X01 TNEN P&II~~o IF XoS TNEN P~,)~o.aI1 NEXT x Cons~i~oS FOR XwC.1 TO brol-I Coa(X~ox CONSU 2640 Conp(X)eProb Cent%(I leCensCI )#ConpCX) NEXT X Asnt(I).SssI.C.,nt(i)qss2 Sollsal Pa(2.00. FOR JwC#I To Dr&2-1 FOR Xub To Dr*2-1-Con(J) GOSU11 2646 Pa(t, I)DPaC2,I)+Cenp(J)*Prob NEXT K NEXT .1

4426 Pr(2,I)w1-Pa(3. I) 4436 PRINT USING 16P16Pc,.6,oszI6P,11ga3legPr 2,01)016,asn(I) 4440 PRINT USING 4166 4456 DISP DO3 You MANY ANYMORE? 4466 DRIP 4476 89EP 4466 INPUT Res 4490 IF Ro~w.NOa THEN 2610 4566 GOTO 4212 4516 REN OC CURVE 4526 PLOTTER IS 1902A, 4130 PLOTTER 7,5 IS ON 4546 LOCATE 10,160,19,160 4550 SCALE @.MaEK,0, 164 4560 CLUZE 2 4576 L9SKt9 S,$,-, 4566 MOVE Soeitn,161 4596 LABEL * Operating Characteristic Curue* 4666 LABEL 'First Sample: n.*;Dssl;': Cl.*;Vapig" 4610 LABEL 'Seond Sample: n-';Ds&21': C2*";Dap2;1 4626 LABEL I Binomial Probabilities' 4636 MOVE0,1066 4646 FOR Passel TO 2 4656 MOVE6.166 4666 IF Passel TNEN PEN 2 4676 IF Pasoo2 TNEN PEN 3 4606 IF Passel TNEN *US 4696 IF Pansu2 TNEN 0.3 4766 FOR Sol TO Lim 4716 DRAWPd(I).Pacg,I)o166 4726 NExT I

*le*;Drej R2-';Dr*2

C-4

4736 NEXT Pass 4746 PEN 1 4758 "OVE 3#X~n%,-3 4760 LABEL *PERCENT DEFECTIVE47?0 MOVE Xint'4. 361 4700 LABEL "Pa2%)4796 "OVE 1220,120 4660 GOSUB 6796 4616 RETURN 4626 WIM NYPERGEOMETRIC EVALUATION 4636 K.3a7 2 4046 NaLsize 4076 CmDapi 4666 FOR X-0 TO C 4696 GOSUS 2776 4966 If X-0 THEN Pa(1,1).Prob 4910 If XOS THEN PC,~~e~aa1 4926 NEXT N 4936 Cent(1).6 4494 FOR XeC41 TO Dr.1-1 4956 Con(X)uX 4966 GOSUS 2770 4976 Conp(X~u~prb 4966 Cent( I)uCe~nta)+Conp(X) 4996 NEXT N 5666 RSR(l1)w~ssI*Cont (1)3Ss2 5616 Mallsol 5626 NaLsize-Ilsst 5050 K.3ad-I 50666 FOR NwS TO DP@2-1-Con(3) 5676 GOSUS 2776 5666 P&(2 I )%Pa(2, I)#Conp( I)Prob 5696 NEXT X 5166 NEXT I 5110 XmIlad 5126 a8 1r~cI*sZj 51360 r11.-as1-ot1 5140 r21.-a31 51631 D 67 Fo Pr ;K;* defectives per lot, the Pa for. the plan is';Pa(3,a) 5166 3167 5176 If Pa(3.1)<.62 THEN 5216 5166 IF 7a(3.I))m.1 THEN KwK#S 5196 IF Pa(3,1.1 THEN XK.K.1 5266 COTO 4658 5216 3267 5228 3107 *The probability of acceptance 1;a356; at*;K;. defectives per Lot. 5236 3167 5240 3167 WHXAT RANGE 3O YOU MANY TO INCLUDE ON THE OC CURYKES DEFECTIVYES PER LOT AXIS? 5256 3117 The enttrye must be stated as an integer. 5260 3367 5276 DE3P 5286 INPUT Maxx 5290 Mammu~asxxl 5366 130107 5316 3197, EINTER THE DESIRED LABELING INTERVAL OH THE DEFECTIVES PER LOT AXiS., 53226 367 I The entry must be Stated &A an integer. 5336 3167 5346 DEE7 5356 INPUT Nint 5360 If haxxIG166 THEN Limumaxx 5376 IF tasx)o166 THEN LimuagS 53366 IF hamx(s166 THEN Incel 5396 IF CMax%(-200) AND (Ma~xx)106) THEN Incu2 5466 IF CNamx(u4$6) AND (Maxs)266) THEN Incs4 5416 If MA~xx~(u506 AND (Maxx>400) THEN Incell 5426 If ClMaxx(.666) AND (Maxcx>500) THEN Inc.6 5430 If Cftaxx<10966 AND (la~xx660) THEN IncelS 5446 FOR let TO Lim 5456 Pd(I)mD~a2*(2-I)*Inc 5460 3267

5626 5640

Pa(a.1)ml FOR IuC*1 TO br@2-1

C-5

5470 5466 5496 5566 5526 5530 5546 5536 5566 5576 5566 5596 5600 5616 5626 5636 5640

DISP PdCR) KePd(I) BadwK HaLsige CwbaPI FOR Xwe To C COSUD 2776 IF Nwe THEN PACI,1.wP'ob IF X(0S THEN PaCI.I)*Prob+Pa(I,I) NEXT N ConsdI). FOR XuCCI To Drel-I Con(X)*X GOSUS 2776 Conp(X)OProb Coflt(I)eConCI)*ConpCX) NEXT N AsnCI)m~ssI.ContCI)*Ds&2 MODSs2 NMLsize-Dssl Pa(2.I).6 FOR JwC.1 To Dre2-1 K.2ad-J FOR Nag TO Dr*2-1-Con(J) GOSUB 27106 Pa(2, I)*PaC2,I)+ConpCJ)*Prob NEXT X NEXT J

5656
5660 5676 5666 5690 5766 5716 5720 5736 5746 5750

5770P94a-a~,)cnZ 5760 PBE I~lPaSI 57960DE 5610 NEXT I 5626 GOSUS 6466 5636 DIOP ISO YOU WANT ANY SPECIFIC POINTS PRINTED?' 5656 50666 5676 5666 5696 DEEP INPUT Res IF Roea*N0 THEN 2616 PRINT LINC4);SPACIS);ftisk Ev~aluation For the Doubl* Sampling Plan" PRINT SPA(18);-First Sample: n - -;Dssl;- Accept on *;Dapl;', Reject on

5966 PRINT SPACIS);"Second Sample: n - ";Dss2;* Accept on ";Dap2;1. Reject on* 2Drf29L1H(I)1SPA(25);'Lo% Size a *;Lsize 5916 PRINT SPAl(I7);"NHyperqeom*%pic Distribution Probabtlisies)I;LINCI) 5920 PRINT USING 5970 5926 PRINT USING 5966 5946 PRINT USING 5996 5956 PRINT USING 6066 5960 PRINT USING 6616 5976 IMAGE ____________________________ 596 IMGE I First Sample Risks Plan Risks

59U IMAGE lge0foctiuelAccepsance IContinue I Rejection l~cceptance I Rejecti on Stample I* 9000IMAE *"I er otIProbabilityIProbabiliyIProbabilitylProbabilityIProbab
s61e

11itlINumber1 I MAGE

________________________________

6626
6626 6656 6660 6676 6666 6696 61906 6116 6126 6130 6140 6156 6166

IMG NW7 ,2NS2,2X,-I.5ss, .,4.s(~ DSlP 19TER THE NUMBER OF DEFBE*CDTIVES PER LOT.... BEEP INPUT K MaDast
NaLsixt

CODapI ad*K FOR Xwf TO t GOSUD 2776 IF NaGTHEN PaCI,1)aProb IF X06 THEN Pa(I.1IsPr~b*P4a,1) NEXT N Cont(I).0

6170 6160 6260 4210 6220 6230 62461 6254 6266 6276 6266 6296 6360 6316 6320 6236 6246 6356 6366 6386 *166, 6396 6466 6416 6420 6436 6440 6456 6466 6470 6466 6496 6586 6516 6526 6526 6546 6556 6566 6576 6560 g5ve 6666 6616 6626 6636 66411 6656 6666 $667 6666 6690 M70 6716 6720 6736 6746 6756 6766 *6776

FOR N.C+1 To D'r.1-I Con(X).N Csnp(X).Prob Coft%(I~oCont(l)*Conp(X) MNET X

~()Ds4Cn()0a

MaLsazt Deal N*D&*2 Pa(2,1)o0 FOR JoC.1 TO Dr. Kstad-J FOR XoS TO D,-e2-1-Con(J) GOSUB 2710 Pa(2,1)wPa(2,1)*ConpCJ)*Prob INETX INETJ Kwlad a31edl1*a2)

PtC1,1).1-Pa(3.1)-e%1 PRINT USING 62;,A1115Cn~16Pd,.6,a31.6,r, Asn( 1) PRINT USING 6616 DISP 90DYOU WANT ANYMORE? DISP, DEEP INPUT Re$ If Ro~o.N0 THEN 2016 GOTO 6036 REM cc CURVE PLOTTER IS '9072AI PLOTTER 7,11 IS ON LOCATE 16,166,16,166 SCALE G,Maxz,6, 164 CSIZE a LANES Nln%.,G,6,,-1,1 MOVE SoNint.101 LABEL I Operating Chawact~ristic Curve" Clo*;DapI; Rsl e LABEL *Firs$ Sample:h)Ds3 LABEL 5.eCsvd Sample$ .;Da~ C2o.;Da,2; R2.-;Drea LABEL * Lot 11tat * 'Lsizt LABEL * MVpergoometric Probab~lislesa MOVEr 0,100 poR Passol TO 2 MOVE 6,166 IF Passel TNEN PEN 2 IF Passo2 THEN PIN 3 IF Passel THEN Got IF Passw2 THNM 0.3 poR 1o1 TO Lis DRAW PdCI),P&CG,1)*168 MINT I MNET Pass PEll 1 MOVE 5*.Nu't-5 LABEL DEFECTIVES PER LOT. MOVE Ntn%14,161 LABEL *Pat%)* MOVE 126,126 GOSUB 6796 RIM 6766 RETURN 6796 DISP RELOAD THE PLOTTER. WHEN DONE, ENTER GO! 6666 DROP * 6910 DISP 6206 DEEP 6836 INPUT RO 6646 PLOTTER IS '907206656 PLOTTER ?95 IS ON 6606 Bige-IS 6678 FOR 1.1 TO Lis If AsnCI)>Btg TNEN SigmAsnil) 6666 6909 MNET 1 6966 MaiiywIMTC2iq)+3 6916 LOCATE 10,106,10,1S8 6920 SCALE 8,.Masx,S,Maml,*3

C-7

6932

CSIZE 2

6946 YIntalNT(Mmxyn2O) IF Vint(1 THEN Yintel 69is XintYint,,.I.-lI LAX9E 6996 997l MOVE 59xiflltaxyN Sample Humber Curve* Ruesarg 6966 LABEL I RI';Drel n"*;Dss1;': CI.';DaPl;" Sample: 699s LABEL *First R2--;D3r2 C2--;DaP2;" 7066 LAREL *Second Sample: n--;2ss2;-t - *;Lsiie Size Lot * IF Distpmo'HYPER' THEN LABEL 7010 HypergeoeetriC ProbabilitieS* THEN LABEL * IF Distfu*MYPER1 7S20 binomial Probabilities' ist$s0*NYPER" THEN LABEL * IF ?030 7?40 MOVE Xintni.,axy 7050 LABEL 'ASH' 7?6S MOVE 4*XintYint If Distl-"INOMIORLI THEN LABEL "PERCENT DEFECTIVE' 7676 IF Dist$0I)'NOMIAL" THEN LABEL *DEFECTIVE$ PER LOT* 7066 7696 MOVE 6IDsal 7ISS FOR lei TO LIn 7116 DRAM PdCI),Asn(I) 7120 NEXT 1 RETURN 7132 IF ScC)2 THEN 7630 7140 of twu types. The fir 1SF. *The Double Sampling plans addressed herein are 71%0 at type* u that of the first tuice 3ISP *specifies that the second sample's size is ?719 the 1 hilt size.' 31SP 'second type specifies that both samplts are of equal 717e 719? 7200 1SFP * 31Sp " IF IF YOU NANT OPTIONAL PLANS YOU MANT OPTIONAL PLANS IN NHICH n2 - 2(ni). ENTER A 1. INTER A 2.

721f

DiSP

IN WHICH n2 - nI,

DEEP 7226 el1 INPUT 7230 ul TO 2 FOR 7240 IN PERCENT IF lot THEN DRiP ' ENTER THE ACCEPTABLE QUALITY LEVEL, STATED 7250 FORM. * STATED IN P DEFECTIVE, PERCENT TOLERANCE LOT THE IF 1u2 THEN 31SP * ENTER 7260 ERCEHT FOR"." 31SP 7290 BEEP 73?6 IF 1o1 THEN INPUT Aq1 7318 IF 1.2 THEN INPUT Lpd 7322 7350 NEXT I 7266 RqloAqlte'I Ltpd&LtpdlOO 737? AlphaeAlpha'100 7300

7396
?400 7416 7420 7436 7440 7450 7466 7476 7416 749S 7506 7516 7526 7536 7546 7556 7566 7570 7566 7596

SetawletaIO0t
IF Wei51 THEN Lisy)1 IF $sl12 THEN Li06l? FOR Jm3 TO Lis 3ssleINTCeea(SeIJS)0AQ1) Pr(lj)uDlsl IF Selel THEN Pr(2,J)u2*Dssl IF $01.2 THEN Pr(Z,J).Dssl P&(I.J)oAql P&(2,J)6Ccqa(Sel,J,6)1Dss P&(3,J)mCcea(S*l,J,?)nDss1 P&(4,J)eCcea(Sel ,J,)eDssl Dssl INT(Ccea(*IlJ.?)eLtpd)#l Pr(3,J)o~s$1 0l1.1 THEN Pr(C4,J)w2ftsl IF IF Sol2 THEN Pr(4,J)mUDsI PaCSJ)mCctea(Sel ,J,5).Dss p FC ,J)6Cca(Sel,J,6)eDs51 Pa(?,J)utpd * .1o,i)eDssl pati. J).CCea~l NEXT J
IMAGE *

766?

PTs1

IMAGE1

ISampling Plin

Sfocificationl

Percent

Detective at

IAver

&-8

762!
Ie

J*

IMAGE IMAGE

"

Plan

ISample

Size

JlcceqpAnc*

Onlhich the

P(Accept&nce)Isaap

7T36

I.cnls I9
IMAGE

*"OpttonlFirst ISeconalFirst

Iweconalls Appromi-atelv p~xmktl

a~ Eanal

Iumb

7640
7650

IMAGE *.'INu-berlSa-pletSa-plqeiS-wplISapleI
_

95k

5e%

1e% Spa-.,

,i6,b
7676 7626
7696

IMAGE *,'l',x,4D," I1,4(6D.1,3(2,.4D.,I),4D.2DI


PRINT USING 7600 PRINT USING 7610
PRINT USING 7626

7768

PRINT USING 7636

7710 PRINT USING 7640 7728 PRINT USING 7650 7730 Count-i 7740 FOR J-1 TO Lis 7756 CountmCount*I 7760 PRINT USING 7666;CountPrdI,J),Pr(2,J),CceaCDeI,J,3),Ccea(Sel.J,4),P4(iJ) a160,Pa(2,J)e166,Pa(3, j)mlOO,Pa(4. .) 77,7 PRINT USING 7rs5 7760 CounmCount.l 7790 PRINT USING 766?;CountPr(3,J).Pr(4.J),Ccea(Del,J,3).Cce&(Sel.J.4).PaCSJ) eIOO,PaC6,J).ISS,Pa(?,J.)e166.Pa(0. J) 7966 7616 7626 7230 LINCI) 7640 795# 7660 PRINT USING 7650 NEXT 3 PRINT LIN(2);"Exact

risk assessments

are awualablt for any selected plan b


of the Double Sampling Menu.";

PRINT LIN(2);*exercising COTO 2026 IF 5c()3 THEN 2016 FOR lot TO 6

selection number I

7676

lisp

IF lo1 THEN DISP " ENTER THE ACCEPTABLE QUAI.ITY LEVEL, STATED AS A PERCEN 7.06 T. " IF 1P 2 THEN DISP " ENTER THE LOT TOLERANCE PERCENT DEFECTIVE, STATED AS A 7809 PERCENT. 1 STATED AS A PERCENT. ml3 THEN DISP * ENTER THE PRODUCER'S RISK, IF 7966 IF 1.4 THEN DISP , ENTER THE CONSUMER'S RISK, STATED As a PERCENT. 7910 PRODUCER'S RISK, STATED TOLERANCE ON * ENTER THE DESIGN IF Ins THEN DISP 7926 AS a PERCENT. * 7936 IF 1.6 THEN DISP * ENTER THE DESIGN TOLERANCE OH CONSUMER'S RISK. STATED AS A PERCENT. 7940 DISP 7956 DEEP 7966 IF 1le THEN INPUT Aql 7976 IF 1-2 THEN INPUT Ltpd IF I1. THEN INPUT Alpha 7906 IF 1.4 THEN INPUT leta 7996 se0s IF 1.5 THEN INPUT Aeol IF liE THEN INPUT Itol 6016 6626 NEXT I AqlfqtlOll0 6630 Ltpd.Ltpdi'I6@ 0046 a5so DISP 0666 DISP *IS THERE A CONSTRAINT ON THE NUMDER OF UNITS THAT CAN IE SAMPLED'6676 DISP INPUT Res$ 066 6090 IF Re*$'NO" THEN MaxtammISSO00I HO"mN THEN $160 IF Res alo o1l$ DISP 6126 DISP 'ENTER THE MAXIMUM NUMBER OF UNITS THAT MAY BE SAMPLED.' 6136 DISP DEEP 6146 0150 INPUT Maxoaa SO YOU HAVE A FINITE LOT SIZE?" *166 liSP * 6176 SISP DEEP 6106 6190 INPUT Res IF Re.HO THEN DiStSe"DINOMIAL" 6266 0210 IF ReNoYES' THEN Dist=HYPER THEN 0270 0220 IF ReE=NO 0232 DISP * ENTER THE LOT SIZE." 0240 DISP

6256
6260

DEEP
INPUT Loise

C-9

0620 la9e 6366 6310 6326 6330 6346 6350 6366 6376 6366 6396 $606 6416 6420 0436 6440 6456 6466 6476 6466 6496 6566 6516 6526 6546 6556 6566 6570 6566 6596 06666 0626 6636 6640 6656 9666 6676 6666 6696 6766 6716 6726 6736 674S 6756 6766 6776 6766 6969 666 06:0 6626 6636 6646 6656 6666 8670 6660 6690 6966l 6916 6926 6936

Pon 1ot TO 16 DISP DISP 1 Checks* FOR Jet TO 14 IF 2#K11*CJI)Mamsaa THEN 9968 IF M1C)ul(, THEN 9956 If 2*K1Is(J)<wK11r(!.2) THENM 9956 DISP TADM(J~ IF DttS.N1YPER* ?NEN 6916 P.A41 6.MHf1(J) Cutila(I,1) FOR .se TO C GOSUB 2646 IF Xul THEN P&CI,1).Prob IF X04 THIN PC,)P(,)Po NEXT X Con%(1)u6 FOR X.C.1 TO H11r(I.I)-1 Cof%(X)RX GOSUN 2646 Conp(X)mProb CenSCI)wC0"%(I)#CenPCX) NEXT X Pa(2,1).6 FOR J1wC.I To ilrp(I,g)-i FOR Has TO NhlrCIf2)-1-C~r1(J1) GOSUB 2646 Pa(2, I)Pa(2 I)+Conp(Jf )*Prob NEXT X NEXT J1

IF P&(3,I))ISS THEN P&(3,1)o166 Pr(2, 1)wSS6-P&(2, I) C*n%(ll.Cent(I)#366 P.Ltpd FOR X-0 TO C GOSUD 2646 IF Xa0 THEN P&(I,2)aPeeb IF H(O0 THEN PaCI,2).Pa(I,2)*Prob NEXT H CenstZVat FOR XwC.I TO MI~I1ConmeX~ GOSUB 2646 Conp(X)aProb Con%(2)wCon%(2)*Conp(X) NEXT H Azn(2)wN1l.(J)9(1.CenC2~) PaC2,2)a6 FOR Ji*C.I To Milr(I.2)-1 FOR Mwl TO Mtlr(I.2)-I-Con(J0 GOSUD 2646 P&(2.2)mP&C2,2)*CenpCJ0*~Prob NEXT X NEXT .11 P&(3,2)w(P&C1.2)+Pa(2,2))*IS6 If Pa(3.2))186 THEN Pa(3,2)o166 Con%(2)sCenC2)*ISS Pr(2,2)a166-P&CN,2) GOTO 9696 K-aq1*Ls~ze If KsIHT(K) THEN 9060 DISP ROUCT FACETLEULTYEELSLOT 31F DISP *NE T0UETEHYPERCEMEjTRI DRISLTRIUTIO.THI 6956 694

*;K SIZE IS P TRU MUT BE AN I

IM a R ENTER THE NUMBER OF DEFECTI VE$ PER LOT THAT IS CONSIDERED TO BE AC CUP?AN LI 6976 lisp 6966 DEEP 0990 INPUT K 9666 N-L&1zw

c-b0

9636 940

C::114(1,1) FOR xas 10 C

966 IF X. TEN Pa(I.1)eProb 9676 IF X()s THEN P(,~PC.)Pe NEXT(N 9666 966Cons(1).6 s1o FOR XDC.I To Mtlr(I.1)-1 91169 Con(X)BN Sia6 COSUB 2776 9 126 Conp(X)OPeob 9146 Cont(1)6Ceent(1)*Conp(X) 91# NEXT X 916 .s~eMil&(J)*+CA() 91e6 so 91 9266 :2I: 226 9230 9246 Pa(2,1)-.* FOR I~oC*I TO Milr(1,1)-l Kelad-It F:R Xw* TO Mllr(I.2)-1-Cevn(It) OSUP 2776 P&(2,I)wP&(2,I).Conp(I%)9Preb NEXT N.

926CnCI)e166oConz(1) 2920 If P&(3.1))I60 THEN Pa(3.1)e166 9290 Pr(2.1)u166-P&a3.1) 9360 KeLtpdLiZ.ola 9316 1F SKuT 1 THEN 9384 2921 P 'N PROUCT 2F LOT TOLERANCE PERCENT DEFECTIVE t LOT SIZE IS *;K 9336 31SF *TO USE THE HYPgRGEOMETRIC DISTRIBUTION. T141S PARAMETER MUST It AN I VS34VUDIP * ENTER THE NURBER OF DEFECTIVES PER LOT THAT IS CONSIDERE RIHAL.* 92541 DRIP 9366 BEEP 926INPUT 936HoLa I: K 9416 9426 9426 946 9456 9466 9476 9466 9496 9516 9526 9530 9546 9556 9560 9576 9586 Cafila(I,1i FOR Xw6 TO C FGOSUP 2776 I Xo6 TNEN P&CI,2)aProb IF X046 THEN P&C1,2).Prob#P&C1.2) NEXT x Cens a FORx ):! TO I(1)Cen(X)inX Cenp(X)in"ee cent (x)eC.. c2)*Coflp(X) NEXT X A.,(2)wMI 1s(J)#(I#Con%(2)) NiMGllS(J) MaLSIxe-Mils(J) P&aC2,)o6 FOR ItuC.1 TOMI(1)TO BE MR

,9966 FOR NUS TO MlrCl,2)-1-ConClz) 9616 GOSUS 2776 9626 P&(2,2)wP&(2,2)+Conp(It.Preb 9636 NEXT X 946 NEXT 1% 9656 P&(3t2)wI68ffP&(2p2)#P&(l,2)) 9666 IF P&C2,2))166 THEN P&(3,2)-190 9676 Pr(2,2)w166-Fa(3,2) 9666 Cons (2)aI0166Con%(2) 9693 IF (AlS(Pr(2,I)-Alph&)<.Asol) AND CABS(P&(3,2)-l@%a)(.blo1) 976If (ABS(Pr(2,I)-Alpha)(.Ato1) AND ABPa,2-e)CB 1 916 I CheckeI THEN 9966 9726 GOTO 9956

THEN Check-I THEN 9666

9730 IR~tc-l,

IRisk & Sampling Burden At Desired S I Criteria 9756 IMAGE IX.1j Sample fl' igcat on 1I I First ISecond lAcceatable Quality~ Lowell Tolerance size 97a0 IMGEI.* I.Defectiv* ASH Iet*% I PC Pa I Fc lAlgihal 9770 IMAGE IX,11 Istl 2ndIAcc1RejAIccIReiI

9796 9608

9016

I.1 Dt. ICDI,(DI,3(D IMAGE4,I IF Print<>* THEN 9930 IF Dist$S.NYPER' THEN PRINT LIN(4);SPA(20);INypergeometric

Probabilityi Eva

92IFDistS.3IN0MIAL* THEN PRINT LIN(4);SPA(23)3*inomial Probabllitl, Evalwa 9030 PRINT SPA(22):;Optional NIL-STD-1053 Sampling Plans-;LINCI);SPAC3S)"AQL0* ;Rql.Ig6;l% and LTPbD.;Ltpd*~I6;"%' 9646 PRINT SPACIS);,Producor's Risk -* ;Alphaj"Atol;1% and Consumer's Risk
9 590 -;Dea.~eg IF Maxsam(160980S THEN PRINT SPA(20);"maximum Total Sample Constraint:,;Fa

IF DistWHYPER' INEN PRINT SPA(2);'Lot Size - ';Lsize 9056 9676 PrtnimS 9609 PRINT USING 9730 9690 PRINT USING 9746 9900 PRINT USING 9756 9910 PRINT USING 9766 9920 PRINT USING 9770 *M aI2,ilc,)P aI )iirI 9938 PRINT USING ?0Mls)Mil()M ac3. I ,ContCI),PrC2. I),Asn(I),Pa(3,2),Cont(2)*PrC2,2),Asfbc2) 9940 PRINT USING 9760 9956 NEXT J NEXT I 9956 9970 IF Print-@ THEN PRINT 'No plans were focino -,c~h aet the cesign &pecific&t ions at the specif1*d'LIN(I);0Tolerancts. L qvr. tolerances S.triV &aianl 09966 IF Print-$ THEN 2016 these plans as obtainable t 9990 PRINT LIN(2);A complete assessment of t* extr isin o;LIHCIj;Cation 01 of this software seamen%.-;LIN(4)

C-12

APPENDIX D SEQUENTIAL SAMPLING SOURCE CODE

APPENDIX D SEQUENTIAL SAMPLING SOURCE CODE


2606 2110 2620 2636 RIM Seque: Wald's Sequential $&^piing Approach FOR 1.1 TO 4 DISP IF lo1 THEN DSlP' ENTER THE ACCEPTABLE QUALITY LEVEL. STATED AS A PERCEN

2646 IF 102 THEN DISP - ENTER THE LOT TOLERANCE PERCENT DEFECTIVE, STATED AS A PERCENTI 2656 IF tellTHEN DSlP 'ENTER THE PRODUCER'S RISK, STATED AS A PERCENT 2646 If 1.4 TWEN DISP - ENTER THE CONSUMER'S RISK, STATED AS A PERCENT 2076 DSlP 2666 DEEP 2696 IF let THIN INPUT Aqi IF 1-2 THEN INPUT Ltpd 2166 2116 If 1.3 THEN INPUT Alpha 2126 IF 1.4 THEN INPUT Dot& 21.36 NEXT 1 2146 AaI.AqleI6S 21,56 L%pdeLtpdeIS6 2140 AlphawAlpha/196 2176 lota.Betarilss Donom.LOGCLtp8OCI-Aql)"C(Aq1*(l-Ltpd))) 2160 2196 ILG(-iha4%)DfS 2266 H2-.LOG( C -S*3ea)Alph&)eD*flom 2216 SwLOG((1-Rql)eC1-L.%pd))/DSnom 2226 DISP DO YOU WANT A COPY OF THE DERIVED LINES? 2236 DSlP 2240 DSlP 2256 SEEP 2260 INPUT Re$ 2270 IF R.S.H10" THEN 2426 2268 PRINT LINC4);SPACIS);'Acceptance Line: X 0 -*;NI;*) +S1n 2296 PRINT %PA1I6);"Rvaclion Line: X a *;H2; 2366 FOR 1.1 TO 106 2310 Table(I,1~mt 2326 1'abletI,2).-NII*oI 2336 Table(1,3)-N2*S'I 2340 IF Tabl*(1,2)(6 THEN 2360 2356 CkmINTCTable(1,2)) 2366 IF CkaTable(1,2) THEN 2306 23?6 Toble(1,21-Cii 2386 Ck.INT(TabI.(I.3)) 2396 IF Ck*T~bie(t,2) THEN 2416 2406 Tablt(1,3).Ck.1 2416 NEXT 1 2426 DISP YOU WANT A TABLE OF THE ACCEPT/REJECT NUMBEPS VERSUS NUMBER SA 2436 lISP "DO MPLED? 2446 DISP 2456 DEEP INPUT R00 2446 2476 IF R*S."N0 THEN 2065 2466 IMAGE *,4(1

2496
2566 2510 2526 2536 2540 2556 256S 2576 2566 2596 2660 2416 2426 2536 *2646 2656 2646 2476 2666 2496 2766 2716 27`20

IMAGE

IMAGE * 4C:f UnitJ erewiv@ %~~]jjRj IMAGE 4( IMAGE *.,4(IK,SD,.I1,IKA1IX3,1 PRINT LIN(4);SPAc24)J1Wald's Sequential Sampling Table' PRINT SPAC24)IRQtL--l~ql416*;2%11- LTPDS.;Ltpd*100;*%* PRINT SPA(3S);1Producqr's Risks *lAlpha*I**6*% PRINT SPA(36);Consumoe's Risk.*se~e6; PRINT USING 2466 PRINT USING 2496 PRINT USING 2566 PRINT USING 2516 FOR lot TO 25 IF Tablo(1,2)(6 THEN T~bS(I)sNum*(162) IF Tabl*CI,2).6 THEN Tab$(I).Num6CI6I) IF Table(I*25,2)(6 THEN TabS63).NumS(162) IF Tabi.CI.25,2).6 THEN Tab9(3)mHumS(16) IF Tabl*CI*56,2)<6 THEN TabS(5)s.Num6(12) IF Tablo(I.SS,2).0 THEN TabS(5)wHumS(161) IF TableCI.75,2)(6 THEN TabS(7)sNumS(162) IF Table(1*75.2).S THEN TabS(7)mHum6(I61) IF Takle(1,2))f THEN TabS(1).um*S(Tabl.CI,2)) IF Tabl*CI*25,2)>f THEN Tab*(3).Nuw0(TabloCI*25,2)) TkS(5)'NummSTabiq(I*5S,2)) IF Table(I,56,2))* THENH

:T4(Nmbr TfTO% a

D--1

2736 2746 2750 21`60 02) 2776 2106 62) 2796 2006 02) 2010 2620 2636 2040 2650 2666 2076 2660 2960 2910 2926 2930 2946 2950 2966 2976 2966

If If If IF

Tab1.CI+7S,2)>S THEN TabS(7).Num$CTablw(I*?3,2)) (Table(I,3))TahleCI,t)) OR (be(,1-)THEN 1610442)-l4usS4,12) Tablw(I,3)(6Table(.I,) THEM4 TabsC2).Nuo$(Table(1,3)) (Tabl*(I+25.3))Tahle(I#23,l)) OR CTable(I+25,3)(.6) THEN TahUC4).NvmS(l

IF Table( I.25,2)(.Table(I+23. 1) THEN TabsC4).NuoSCTabl*(I#25.3)) OR (TbeI5,).)THEN T52516.-Nvm56 If (a~(.031aI('6X Tabs (6).NumS (Tab] a(1.50,3)) IF Tal(.63(TbeI5,)THEN IF (Tabl*(I.75.3)>Table(1475,I)) OR (Tabl*CI*75.2)(.6) THEN TabsC6).Num$(1 If Table( l.75,3)(*Tabl*(l*75, 1) THEN Tabs(6).Num*CTablqCI+75,3)) PRINT USING 2S26ITableCI,l);TabS(1),TabS(2),Table(I*25,I),TabS(3),TabS(4), PRINT USING 24866 NEXT 1 FSs~(1-3.ta).'Rlpha F4s.Deta'C I-Alph4) map%.$ Thatite-2 F2s.Ltpd-'ftgl Pp~s.I-FI.-Theta).(F2s-Thets-Fls-Thet5) IF (Pps>G) AND (Pps(l) THEN 2966 Theta.&Th*%+..04 IF Thetaw* THEN 2936 COTO 2916 NoptnNop%*l Pd(Nept)nPps Pa(1.Nept).(F3s-Theta-1)/CF3s-Theta-F4s-Theta)

3666 Ran(Nept)unsnCkopt)d?(PpsELOG(F2s)*(1-Pps)*LOG(Fls)) 3616 DEEP 3626 IF Nept.100 THEN 2646 3636 COTO 2936 2646 was 1*% 10 11 3690 FOR Jet TO 16 3066 IF Pd(l)<nPd(J) THEN 3160 3070 TONOPd1(I) 2660 Pd(I)wPd(J) 36040 PdCileTem 3160 TomsPa(1.1) 3116 Pa(1,I)oPaCI.j) 3126 PaCI,J)eTea 3130 TemnftsnCI) 3146 Asn(I)mRsn~J) sn(J)mTem 31590 3166 NEXT j 3170 DEEP 3166 NEXT 1 3196 DISP 3266 DIOP * 30 YOU MANTA TABLE Of Pa& ASN VERSUS PERCENT DEFECTIVE? 3216 D15P 3226 DEEP 3236 INPUT Re$ 3240 IF Re~u*NO* THEN 2420 3250 PRINT LIN(4) 3260 PRINT SPA(3);"Sequential Sampling' Producer's Risk--, lpha.166; '%. LTPD3.ILtpd 3276 PRINT I *Aq.66N 41606*R & Consumer's RiRe; Setaa0; 3280 PRINT *Probabtility of Acceptance and Average Sample $s&: Versus Percent Defectilve, 2296 IMAGE 7X,W2 2260 IMAGE 7X0T.2 Pribability. &vrge* 3316 IMAGE ?X*I,2C P %cn 4 Sml 33220 IMAGE 7Xj2 . twelAcc tanc e Na 3230PRIT USNG3296 2246 PRINT USING 3366 3256 PRINT USING 2316 2360 PRINT USING 2220 3370 IMAGE *?,L26.3j6.3~I4.D1 3260 FOR lot TO 5 3390 PRINT USING 3378; Pd(l)#IO.PsC 1. )#100. AsnCI), Pd(l+590)*10, PaI1, 1.50)*ee6, Asn( 1.56) 2466 PRINT USING 2296 3410 NEXT I

D-2

3420 31SP 3430 31SP 90 YOU MIANY A PLOT OF ?HE OC CURVE? 3446 DI5P 3450 DEEP 3468 INPUT No$ 3478 IF Rt.S.N0 THEN 3666 3466 PLOTTER IS *9072A3498 PLOTTER 7,5 IS ON 3506 LOCATE 16,108,10,198 3me SCALE StP6~1O~.,S 3528 CSIZE 2 3536 IF Pd(160)9I66(m2S THEN InxeI 3546 IF (W1I6001S6028) AND (Pd(l966)*I6(-4S) THEN Inxm2 33556 IF (PdI66)e16640) AND (Pdhgg9).10S(*S6) THEN Inx.4 3564 LAKES IxS66-, 3576 MOVE Inxe2, II 3586 LABEL 'Pa(%) 3S90 MOVE 501nx,-4 3666 LABEL *PERCENT DEFECTIVE* 3616 MOVE 0,196 3626 PEN 2 3636 FOR 1.1 TO 160 3646 DRAM dI.6P(,)10 3656 NEXT 1 3666 B15P 3670 hISP * SO YOU WANT A PLOT OF THE AVERAGE SAMPLE $12E 3666 36t6 3760 3716 3728 3736 3740 3756 3766 3776 3780 3796 3658 3616 3262 3630 3646 3656 38666 3076 36006 3906 3960 3910 3926 2930 3940 3956 3960 2976 2966 DISP DEEP INPUT gas IF ReSm.N0 THEN RETURN PLOTTER It "9872A' PLOTTER 7,3 IS OH LOCATE 16,160,10,106 IF Pd~160bo160.s26 THEN Inx*1 IF (PdC260)*2SS)201 AND CPd(190)*166(.40) THEN Inx-2
Dios-99999

TO A DECISION'

FOR lot TO 160 IF Asn(1))3iq THEN SigmAsnCI) HNET 1 Ma~iyuMNT(3iq) MaxymIG.INT(M~xy,.I6)#I3 SCALE 6, IMT(Pd(1S041609)#I,9.M#Axy CSIZE 2 IF Kaxv<026 THEN tnyot IF (Maxy)20) AND (Maxy,(*46) THEN Inyiu2 IF (Neaxl)46) AND (Maicy(o60) THIN Iny04 LAKES ItIy00-, MOVE Inx.*2,Maixy-3 LABEL *ASN* MOVE 501luo,-.9oiny LABEL 'PERCENT DEFECT IVE" MOVIE P4(I)elSS,Asndl) PEN 2 FOR 1.2 TO M6 DRAM Pd(I)*e105,Amn(1) NEXT 1 RETURN

D-3/0D-4 Blank)

APPENDIX E MULTIPLE SAMPLING SOURCE CODE

APPENDIX E MULTIPLE SAMPLING SOURCE CODE

2000 2202 203S 2040 2056 2068


2070 2080 2094 2100 2110 2120 2130 2140 2150 21f0 2170 2100 2190 2200 221@ 2220 2230 2240 2250 2260 2270 2200 2290 2380 2310 2326 2330 2340 2235 2360 2370 2320 2390 2400 2410 2420 2430 2440 2450 2460 2470 2400 2456 2500 2510 2528 2530 2546 2559 2560 2570 2500 2539 2668 2610 2626 2620

*5ee DRSP DISP DISP DISP DISP "


DISP DISP " DRSP DRIP ' DISP DISP

M fultiple Sampling Plan Design

ee

Multiple Sampling Design Options Option Description )Sarn&rd-nters-Namaker's Poisson Approximation Select Cc:@

of Sample Size for Producer's Risk of Five Percent & Consumer'& Risk of Ten Percent.
Achieved Risks are Calculated A >MIL-STD-105D Via the Binodial ...... 1

Alternate Plans For Specified LTPD, and Consumer's

AQL, Producer's Risk. Risk. Achieved risks

are Calculated Via the 2

Binomial ............................................

DIsP ENTER THE SELECT CODE OF THE DESIRED OPTION." " DISP DISP SEEP INPUT Sc IF SC()l THEN 4230 GOSUB 2210 GOTO 2360 DISP DISP " ENTER THE ACCEPTABLE QUALITY LEVEL, STATED AS A PERCENT DISP DEEP INPUT Aql Aql.Aql'elo DISP DISP * ENTER THE LOT TOLERANCE PERCENT DEFECTIVE, STATED AS A PERCENT! DISP DEEP INPUT Ltpd ltpdwLtpd'e80 Ratio-LtpdeRql Rowel RETURN DIffIRASSRatio-CcmI(I.2)) FOR I12 TO 20 CkORDS(Ratio-Ccot(I.2)) IF Ck)Diff THEN 2450 Rowu-1 Tiers? IF (Row=4) OR (Row.6) OR (Rowag) OR (Rowu13) IF Row-s THEN Tiereg DiffiCk DEEP NEXT I FOR Jel TO 9 Multi(J,2)uCcgt(Row.J*2) Nulti(J,t3)mCcmt(Row.J+1I) NEXT J SsluINT(CcmtCRou,2R)eAql) Sa2mINT(Ccmt(Row,23)eLtpd) IF SsI)Ss2 THEN LowusIJ IF SsIl(Ss2 THEN LOwuISI IF $sl)Ss2 THEN Nighulsl.t IF SsI(els2 THEN Nighuls2+1 LowuINTCLow)-1 IF Low<t THEN LowUl NigheINT(Nigh)*2 Planse8 DIRP LOw.Nigh FOR SampleoLow TO High FOR Jul TO Tier

THEN Tierw$

E-1

.2648 Multl(J.0-SSaPl@*J 2656 NEXT J 24660 DEEP 26711 P.AQI 2660 GOSUS 3510 2696 CalmI-Pac 2766 ExpasEn 2716 PNLtPd 2726 GOSUB 3516 2736 Cbe*Pac 2746 ExpbmEn Plans.Plan4*1 2756 PRINT L1NC4);SPA(16);"Optiofal sampling Plan *";Plans 2746 2776 PRINT SPA(1S);'Which Approximate: Producer's Risk s 5% & Consumer'& Risk is %, is *;Ca 2766 PRINT *The Dinomsial Distribution Point Estimate of Producer's Risk 2796
2666

PRINT SPA(12);*and the Point Estimate of Consumer's Risk is ";Cb#eeI66*G.


IMAGE
_________________________________

26916 IMAGE -- To,&)l Cumulative ICUmUlat ius 2820 IMAGE jNumber jAcceptance IRejection I Number 293S IMAGE lOf Unitai Number I a I lSam led 2646 IMAGE

I I

Cumulative Continuance Numbers

26 IA~FINYL;N(4;SPA(264; 2646 PRINT USING 2666 2676 PRINT USING 25161 2666 PRINT USING 2826 2696 PRINT USING 2636 2966 PRINT USING 2646 2916 FOR 1-1 TO 9 2920 IF MultfCI,13)wI8@ THNE TitermI2930 IF Multi(I.13)*I6S THEN 2970 2940 NEXT I 2950 Tler.9 2956 DEEP 2970 FOR lei TO Tier 2966 IF Multl(I.2)(0 THEN Start'S 2996 IF MultlCI,2)>-6 THIN tt.uI1,I 3060 FOR J.1ITO 12 3616 Con(J)mStart*CJ-I) 3626 IF Con(J)eliulti(1,13) THEN Pass*J-1 3636 IF ConCJ)mllulti(1,13) THEN 3660 3646 NEXT j 3666 DISP numbers! 3669 DISP *Sorryi! The program is setup to hantdle only it ccintiuation 3676 3666 3696 3166 3116 3126 3136 3146 3156 3156 3176 3166 3196 3266 32111 GOTO 2950 IF Plultli,12)(6 TWIN T~b#CI)6NumS(112) IF Multi(I,2)eS THEN Tabil(I)m~umsSCill) IF MultlCI.2)>6 THEM aC1.uSCut(,) NcontO6 IF MtlI)*ulC.1)THEN IF MutC,)l~llI1)THEN 3176 FOR J.1 To Pass IF ConcJ).6 THEN TabS(j+I).NUgS(161) IF Con(iJ)6> THEN TabSCJ*I).Num8(Con(J)) NEXT J FOR JmPass.i To 11 Tab6(3~l.IXxxNEXT 3 X.D I, I) I1(3 IMAGE *jIX,s3.1X.I,"4X.3A,4X, PRINT USN 32-MlII1.aS,;Txab6(2),Tabsc3).Tabec4),Tab(5c5.TabsC6

ult ipl@ Plani Specificat ion"

3220 RINTUSIN 202

3306 IF Plans'S THEN PRINT *Consumitv'zaRisi aridre1@Ocuto this option." 3320 IF Plans-S THEN PRINT if YOU WANT TO DO THIS, ENTER YES.3320 IF Plans'S THEN PRINT OTHERWISE, ENTER NO.23335 DISP 3346 DEEP 3356 INPUT Re$ 3360 IF R*Ss'HN THEN RETURN 3376 COTO 21lf 3366 REM DINOMIAL SUSROUTINE 3396 IF cS-X(O OR (X<9 TNEN Probe$ 3466 IF CS-K(S) OR (X(9) TNEN RETURN 3410 IF CS-K'S) OR (X-9) THEN Prob-P-Xa(l-P)-CS-X) 3426 IF (S-K's) OR (XaS) THEN RETURN 3436 Probst 3446 FOR Iasi TO N 3456 ProbsProbaP 3460 HNET Is 3476 FOR Iasi TO S-X 346690 .r~CX.a'so1P 3490 NEXT I* 3566 RETURN 3516 REM PA & EN DRILL 3526 SaNulti~l,I) 3536 Start.I 3546 Pens@ 3556 Pace$ 2560 EnsNulsiI(,I) 3576 FOR XOO TO flulti(I.13)-l 3566 GOSUS 3366 3596 Con(X.I)wX 3666 Conp(XeI )-Prob 3610 NEXT X 3626 IF Mut(,)6THNE 3676 3636 FOR X** TO Multi(1,23)-l 3646 Pon*Pen*Conp(X.1) 2656 NEXT K 3666 COTO 3756 39?6 FOR Xw* TO ui(,33666 IF ConCX#1)C'NulslI,2) TNEN PacoPac+ConpCX.11 3696 IF Con(X#I))Nulwst(1,2) THEN Star,-sX.I 3766 IF ConCX+1)>Multm~,2) THEN 3726 3718 NEXT X 3726 FOR X*Ssar% TO utl,) 3736 PonnPen*Conp C ) 3740 NEXT X 37560 RE*eaNls2I-usI1 3760 Pacrel' 3776 FOR Itaftart TO Nulsi(I,13) 37`96 Tabl*CPacee, I)sCon(I5) 3796 TableCPacor,2)wConp(It) 3066 Pac~rsPacor.I 3610 NEXT Is 3626 Pacer-Pacer-I 3636 FOR 1-2 TO Tier 3864 Pons$ 3656 IF Multi(I-1.2)(0 THEN Starts$ 30606 If Mulis(I-I02)>u1 THEN Starts'ulti(I-I,2)+I 3076 FOR ItelSart TO NLlsliC,12)-i 3666 ConCIs.)'It 3696 Conp(Is.I)u6 3966 NEXT Is 3916 FOR 15.1 TO Pacer 3920 XwS 3936 COSUB 3306 3940 Det'Table(I%,I).X 3956 PrdefwTablo(I%,2)*Prob 3966 FOR Iselsars TO Multi(I.IS)-i 3976 IF 3ef*Con(IsaI) THEN Conp(Is+I)-Conp(Is.I)+Prdef 3960 If DefsCon(la.S) THEN 40". 3996 NEXT Is 4666 IF 3efw~ultI(I,I3)-I THEN 4636 4610 X'X.I 4102 COTO 3936 4636 NEXT Is 4646 IF flul%4(I,2)(0 THEN 4166 4656 FOR Itwiltart TO Multi(I.13)-1

E-3

4666 4676 4666 4696 4160 4116 4120 4136 4146 4156 4166 4176 4166 4196 4206 4216 4226 4236 4240 4250 4260 4276 4206 4296 4390 4310 4320 '336 4356 4260 4366 4266 4466 4410 4436 4440 4456 4468 4476 4480 4496 4566 4516 4526 4536 4546 4556 4566 4576 4566 4566 4666 4616 mined 4626 4630 46440 4456 4670 4660 4676 4700 4716 4726 4736 4746 4756 4766 '776

IF ConCIIt.1(flulM(,2) THEN Pac-PsC*ConP(1t*1) IF Con(I%#I)(liulM(I2) THEN StartvS%&tar.. NEXT It IF MultuCI,2)+l-Multt(1.13) THEN 4210 FOR It-Start TO IiultiCI,13)-l Pen-Pen*Conp(1t.1) NEXT It EninEn.Pen.Ciiulti(1.1,1)-Mfluti(I, 1)) PaceroI FOR It-Start TO Multi(,12)-I Tahl*(Pacer,1).COn(It.I) TableCPace,',2)vCOnpCIt.1)
PateroPaceu'.l

NEXT It Pacer-Pacer-I NEXT I RETURN GOSUS 2216 D!SP Tier-? Ccritinl DISP "ENTER THE PRODUCER'S RISK, DSlP DEEP INPUT Alpha Alpha-Alpha.'l66 DISP D15P 'ENTER THE tONSURER'S RISK. DEEP INPUT It%& FOR Plan.1 TO t5 Plan~s-$ FOR Jst- TO 7 Multi(3t,2)slsplarCPlan,Jt.1)

STATED AS A PERCENT!

STATED AS A PERCENT!

NEXT J% DEEP FOR Sa~eITO 21 FOR PasselI TO 7 ut(asI-ases9,Sal NEXT Pass PsAqI GCSUZ 3516 Cal.I-PaC DEEP Enal.en P.Ltpd GOSUR 2516 CbeinPac Crit.CCCaI-AlphaZ.2(Cbe-Seta)-2'-.5 IF (Crit>Ccrit) AND (PlansM6 THEN 04676 IF Crit)Ccrit THEN 5620 Ocri~stnrit PRINT LIH(4);5PA(6);*Th* sampling plan specified below Is teClosest exa thusta." PlanseplansoI PRINT 'Which Appr'oximates: Producer's Risk .';Alpha*I*0;'1 Consumer's Ri PRINT 'The Binomial Distribution Point Estimate of Producer's Risk is ';Ca PRINT SPA12);*and the Point Estimate Of COnsumer's Risk is PRINTUIG2 PRINT USING4;Pc6;nlil PRINT USING 2066 Pl2 peiictin ;be6;~,

PRINT USING 2636 PRINT USING 2646 FOR 1-1 To Tier IF Multi(l,2)(0 THEN Starts@ IF ftulti(,2)>-6 THEN StartfMl~utic,2).t FOR J-1 TO 12 Con(J)-Start*(J-I) IF COnMJ-Multi(I,3) THEN Passj-S-

E-4

4786 4790 4000 4616 4626 4836 4646 405S 4986 4676 4966 4896 4906 4910 4926 4936 4946 4960 4976
4906

IF Con(J).Multi(I.13) THEN 4831 NEXT J DISP lSorryl The program is setup to handle only 11 continuation numbers, DISP COTO 4756 IF Multi(I,2)(41 THEN Tabs(I).Nuo$(I021 IF Mut(,)6THEN Tab$(I~wNumS(I9I) IF Multi(I.2)>6 THEN Tab6(I)o~umS(Multi(I,2)) Ncont*6 uliI2Imlti.I)THEN IF THEN 4920 IF MliC,)lut(I2 FOR jot TO Pass IF Con(J)oS THEN Tab6(J.1).NumS(I9I) IF Con(J)(>S THEN TbC.)Nm(o() NEXT J FOR JinPoss+l TO 11 TabS(J+I)nmXXXI NEXT J PRIN
IMRGE

USN

4SIultiCI.1).TabS(l),TabSC2).Tab5C2).TabS(4),TabS(5).Tabs(6

PRINT USING 49066 I(__j ____________ NEXT I PRINT LIN(2);SPA(26);*A complete risk assessment is obtainable by PRINT SPA(2);'exercising Option 5 of the Main Mlenu." l,) DISP *Plan 65;Plsn;1 with incremental sample sizes of *;Mfl%1lt NEXT Sasple DISP DI8P TAD(Plan*4);*Moving to Plan*;Plan DISP NEXT Plan RETURN

4990 5000 5016 5826 5636 5046 5056 5966 5676 5606

E-5/(E-6 Blank)

APPENDSX F SPECIAL PURPOSE ASSESSMENT SOURCE CODE

APPENDIX F ASSESSMENT SOURCE CODE PURPOSE SPECIAL


2060
2801

SPECIAL PLAN CC CURVE & ASH ASSESSmMET REM 0**0*' IMAGE *_______________________________ inAE Total ICumulatiV@

.....

2626

2646

IMAGE

lot MUlsl

NMwfber f a I4C

INumber V 2056 liMacE *I$&Molti

2670 PRINT USING 2030 2006 PRINT USING 2020 2696 PRINT USING 2630 2166 PRINT USING 2046 2110 PRINT USING 2ls6 2120 FOR let 10 $1 21136 Paass. 2146 Tirers 2150 DISP ENTER THE NUNDER OF UNITS SAMPLES TO DEC:SICS POINT. MURDER 2146 DISP * 217S 2166 2190 2206 2216 2226 DISP, DEEP INPUT RVISI(I.I) 2:I1P DISP 'IF THE LOT CAN SE ACCEPTED AT THIS POINT,

ENTER T-1 %CCEPTANCC HUR ENTER A NEGATIVE N

lISP *IF TNE LOT CAN NOT SE ACCEPTED AT THIS POINT,

2230 Slisp 2246 SEEP 221111 INPUT hultil.2) 2240l lISP 2270 lISP *If THE LOT CAN SE REJECTED AT THIS POINT. 2290

ENTER THE REjgCTIDOt

NunS

SISP 'If THE LOT CAN NOT SE REJECTED AT THIS POINT,

ENEs * NEGATIVE N

lISP 2296 2306 SEEP 2216 INPUT MulticI.131 23220 IF MuhIC1t,2)(41 THEN 2340 2440 2226 IF MuC,)I~llI1)THEN 2240 NEXT 3 2216 lISP ICRRY1 THE PROGRAM IS CURRENTLY SETUP TO MAN:.1E !I 2346 lISP " Pas Lawler' 2376 lisp 2206 DEEP 2296 FOR So: TO 21

TIERS

SEE

2410 DEEP 2420 NEXT I 2420 STOP 2440 FOR 1.1 TO Tier 2410 If Hv~lCjI,2)4s THEN Startme 2446 IF ffaltI(I,2))w# THEN Sat~lSI2. 2478 FOR Jel TO 12 24600CAJwtr.J1 2496 IF coA(IMuonullI.12) THEN PassqJ-1 2166 IF Con(JMaultiI(,13) THEN 2556 2516 NENT J 2526 aSlO 2536 lisp *09rrYl The Program it *eup to handIle only 1t ce.ntnwasio' nlahbers! 21540 25511 2540 2176 2560 2590 2466 2463 2426 2436 GOTO 2276 THEN T~bfCI).HumS(162) If MltI3( IF Nulti(I,2)wS THEN TmbS(1)eNumsS(11) IF Mut(,)0THENTb(1mulNhI,) Ncgnl*6 ?Mt(,).w ut(I1)TEN IF IF Mgt~.)l~~tI1)THEN 2646 FOR J-1 TO Pass IF Con(imof THEN TabC(J.1).HumS(I61) IF Con(J~)09 THEN Tab#(J*1)wNwwScConCJ)) HEXT J

F-1

2640

FOR J.Pass*l NEXT J IMAGE *,ilX,53, PRINT USING

TO 11

2450
2660 2670 2500 2690 2700 2710 2720 2736 2746 2758 2760 2770 2?00 2709 2066 2610 2620 2i36 2040 2050 2860 2670 2600 2090 2900 2910 2902 2930 2940 2950 2060 2970 2060 2900 3000 3010 3920

TabS(J*I)-*XXX"
2

K,'".4X,3R,4X,-I)1,11(3A 5?0;Aulti II),TaDS(l).T~bs2).Tab(3)T4

I.),1Xe3,

I, ,Tabgc$,Tab$c5

PRINT USING 2610 NEXT I GOTO 3220 RE" DINOhIAL SUBROUTIHE IF (S-XiS) OR (X(0) THEN Prob.* IF (S-X() OR (X(6) THEN RETURN IF (S-X-4) OR (X-0) THEN Prob.P^Xe(I-P)-(S-X) IF (S-X.6) OR (X-0) THEN RETURN Probsl FOR Isai TO X Peob.Prob*P NEXT Is FOR Iasi TO S-X Prob*Probe((X.Is),Ils)(I-P) NEXT Is RETURN REM NYPERGEOMETRIC DISTRIBUTION IF X(O THEN Probe& IF K(O THEN Probe* IF K<4 THEN RETURN IF X)K THEN Probes IF X>K THEN RETURN IF (K.0) AND (Xm8) THEN Probsi IF (K-4) RNH (X*G) THEN RETURN IF X0I THEN RETURN IF X)M THEN Probe@ IF X)M THEN RETURN Probes F(1).K F(2)mN-K V(3)ul F(4)mN-M F(5)uX FC().K-X

3930
3040 3050 3066 3070 3000 3600 31S6 3110 3120 3130 3140 3150 3160 3170 3100 3190 3200 3210 3220 3230 3240 3258 3260 3270 3220 3290 3380 3310 3320 3338 3340 3356 3365 3370 3386

FC?)-M-x
F?0)ON-K-M*X F(t)mN FOR lIst TO 9 IF F(Is)(I THEN F(Is)sI NEXT Is Prob-ProboF1.~F(2)CF(3)oF(4),(FC$).F(S)eFc?).F(S).F(9)) FOR Is.l TO 9 F(Is)mF(Is)-I IF f(Is)(l THEN F00s)1 NEXT Is CkuO FOR Is-I TO 9 IF FEIs)wI THEN 3180 Ckel NEXT Is IF CkaS THEN RETURN GOTO 3090 RETURN DISP lISP * 30 YOll NANT TO

RASE YOUR RISK CALCULATIONS

ON A F1ITE LOT SIZE?

31IM DEEP INPUT Re$ IF Reon*YES THEN 3istSmINYPER. IF Rw.0nYES* THEN DISP IF Reo-"YES' THEN DISP TAS(20);IENTER THE LOT SIZE., IF RoSmYES THEN DISP IF Ro$-'YE[S THEN DEEP IF ReinYES" THEN INPUT Lsive REM *ooo*@44o e*4OQe*555O*S5**t,,......**5, IF ReSUmYES" THEN 5246 REM ooeeoeoeoo.oeo .... o......s.....e...... IF R.SO.NO* THEN DiotS'DINOHIAL" P6.41 REM

F-2

3396 3466

GOSUS 3416 COTO 41220

3426 S'.&,tsl 3430 PenwO 3446 Pac.6 3450 En-flulti(1,l) 3460 FOR X09 TO flulti(S.13)-i 3476 GOSUD 2726 3466 Con(X*1)oX 3490 ConpCX*I).-Prob 3566 NEXT X 351# IF ulutt1(i.2))-a THEN 3566 3526 FOR Xs* TO flulti(S,13)-1 3536 P.,naPtwCep(x41) 3546 NEXT X 3556 COTO 3646 3566 FOR XS6 TO Hulti(S.13)-I 3576 IF ConCX+1)(.Nulti(1.2) THEN Pac.Fac*Conp(X*2) 3566 IF Con(X.I)>IMutl~lI.2) THEN Saut.X*2 359S IF Coft(X*1)>Mul~tt(,2) THEN 3616 3666 NEXT X 3616 FOR Xe$%trt TO nwltil(,13) 3626 PenePen#Conp(X) 3630 NEXT X 3656 3666 3666 3696 3766 3716 3726 3736 3746 3756 3760 3776 3766 3796 3666 Paceral FOR It.Stapt TO Muit(1,13) T~ivPace.r2)sCoflp(It) Pace,.Pacer*1 NEXT Is Pacer*Pacev-I FOR 1.2 TO Tier Pen-$ THEN Starts. If NlIII2( IF HlIII2)6THEN trsut(-1Z. FOR Itultart TO Huwtti(,I,3)-1 CenCl%+1).Il Ceunp(ItaI)s* NEXT It FOR haul TO Pacer

3626 GOSUD 2726 3636 befulable(lit,1)#X 3646 Ppdef*Tabt*C It,2)*Peob 3050 FOR Isaftait TO ut(,)3666 IF 3.E.Con(Ia.1) THEN Conp(Is#I).ConpCIS**)*Prd~f 3670 IF D.tsCon(Ia.1) THEN 3696 3666 NEXT Is 3696 IF 3*fEalulti(I.I3)-1 THEN 3926 3966 XsX~l 3916 COTO 3626 3926 NE9XT It 3936 IF Multi(1,2)(6 THEN 3996 3046 06 FOS~tapt TO Mwh~lt(1,I3)-I 3956 IF Cen(I%+W)(.ultI(I.2) THEN Pa~.Pae#Conp(I%#l) 3966 IF CoenCI%+I)(m~ulsl(I,2) THEN tsuar1 3976 NEXT It THEN 4166 3966 IF NlII)..att13 3996 FOR Itu~tart TO NMwlti(I,23)-1 4666 PanwP~n*C6Ap( %It*) 4616 NEXT It 4636 46448 4666 4676 4060 4696 4166 4119 4126 4136 4148 4150 Patera) FOR lialsart TO holti(I,13)-I Tabl@(Patet.2)uCmip(tIt.) Pager*Pacor.1 NEXT It PateraPater-l NEXT I RETURN IF Pac(.02 THEN 4166 DEEP PwP*..6 COTO 3366

F-3

4166

31SP

;PoMiDISP 'THE 4170 4181 4190 4206 D|SP " DISP ' DISP '

PROBABILITY

OF ACCEPTANCE

IS

*;P&e;*

FOR A PERCENT DEFECTIVE OF

PERCENT DEFECTIVE.THE EXPECTED SAMPLE NUMDER IS ';En;" AT THIS WISH TO If ENTER THE MAXIMUM VALUE OF PERCENT DEFECTIVE YOU A PERCENT! SHOWN ON THE OC CURVE. THIS ENTRY MUST BE MADE AS

4216 DISP 4220 DEEP 4230 INPUT Psax 4246 Max16@(IHT(P3&x13)1) 4256 FOR Itls TO IMI 4246 Pddlf)IEfoPix&/les 4276 P.Pdtlf)/1oo 4200 GOSUB 2416 4296 P&(1,If)SPAC 4366 DISP Pa(1,If) 4310 RAn(MI)*En 4326 NEXT If 4336 SEEP 4340 PLOTTER IS "9?72A' 4350 PLOTTER 7,5 is ON 4366 LOCATE 16,109,S1,106 4376 SCALE t,M&xx,6, 163 4300 IF Maxxx(2'2 THEN Inx.2 4396 IF CM&xx)26) AND (Maxx(<40) THEN Inxh2 4406 IF (Maxx)40) AND (fMxx<80O) THEN 1fXl4 4410 IF M&xx>ii THEN Inx*S 4420 CSIZE 2 ,,Il 4430 LAXES Inxe,,0t, 4440 MOVE 4o1nx,-4.95 DEFECTIVE' 'PERCENT 4456 LASEL 4460 MOVE Inxin3,161 4476 LASEL "P&(%)' MOVE 0,100 4480 4490 PEN 2 4500 FOR lo TO 166 4516 DRAW Pd(I),P&(1,I)*16I 4526 NEXT I 4530 MOVE 126,260 454S DISP Do YOU WANT ANY OF THESE POINTS PRINTED? 4550 DISP 4560 DIsoP 4576 DEEP INPUT Res 4586 4590 IF Re.lMNO" THEN 4050 4660 IMAGE 12X,' Avefge 4616 IMAGE 12X," I cceptancO Samle 71en4626 IMAGE 12X, i Pe umbe, l" t *f.etIvplProbabi 1 IMAGE 12X,4630 4646 PRINT USING 47WF 465S PRINT USING 4410 4666 PRINT USING 4626 4670 PRINT USING 4630 'Ii 4608 IMAGE *,I2X,',5D.3,D'I',73.2D,'I'*5D 4696 IMAGE 12X," 4700 DISP THE PERCENT DEFECTIVE, STATED AS A PERCENT. E ENTER 4716 DISP 4726 DISP 4730 SEEP 4740 INPUT P*Pd 4750 PoPord-140 4766 GOSUB 3416 PRINT USING 4SS0;P*PdP&c416,Efn 477? 4766 PRINT USING 4690 4796 DISP 4666 DISP TYASZS);" DO YOU WANT ANYMORE? DISP dol1 4020 SEEP 4030 INPUT R*$ THEN 4700 4846 IF RoS'YES"' 4650 DISP 4066 DISP D0 YOU WANT A PLOT OF THE ASH CURVE?' 4078 DISP

F-4

49CC F ftS.N0 THEN RTRR 41[0PLOTT *70S,-972R!A 91SON 4:26 PLOTTIER9 7!5 9 4938 Vigo-99
4,3

49:6 4906 4996 501


5526

IFFO AsnC)) ToH:TEN Dig.Rtsn(I) NEXT I DIts:

DISIP DEEP

*ENTER

TNE LARGEST ASN IS -;Dig THE MAXIMUM ASH YOU WANT SHOWN ON THE PLOT.

5:36 546
5045 5670

INPUT Maxy LOCATE 1I,10,10,I5156 SCALE 6.Maxx.,MaKxy 1MSP* DSlP WHAT LABELING INTERVAL DO YOU WANT ON THE Y &xisl'

5655 559:0
51!: 5 11 5120 514: 5150 5145

DEEP
Inyi INPUPT CUIZE 2 L XIESIxIw5,-I MOVIE Inxe'3,Maxy-3 NOVE4InMx12 LABEL 'PERCENT DEFECTIVE' MOVEGMulit(II) FOR:12.1TO lee IF 101 THEN MOVE PdCI),AsnCI) DRAW PdCI),Asn(I1

5160
5195 52!C

5220 5236
5240

MOVE '566,509 RETURN


IP DISpP " . DISP " DISP I YOU MAY START THE SEARCH PROCEDURE BY ENTERING THE INITTI HUMSIE DEFECTIVES PER LOT. A RECOMMENDAT ION IS MADE THAT THIS V .JE OF THE LOT SIZE. REMEMBER, THIS ENTRY MUST BE AN INTEGER! SE

s2ss
ROF 5260

16%
5276 5266 5295 lI;P

DEEP

5306
53216

s32s

5336 5340 5356

5366 5376
5306

INPUT K DadoK COSUS 534. COTO 64 REM NYPERGEOMETRIC EVALUATION OF SPECIAL PLAN NoLsitl Start .5 NuMultt(1,I) FOR X66 TO Mialtt(Z,I3)-I

5395 5468
5416 5428

MOUD Mse
Tabl*(X*I,I)wX Tab1@(X*.I2)oProb NEXT X

5430
5440 5456 5446

Paco@
EnwMultl(I,I) P~n.5 IF Mul~t1(I.2)(5 THEN Startal IF ulIl2m0THEN SatMlI12. Continshulti(lI.3)-I ConnuamCent In-St .rt.I FOR Ital TO Connue Cn~~~asINEXT It FOR 1%81 TO Multi(1,13) IF TboII)uut(, THEN PacuPac+Tabl*(I%,2) THEN 5066 IF TbeI,)uut12 FOR 1.-I TO Connus(& HNCnpI~Tb*%2 IF Table(lt,l)*Cols THNCncsubI(t) IF Tab1#CI%,1)wConCIs) THEN 54600 NEXT Is NEXT It FOR Reel TO Cennum

5476
5486 5496 5566 3510 $sis

5536
5546 5550

3566
5570

5566 5596 5666 5616

F-5

5626 5630 5649 5650 566S

Pon.Ptn#C@np( Is) NEXT Is En.En.P~n*(MultI(2,1)-NulUC(I,)) FOR 1.2 T0 Tier NOSLIZipMulliCI-1,I)

5600 $%art** 5690 FOR It.1 TO Connum 57600KD-CnI) 9710LI(IuulII1Cf(I) 5720 FOR Xe0 To LiftacI') 5730 GOSUB 2050 5740 FiqP(It.X+I)6PrebGCCOVP(I%) 5750 Flg(I%,X#1)*X#C~nfl(% 5760 NEXT X 5770 NEXT 1% 2 5710 If Mwl%4(I.2)>0S THEN Start.Nulti(I. )'I 5790 ContinalluliI(I,13)-l 5600 LffteContln-Sar%+I 5010 FOR It.1 TO Lim 5020 ConCIt)nltart+lt-1 5030 Cenpolt).0 5040 NEXT is 5050 Pence 5060 FOR It.1 TO Connum 5070 FOR X&S TO 0m&IaI) 5900 IF Flg(I%.X#I)(wMultl(I,2) THEN Pac.Pac#Fiqp(I%.X+I) 5960 5090 IF FgI,.(.uII2)THEN 5960 5900 IF Hut(,)I~tII1)THEM 5910 FOR itmi TO Lim 5920 IF FiqtgCtX*1)eConCJ%) THEN ConpCS1)*Canp(J%)+Tigp~1t.X#I) 5920 IF F~g(I%.X+I).ConCJ%) THEN P~nwPen+Figp(lt,X*I) 5940 IF Flg(lt,X+I)wC~nCJt) THEN 5960 5950 NEXT Jt 5960 REK 5970 NEXT X 5900 NEXT It 5990 ConnumaslI m fo10 6020 6030 6048 6050 6060 6070 YE! 6030 6090 6100 6110 6120 6130 6140 G150 OF" 6160 6170 61s0 6190 6200 6210 6220 6220 6240 6250 6260 6270 6280 6290 6200 6210 6220 6320 DEEP NEXT 1 RETURN IF Pac<.02 THEN 6140 21SF 21SF *Mhwn*I9adI defectives art presen% in the lot, Pa sPcS0". HOLD ON I AM INCREASING THE DEFECTIVES TO SCOPE OUT THE OC CUR 21SF 21SF Ck&I6*IWT(SdaeI0) laduCk.18 Kw.2d DEEP COTO 5210 21SF IF THE SUBMITTED LOT CONTAINS -;Bd;-DEFECTIVES, THE PROBABILITY 21SF 21SF 21SF 31SF ACCEPTANCE IS ;Pec;,. ENTER THE MAXIMIUM NUMBER OF DEFECTIVES PER LOT, YOU WIANT SHOWIN ON THE OC CURVE. THIS ENTRY MUST IE AN INTEGER!

21SF DEEP INPUT Ma~x IF Maxx(ulOO THEN Incxeul IF Maxx(8199 THEN LimeMamx IF MamXK<*09 THEN 6320 21SF 21SF 'WHAT INTERVAL DO YOU WANT BETWEEN SUCCESSIVE DEFECTIVES PER LOT? 21SF LISSISO M&xxseakxx* DEEP INPUT Inc 1 FOR 14.1 TO Lim IKuIfelncx

F-6

6340 6350 636l 6370 6380 6390 6400 64140 6420 6430 6440 6450 6450 6470 6480 6490 6500 5) 6510 6526 6536 6540 6556 6550 6570 5560 6596 6666 6616 6620 6626 6640 6656 6666 6670 6666 6696 6706 6716 6726 6730 6746 6750 6760 6776 6786 67S9 6600 6616 6126 6636 6040 6856 68?6 Goss 6860 6666 slit 6920 6930 6$40 6956 6$66 0676 6966 6696 7066 7616 7626 7330 7040 7605 7066 7070 7000 7696

Bad&K GOOUS 5340 Pa(l.f).Pac Pd(If)wSad DISP 6;* I ASN.-;E, DISP "I ';Bad;' defecti,*s&lot: Pa.;Pac DISP EEP Asn(If)mEn DISP NEXT If PLOTTER IS '9412A" PLOTTER 7,5 IS ON LOCATE t6,16o,0.166 SCALE $,Maxx,i,1i3 DISP DISP 'THE RECONMENDED LABELING INTERVAL FOR DEFECTIVES/LOT IS ";INT(Maxx/l ENTER THE LABELING INTERVAL YOU MANT SHOWN lIsP * lIsP SEEP INPUT Inx CSIZE 2 LAXES Inx,5,0,0.-I,l POVE Inx03, 10 LABEL *Pat(), HOVE 4*lnx,-4.E3 LA4EL "DEFECTIVES PER LOT, Lot Size * ";Lsi:.;*Units" Liselle IF Maxx-3(16 THEN LimNwMxx-3 MOVE 6,166 TO Lio FOR Ifl DRAW Pd(ir),lO0ePa(tIe) DISP Pd(If),16leP&(1,R4) NEXT 1i MOVE 506,566 FOR Jut TO 11 IF J()6 THEN DISP DO YOU hINT ANY OF THESE POINTS PRINTED?" If Jag THEN DISP " NEXT J DEEP INPUT ROS IF Rtse'NO" THEN 7666 PRINT LIN(4) PRINT USING 6600 PRINT USING 661s PRINT USING 6626 IMAGE 12x," amP "Eveslacceptainco IMAGE 12X, "lan P Ppgbvii P-r1o. IMAGE 12X, ID ,D.2DKI.SD.RD1 IMAGE *,12X,'.Lo9 lISP ENTER TN! NURMER Of DEFECTIVES PER LOT lisP SEEP INPUT K SaduK GOSUD 5346 PRINT USING 66)6;I&4P&c*tssEA PRINT USING 6000 DISP lisp 1D0 YOU WANTANOTHER ONE?* DISP SEEP INPUT R&S IF R.SweYE[S THEN 6640 PRINT LIN(4) lISP 0 YOU WANT AN ASH PLOT? DO DISP DRIP SEEP INPUT Ro$ IF R*8w'NO" THEN RETURN LIm-IOS IF Maxx-3<100 THEN L|IIMaxx-3 lisg-99999 FOR 1It1 TO Lim

F-7

7100 711I 7120 713S 7140 715. 7160 7170 7160 7190 7200 7210 7220 7230 7240 7250 7260 7270 7206 7290 7360 7310 7320 7330 7340 7350 7360 7370 7300

IF Asn(If))Dig THEN Big.Asn(It) NEXT It DISP THE LARGEST ASH IS ";Iig DISP " DISP " ENTER THE MAXIMUN ASH YOU WANT SHOWN ON THE PLOT. DISP SEEP INPUT Maxy PLOTTER IS "9072A" PLOTTER 7,5 IS ON LOCATE 10,100,II,100 SCALE e,Naxx,$Nzax DISP HNATLABELIHG INTERVAL DO YOU WANT ON THE Y axiS?* DISP DISP DEEP INPUT Iny CSRZE 2 LAXES InxIny,0,6O,-l, MOVE I~K'3,fl,4.95 LABEL *RSN" HOVE 4*4nx,-Na&1s2S LABEL 'DEFECTIVES PER LOT, Lot Size * ;Lsize;'unit%% FOR Ifi TO Lis IF Ires THEN MOVE Pd(IR),Asn(CR) IF (Pd(If)eI) AND (Asn(I)mS) THEN 7300 DRAW Pd(It),Asn(If) NEXT It RETURN

F-8

INITIAL DISTRIBUTION LIST

U.S. Army Materiel System Analysis Activity ATTN: AMXSY-MP (Herbert Cohen) Aberdeen Proving Ground, MD 21005 Uit Research Institute ATTN: GACIAC 10 W. 35th Street Chicago, IL 60616 Commander, U. S. Army Missile Command, Redstone Arsenal, AL 35898

Deputy to the Commander,


U. S. Army Missile Command, Redstone Arsenal, AL 35898 Program Executive Officer, Missile Defense Office, U. S. Army Missile Command, Redstone Arsenal, AL 35898 6

Program Executive Officer, Tactical Missiles, U. S. Army Missile Command, Redstone Arsenal, AL 35898 AMSMI-RD
AMSMI-RD-CS-R AMSMI-RD-CS-T AMSMI-RD-QA AMSMI--GC-P, Mr. Fred M. Bush AMSMI-AC AMSMI-CA AMSMI-IMC

1
15 1 4 1 1 3 2

AMShI--IR
AMSMI-PT Dist-1

1
1

INIHAL DISTRIBTIMON LIST (continued)

AMSMI-RM AMSMI-SF AMSMIl-SW AMSMI-TQ AMSMI-UG AMSMI-WS AMCPM-4CF AMCPM-SM SFAE-UGV

1 1 1 3 1 1 1 1 1

Dist-2

You might also like