home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Explore the World of Soft…e: Engineering & Science
/
Explore_the_World_of_Software_Engineering_and_Science_HRS_Software_1998.iso
/
programs
/
statistc
/
hyps8903.txt
< prev
next >
Wrap
Text File
|
1997-09-22
|
3KB
|
80 lines
HYPSEQ.EXE designs two-sided, item-by-item sequential sampling plans by
applying Wald's Sequential Probability Ratio Test (SPRT) in problems
where there are FIXED lot sizes of 10,000 or fewer items. This is an
application of the (discrete) "Hypergeometric" distribution of observed
nonconforming units when sampling at random, and without replacenent,
from a finite population. This SPRT application is interesting because,
rather than staying of roughly "constant" width (as in the Bernouilli or
Binomial case,) the "continue" region here tends to narrow down and
terminate before all units are selected.
In two-sided, finite-population sequential sampling, two hypotheses are
tested:
H(1): k <= k1
H(2): k >= k2
where k1 < k2 are specified numbers for total nonconformances in the
entire lot (size N.)
HYPSEQ Prompts and Parameter Limits... MIN MAX
======================================
What is the total Lot Size? [N] : 2 10,000*
[ * Or larger, as long as there are NO PRIME Factors > 9973. ]
What is the Low nonconformance number ? [K1] : 1 N-1
What is the High nonconformance number ? [K2] : k1+1 N
Acceptance Probability at K1 ? [1-alpha] : 0.50 1.00
Rejection Probability at K2 ? [1-beta] : alpha 1.00
Examples...
===========
EXAMPLE1.IN....Batch Input File for N=10, k1=1, k2=5,
1-alpha=.9 and 1-beta=.5
EXAMPLE1.OUT...Compact Output File. Always starts at
Sample Size=2. (Note there is no row
for Sample Size=3 because accept/reject
numbers would be the same as with Sample
Sizes 2 and 4.)
EXAMPLE1.DTL...Detailed Output (Esoteric !!!)
Invoking HYPSEQ...
==================
DOS Prompt> hypseq outfile
hypseq outfile <batchin
Specifically, parameter settings are to either be...
...specified interactively in response to prompts, or
...redirected by DOS to come from a batch input file.
(Simply mimic EXAMPLE1.IN.)
Source Code...
==============
Source code for HYPSEQ is provided in an archive, MAKHYP.ARC, because
its computational algorithm strikes me as being rather interesting.
Hypergeometric probabilities are computed by keeping track of the
"powers" ( + for numerator, - for denominator ) of 1229 prime factors
between 2 and 9973...contained in the PRIMES.H header file.
Bob Moore of Bell Communications Research Inc. (Bellcore) had a
proprietary BASIC language implementation that he showed me in June
1986, back when I too worked at Bellcore. Anyway, I have modified my
C-language versions of his algorithms three times since then, most
recently in January 1989. All I know for certain is that my previous
implementations had "bugs;" for example, they did nor properly account
for "zero" factors in ratios.