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 >
Text File  |  1997-09-22  |  3KB  |  80 lines

  1.  
  2. HYPSEQ.EXE designs two-sided, item-by-item sequential sampling plans by
  3. applying Wald's Sequential Probability Ratio Test (SPRT) in problems
  4. where there are FIXED lot sizes of 10,000 or fewer items.  This is an
  5. application of the (discrete) "Hypergeometric" distribution of observed
  6. nonconforming units when sampling at random, and without replacenent,
  7. from a finite population.  This SPRT application is interesting because,
  8. rather than staying of roughly "constant" width (as in the Bernouilli or
  9. Binomial case,) the "continue" region here tends to narrow down and
  10. terminate before all units are selected.
  11.  
  12. In two-sided, finite-population sequential sampling, two hypotheses are
  13. tested:
  14.  
  15.                H(1): k <= k1
  16.  
  17.                H(2): k >= k2
  18.  
  19. where k1 < k2 are specified numbers for total nonconformances in the
  20. entire lot (size N.)
  21.  
  22.  
  23. HYPSEQ Prompts and Parameter Limits...              MIN           MAX
  24. ======================================
  25.  
  26. What is the total Lot Size? [N] :                     2        10,000*
  27.  
  28.        [ * Or larger, as long as there are NO PRIME Factors > 9973. ]
  29.  
  30. What is the Low nonconformance number ? [K1] :        1           N-1
  31.  
  32. What is the High nonconformance number ? [K2] :    k1+1             N
  33.  
  34. Acceptance Probability at K1 ? [1-alpha] :         0.50          1.00
  35.  
  36. Rejection  Probability at K2 ? [1-beta] :         alpha          1.00
  37.  
  38.  
  39. Examples...
  40. ===========
  41.                 EXAMPLE1.IN....Batch Input File for N=10, k1=1, k2=5,
  42.                                                 1-alpha=.9 and 1-beta=.5
  43.                 EXAMPLE1.OUT...Compact Output File.  Always starts at
  44.                                Sample Size=2. (Note there is no row
  45.                                for Sample Size=3 because accept/reject
  46.                                numbers would be the same as with Sample
  47.                                Sizes 2 and 4.)
  48.                 EXAMPLE1.DTL...Detailed Output (Esoteric !!!)
  49.  
  50. Invoking HYPSEQ...
  51. ==================
  52.  
  53.         DOS Prompt>       hypseq outfile
  54.  
  55.                           hypseq outfile <batchin
  56.  
  57. Specifically, parameter settings are to either be...
  58.  
  59.          ...specified interactively in response to prompts, or
  60.  
  61.          ...redirected by DOS to come from a batch input file.
  62.                                    (Simply mimic EXAMPLE1.IN.)
  63.  
  64. Source Code...
  65. ==============
  66.  
  67. Source code for HYPSEQ is provided in an archive, MAKHYP.ARC, because
  68. its computational algorithm strikes me as being rather interesting.
  69. Hypergeometric probabilities are computed by keeping track of the
  70. "powers" ( + for numerator, - for denominator ) of 1229 prime factors
  71. between 2 and 9973...contained in the PRIMES.H header file.
  72.  
  73. Bob Moore of Bell Communications Research Inc. (Bellcore) had a
  74. proprietary BASIC language implementation that he showed me in June
  75. 1986, back when I too worked at Bellcore.  Anyway, I have modified my
  76. C-language versions of his algorithms three times since then, most
  77. recently in January 1989.  All I know for certain is that my previous
  78. implementations had "bugs;" for example, they did nor properly account
  79. for "zero" factors in ratios.
  80.