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 / seqd9109.txt < prev    next >
Text File  |  1997-09-22  |  62KB  |  1,065 lines

  1.                            TABLE of CONTENTS
  2.  
  3. Section 1 - Introduction..............................................1
  4.  
  5. Section 2 - PC System Requirements....................................8
  6.  
  7. Section 3 - SeqDir Walk-Through.......................................9
  8.  
  9. Section 4 - Effects of Changing SeqDir Parameters....................19
  10.  
  11. References...........................................................22
  12.  
  13.  
  14.                     ┌────────────────────────────┐
  15.                     │  Section 1 - Introduction  │
  16.                     └────────────────────────────┘
  17.  
  18. SeqDir.EXE applies the Aroian(1968) "Direct Method" of Sequential
  19. Analysis to evaluate Operating Characteristic (OC) and Average Sample
  20. Number (ASN) curves corresponding to any specified shape of Accept /
  21. Continue / Reject boundary.  And, besides these numerical approximations
  22. to "exact" results, SeqDir also performs Monte-Carlo simulations and
  23. displays Sample Paths graphically!  But only applications in which
  24. sequential observations have independent, identical gamma (or
  25. exponential) distributions with an integer valued "shape" parameter are
  26. treated by SeqDir.
  27.  
  28. NOTE: The best known forms of sequential tests that use exponential
  29.       distributions are the ones that treat "survival/lifetime" data.
  30.       Specifically, that type of data consists of numbers and failure
  31.       times of certain units, plus "truncated" data (time so-far
  32.       on-test) for units that have not yet failed.  The applications
  33.       treated by SeqDir cannot use this sort of truncated lifetime data.
  34.  
  35. SeqDir designs sequential tests to detect shifts in non-negative
  36. measurements of "cost", "loss" or "regret"; i.e. situations where large
  37. or increasing numerical values represent undesirable performance.  These
  38. sorts of measures can frequently be viewed as "surrogates" for the
  39. long-term economic impact of deviations from an intended target value,
  40. i.e. measures of the Cost-of-Poor-Quality.  Almost any sort of numerical
  41. data can be CONVERTED into cost/loss form via a so-called "regret"
  42. function.  (Four forms of regret function are illustrated below.)  Once
  43. this "conversion to regret" process is applied to historical data, the
  44. resulting regret distribution is frequently well approximated by a gamma
  45. or exponential.  In particular, regret distributions are confined to the
  46. range from 0 to infinity and frequently are positively skewed (i.e. they
  47. have a [long] tail "trailing off" to the right...)
  48.  
  49.     ┌────────────────────────────────────────────────────────────────┐
  50.     │                                                                │
  51.     │       │                        Gamma Distribution              │
  52.     │       │                        ( with Shape Parameter > 1 )    │
  53.     │       │         *   *                                          │
  54.     │       │     *             *                                    │
  55.     │       │                        *                               │
  56.     │       │  *                         *                           │
  57.     │       │                                   *                    │
  58.     │       │*                                           *           │
  59.     │       └───────────────────────────────────────────────         │
  60.     │      0                  Cost -->                               │
  61.     │                                                                │
  62.     ├────────────────────────────────────────────────────────────────┤
  63.     │                                                                │
  64.     │       │          SPECIAL CASE: Exponential Distribution        │
  65.     │       │*                       ( Shape Parameter = 1 )         │
  66.     │       │  *                                                     │
  67.     │       │     *                  NOTE: The Gamma MODE cost is    │
  68.     │       │         *              ZERO when the Shape parameter   │
  69.     │       │              *         is less than or equal to 1.     │
  70.     │       │                    *                                   │
  71.     │       │                           *                            │
  72.     │       │                                   *                    │
  73.     │       │                                              *         │
  74.     │       └───────────────────────────────────────────────         │
  75.     │      0                  Cost -->                               │
  76.     │                                                                │
  77.     └────────────────────────────────────────────────────────────────┘
  78.  
  79. There are two minimal requirements a function must satisfy before it can
  80. be used to convert an arbitrary quantitative measurement, Y, into a
  81. measure of "regret."  These are...
  82.  
  83.     (i) the function may assume only non-negative values, r(Y) >= 0,
  84. and
  85.    (ii) the function must assume the value ZERO at the (or all) target
  86.         value(s) for Y,  r(T) = 0.
  87.  
  88. Although not required, a third property is frequently present...
  89.  
  90.   (iii) regret functions usually are monotone non-decreasing as the
  91.         deviation from target increases (above or below target.)
  92.  
  93. Three types of regret function likely to yield gamma or exponentially
  94. distributed cost/loss results are:
  95.  ┌─────────────────────────────────────────────────────────────────────┐
  96.  │ Regret Type:      Absolute Value (Possibly Asymmetric)              │
  97.  ├─────────────────────────────────────────────────────────────────────┤
  98.  │                      Percent of Label Claim -->                     │
  99.  │                                 |                                   │
  100.  │               ***               |                                   │
  101.  │                  ***            |                   ****            │
  102.  │                     ***         |               ****                │
  103.  │                     +--***------|-----------****                    │
  104.  │                     |     ***   |       ****|                       │
  105.  │                     |        ***|   ****    |                       │
  106.  │    Regret = 0  -----+-----------****--------+-----------            │
  107.  │                    95%         100%        105%                     │
  108.  │                                                                     │
  109.  │    Regret = Left/Right Factor * Absolute Deviation from Target.     │
  110.  └─────────────────────────────────────────────────────────────────────┘
  111.  ┌─────────────────────────────────────────────────────────────────────┐
  112.  │ Regret Type:      Quadratic (Taguchi's "Loss to Society")           │
  113.  ├─────────────────────────────────────────────────────────────────────┤
  114.  │                             Measurement -->                         │
  115.  │                                                                     │
  116.  │                *                  |                  *              │
  117.  │                 *                 |                 *               │
  118.  │                  **               |               **                │
  119.  │                    **             |             **                  │
  120.  │                      **           |          ***                    │
  121.  │                         ***       |       ***                       │
  122.  │                            ****   |   ****                          │
  123.  │    Loss = 0  ------------------*******---------------------         │
  124.  │                                   |                                 │
  125.  │                                Target                               │
  126.  │                                                                     │
  127.  │                   Regret = ( Value - Target )^2                     │
  128.  └─────────────────────────────────────────────────────────────────────┘
  129.  
  130.  ┌─────────────────────────────────────────────────────────────────────┐
  131.  │ Regret Type:              OneSided Quadratic                        │
  132.  ├─────────────────────────────────────────────────────────────────────┤
  133.  │              *              Measurement -->                         │
  134.  │               *                                                     │
  135.  │                *                  |                                 │
  136.  │                 *                 |        NOTE: There is no        │
  137.  │                  **               |        penalty, whatsoever,     │
  138.  │                    **             |        for deviations on        │
  139.  │                      **           |        ONE SIDE of the target.  │
  140.  │                         ***       |                                 │
  141.  │                            ****   |                                 │
  142.  │    Regret = 0  ------------------****************************       │
  143.  │                                   |                                 │
  144.  │                                Target                               │
  145.  └─────────────────────────────────────────────────────────────────────┘
  146.  
  147. A fourth type of regret which can yield cost/loss measures which,
  148. although actually bounded, are somewhat like a (truncated) gamma or
  149. exponential is:
  150.  ┌─────────────────────────────────────────────────────────────────────┐
  151.  │ Regret Type:      Double Logit (Bounded Maximum)                    │
  152.  ├─────────────────────────────────────────────────────────────────────┤
  153.  │                          |  Measurement-->   |                      │
  154.  │          ******          |         |         |          *******     │
  155.  │                ******    |         |         |    ******            │
  156.  │                      *****         |         *****    <-- Half      │
  157.  │                          |****     |     ****|            Maximum   │
  158.  │                          |    ***  |  ***    |                      │
  159.  │                          |       **|**       |                      │
  160.  │  Regret = 0  ----------------------*----------------------          │
  161.  │                          |         |         |                      │
  162.  │                        minus     Target     plus                    │
  163.  │                      HalfWidth            HalfWidth                 │
  164.  │                                                                     │
  165.  │         Regret = AbsDeviation / ( HalfWidth + AbsDeviation )        │
  166.  └─────────────────────────────────────────────────────────────────────┘
  167.  
  168.          ************************************************************
  169. EXAMPLE: Suppose that historical costs derived from potency assay values
  170.          using "absolute value" regret have an exponential distribution
  171.          (gamma with shape parameter 1) with expected value of 1% of
  172.          Label Claim.  Food and Drug Administration regulations require
  173.          this regret be no more than 5% of Label Claim.  For each new
  174.          batch of product, the manufacturer wishes to perform as many
  175.          assays as necessary to classify the new batch is either "good"
  176.          (within established process capability) or "bad".
  177.          ************************************************************
  178.  
  179. Sequential test plans detect situations where the expected value of a
  180. cost/loss distribution has shifted (from lower-cost) toward higher-cost
  181. values...i.e. situations where costs become markedly higher than their
  182. historical and/or current process capability levels.
  183.  
  184. Sequential Probability Ratio Test (SPRT) procedures, Wald(1947), for
  185. gamma distributed regret can utilize any test statistic that is a
  186. monotonic function of the cumulative sum of regret values over
  187. sequential steps.  At step N, this regret cumulative sum is
  188.  
  189.                   Rsum(N) = r(1) + r(2) + ... + r(N),
  190.  
  191. where r(s) is the regret observed at sequential step "s" of the test.
  192.  
  193. The argument that Rsum(N) is the pivotal statistic for all values of the
  194. gamma Shape parameter "p" and the gamma Scale parameter "R" goes as
  195. follows.  The general form of gamma probability density function is
  196.  
  197.         f( r ) = r^(p-1) * exp( - r / R ) / [ R^p * Gamma(p) ]
  198.  
  199. over the range from r = 0 to infinity, where R^p means "R raised to the
  200. p-th power," Gamma(p) denotes the gamma function, and the p and R
  201. parameters are both strictly greater than zero.  Although only cases
  202. where the Shape is a positive integer ( p = 1, 2, 3, ... ) are allowed
  203. in SeqDir, Rsum(N) is the pivotal quantity for all positive Shapes.
  204.  
  205. |  ASIDE:  Narrowing attention to integer valued Shapes is not      |
  206. |  really very restrictive, but it greatly simplifies generation    |
  207. |  of pseudo-random gamma variates.  The gamma function reduces to  |
  208. |  Gamma(p) = [p-1] factorial for positive, integer p.  Chi-Squared |
  209. |  distributions are special cases of gamma distributions where the |
  210. |  degrees-of-freedom parameter is 2*p.  Thus Chi-Squared distri-   |
  211. |  butions with an odd number of degrees-of-freedom are not treated |
  212. |  in SeqDir.                                                       |
  213.  
  214. The expected value of gamma distributed regret is E( r ) = R*p, even
  215. when p is not an integer.  Similarly, the standard deviation of regret
  216. is R*sqrt(p), and the mode density falls at the maximum of 0 and
  217. R*(p-1).
  218.  
  219. The objective of all sequential test procedures treated here is to
  220. distinguish between the following two hypotheses...
  221.  
  222.            ┌────────────────────────────────────────────────┐
  223.            │        NULL HYPOTHESIS: Mean Regret <= p * R0  │
  224.            ├────────────────────────────────────────────────┤
  225.            │ ALTERNATIVE HYPOTHESIS: Mean Regret >= p * R1  │
  226.            └────────────────────────────────────────────────┘
  227.  
  228. where the gamma distribution has the SAME, known Shape (p) under BOTH
  229. hypotheses, and R1 > R0 are known Scale parameter values.
  230.  
  231.          *************************************************************
  232. EXAMPLE: R0 = 1 and R1 = 5 are appropriate for the above example where
  233.          regret is assumed to have an exponential distribution (Shape
  234.          p=1) with expected value of 1% of Label Claim under the null
  235.          hypothesis and 5% at the regulatory specification limit.
  236.          *************************************************************
  237.  
  238. Continuing our argument that Rsum(N) is pivotal, the log-likelihood
  239. RATIO statistic is of the form:
  240.  
  241.      log(L1/L0) = - N * p * log(R1/R0) + Rsum(N) * [(1/R0)-(1/R1)].
  242.  
  243. where log => logarithm to the base e = 2.71828...  In particular, note
  244. that all terms in (p-1)*log[r(j)] cancel out when forming the RATIO
  245. because the null and alternative gamma distributions both have the SAME
  246. Shape parameter, p.  Again, remember we are assuming that the null and
  247. alternative gamma distributions differ only in their Scale parameters,
  248. R0 and R1.
  249.  
  250. The Wald(1947) formula for approximate accept / reject boundaries for
  251. Rsum(N) are then of the form...
  252. ┌──────────────────────────────────────────────────────────────────────┐
  253. │ Reject Value: {log[(1-Beta)/Alpha]+N*p*log[R1/R0]} / [(1/R0)-(1/R1)] │
  254. ├──────────────────────────────────────────────────────────────────────┤
  255. │ Accept Value: {log[Beta/(1-Alpha)]+N*p*log[R1/R0]} / [(1/R0)-(1/R1)] │
  256. └──────────────────────────────────────────────────────────────────────┘
  257. where Alpha is the objective for Producer's risk (probability of
  258. rejecting a batch when quality is at or better than its "good" level,
  259. R0), and Beta is the objective for Consumer's risk (probability of
  260. accepting a batch when quality is at or worse than the "bad" level, R1.)
  261.  
  262.          ***************************************************************
  263. EXAMPLE: R0=1 & R1=5 implies that [R1/R0] = 5 and [(1/R0)-(1/R1)] = 0.8.
  264.          The approximate Wald(1947) limits for p=1 & Alpha=Beta=0.05 are
  265.          then
  266.                Reject: ( log(19) + N*log(5) )/0.8 =  3.68 + N * 2.012,
  267.          and 
  268.                Accept: (-log(19) + N*log(5) )/0.8 = -3.68 + N * 2.012.
  269.  
  270.          Step:    1      2     3      4      5      6      7      8
  271.          Accept: -1.67   0.34  2.35   4.37   6.38   8.39  10.40  12.44
  272.          Reject:  5.69   7.70  9.72  11.73  13.74  15.75  17.76  19.77
  273.          ***************************************************************
  274.  
  275. The two main troubles in practical application of Wald's approximate
  276. method are:
  277.  
  278.       ...the Alpha and Beta levels actually achieved my not be very close
  279.          to their intended values, and
  280.  
  281.       ...accept and reject boundaries formed by a pair of parallel lines
  282.          can lead, in some situations, to large ASNs.  "Truncated"
  283.          tests (in which the limits converge after a specified number of
  284.          sequential steps) frequently have much greater practical appeal.
  285.  
  286. SeqDir automates a 4-stage process that allows quality practitioners to
  287. design sequential gamma test plans having KNOWN (exact) OC and ASN
  288. curves that correspond to boundaries of ARBITRARY form.  SeqDir
  289. achieves this by implementing the Aroian(1968) "Direct Method" of
  290. sequential analysis.  From the definitions:
  291.  
  292.         C(N) = Probability of Continuing Past Sequential Stage N,
  293.              = Probability that Rsum(N) is between the accept(N) and
  294.                reject(N) limits at sequential step N of the plan,
  295.  
  296.         A(N) = Probability of Accepting the Null Hypothesis at Stage N,
  297.              = Probability that Rsum(N) is less than accept(N), and
  298.  
  299.         R(N) = Probability of Rejecting the Null Hypothesis at Stage N,
  300.              = Probability that Rsum(N) is greater than reject(N),
  301.  
  302. it follows that
  303.                       A(N) + C(N) + R(N) = C(N-1),
  304.  
  305. where, by convention, C(0) = 1 and A(0) = R(0) = 0.
  306.  
  307. It is straight-forward to compute C(1); this is simply a definite
  308. integral over the Stage 1 continue region for a gamma distribution with
  309. Shape p and any given Scale, R.  The conditional distribution of Rsum(2)
  310. [given that it is necessary to continue past stage 1] is then the
  311. convolution of {i} the probability density of Rsum(1)=r(1) truncated to
  312. the continue region of Stage 1 with {ii} the original gamma distribution
  313. [of r(2)].  C(2) is then the definite integral of this convoluted
  314. distribution over the Stage 2 continue region.
  315.  
  316. By induction, the conditional distribution of Rsum(N) [given that it is
  317. necessary to continue past stage N-1] is the convolution of {i} the
  318. probability density of Rsum(N-1) truncated to the continue region of
  319. Stage N-1 with {ii} the original gamma distribution [of r(N)].  And C(N)
  320. is the definite integral of that convoluted distribution over the Stage
  321. N continue region.  etc., etc.
  322.  
  323. Rather than use numerical methods that actually integrate and convolute
  324. continuous distributions, SeqDir approximates all distributions (both
  325. the original gamma or exponential and all singly/doubly truncated
  326. "continue" distributions) by discrete distributions...with relatively
  327. large numbers of relatively narrow cells.  Definite integrals then
  328. become sums of cell-probabilities, while convolutions become sums of
  329. cell-probability products.
  330.  
  331. See McWilliams(1989) for a flow-chart of Aroian's method and an example
  332. application to pass/fail (binomial distribution) testing.
  333.  
  334.      SeqDir: Four Stages of "Design of Sequential Gamma Test Plans"
  335. ┌───────────────────────────────────────────────────────────────────────┐
  336. │ STAGE ONE: Invoke SeqDir and Specify Accept/Continue/Reject Limits    │
  337. ├───────────────────────────────────────────────────────────────────────┤
  338. │ STAGE TWO: Calculate OC & ASN Values over a Range of Expected Regrets │
  339. │            ...and possibly Confirm Calculations via Simulation        │
  340. ├───────────────────────────────────────────────────────────────────────┤
  341. │ STAGE THREE: Interactively View Plots of Boundary, OC & ASN Curves    │
  342. ├───────────────────────────────────────────────────────────────────────┤
  343. │ STAGE FOUR: Exit SeqDir to examine the Summary and/or Detailed OUTPUT │
  344. │             Files...and Formulate Boundaries for the Next SeqDir Run. │
  345. └───────────────────────────────────────────────────────────────────────┘
  346.  
  347. Section 3 of this documentation ("SeqDir Walk-Through") illustrates use
  348. of SeqDir.EXE in Stages 1, 2, and 3 of the above process for Design of
  349. Sequential Gamma Test Plans.
  350.  
  351.  
  352.                 ┌──────────────────────────────────────┐
  353.                 │  Section 2 - PC System Requirements  │
  354.                 └──────────────────────────────────────┘
  355.  
  356. The hardware and software requirements for the personal computer system
  357. that will use SeqDir are as follows:
  358.  
  359.      ...First of all, your machine should be IBM compatible with at least
  360.         300K (kilobytes) of available RAM memory.  A hard disk is
  361.         optional...but greatly speeds up SeqDir execution, especially when
  362.         writing an optional (potentially very large) "details" file.
  363.  
  364.      ...Secondly, to use item "P" on the main menu, your monitor should be
  365.         capable of displaying medium resolution (IBM/CGA) screen graphics.
  366.         Most PC monitors used in business applications support graphics
  367.         at this resolution or better (EGA, VGA, etc.)  Color is optional.
  368.  
  369.      ...Thirdly, a laser or dot-matrix printer can be used to produce
  370.         quick screen prints.  Boundary, OC, and ASN curves displayed on
  371.         your screen can be converted into hard copy by pressing the
  372.         letter S followed by a second "special" key:
  373.  
  374.              L or F10 ...Hewlett-Packard LaserJet/DeskJet
  375.              G or F9  ...IBM-compatible Graphics Dot Matrix Printer
  376.              E or F8  ...Epson FX, JX, or LQ Printers
  377.  
  378. To make efficient use of SeqDir, DOS must be informed of SeqDir's
  379. requirements to read and write multiple files.  This is accomplished by
  380. having a CONFIG.SYS file (on your boot disk or in your C:\ root
  381. directory) that contains lines (records) stating...
  382.  
  383.                                FILES=20
  384.                                BUFFERS=8
  385.  
  386.             *** SeqDir Input/Output FileName Conventions ***
  387.  
  388. The ASCII (text) files used by SeqDir for data input and output consist
  389. of a filename (of at most eight characters) specified by the user
  390. followed by a period (.) and one of three specific 3-character filename
  391. EXTensions.
  392.  
  393.           12345678.LIM  ...SeqDir Batch Input of Limit Parameters
  394.           12345678.OUT  ...SeqDir Summary  Output File.
  395.           12345678.DTL  ...SeqDir Detailed Output File.
  396.  
  397.  
  398.                   ┌─────────────────────────────────┐
  399.                   │ Section 3 - SeqDir Walk-Through │
  400.                   └─────────────────────────────────┘
  401.  
  402. Let us take a brisk walk through usage of SeqDir menus/prompts to
  403. familiarize first time users.  The SeqDir software system is invoked
  404. from MS-DOS by entering its 8-character name, SEQDIR, at your DOS
  405. prompt...
  406.                             Prompt> seqdir
  407.  
  408. SeqDir does not expect or accept any "command-line" arguments.  Instead,
  409. SeqDir will prompt you to use your keyboard and/or a bounce-bar menu to
  410. set parameters and provide all information SeqDir needs to perform
  411. analyses.  And each SeqDir prompt has an implied or [displayed] DEFAULT
  412. VALUE that you may accept by simply pressing the ENTER key.  [Displayed
  413. default values are usually shown in square brackets.]
  414.  
  415. ┌─────────────────── Direct Sequential Methods ──────────────────────┐
  416. │                                                                    │
  417. │                    SEQDIR.EXE...Version 9109                       │
  418. │                A Quality Assurance Training Tool:                  │
  419. │        Statistics Committee of the QA Section of the PMA           │
  420. │           Bob Obenchain, CompuServe User [72007,467]               │
  421. │                                                                    │
  422. │  ┌──────────────────────────────────────────────────────────────┐  │
  423. │  │  Will Accept/Reject LIMITS be Input via K = Keyboard ? ...or │  │
  424. │  │                                         B = Batch File ?     │  │
  425. │  │                                                              │  │
  426. │  │  Press the   K   or   B   key now -->                        │  │
  427. │  └──────────────────────────────────────────────────────────────┘  │
  428. └────────────────────────────────────────────────────────────────────┘
  429.  
  430. If you press the B key to select input from a "batch" file, the
  431. following screen [with a pop-up, bounce-bar filename selection menu]
  432. will appear...
  433. ┌──────────────────── Direct Sequential Methods ─────────────────────┐
  434. │                                                                    │
  435. │   Batch Input of A/R Limits Selected...                            │
  436. │                                                                    │
  437. │   At colon Prompts : ...simply press ENTER to get the [default].   │
  438. │                                                                    │
  439. │  ╔FileNames╗      Arrow Keys: Move Highlight Bar Up / Down.        │
  440. │  ║5STEP1   ║                                                       │
  441. │  ║5STEP5███║      Return Key: Selects the Highlighted File. >>>------+
  442. │  ║9WALD1   ║                                                       │ |
  443. │  ║9WALD5   ║      Escape Key: Abandon BATCH SeqDir Input.          │ |
  444. │  ╚═════════╝                                                       │ |
  445. │                                                                    │ |
  446. │   The Limits/Parms Input file is to be: 5STEP5.lim <-----------------+
  447. │                                                                    │
  448. │   Specify filename for Detailed Output [5STEP5.out] :              │
  449. │                                                                    │
  450. │   The SEQDIR Output Save file is to be: 5STEP5.out <--Default Accepted
  451. │                                                                    │
  452. │           Press Q to QUIT now...Other Key to Continue...           │
  453. └────────────────────────────────────────────────────────────────────┘
  454.  
  455. If you initially press the K key to select KEYBOARD input, SeqDir will
  456. prompt you for each parameter value it needs.  And SeqDir will also save
  457. your keystrokes in a file (that you may modify with any [ ASCII ] text
  458. editor)...to rerun analyses in "batch" mode!
  459.  
  460. The Screens for entering parameter values from your Keyboard look like
  461. this...
  462. ┌─────────────────── Direct Sequential Methods ──────────────────────┐
  463. │                                                                    │
  464. │  Keyboard Input of A/R Limits Selected...                          │
  465. │                                                                    │
  466. │  At colon Prompts : ...simply press ENTER to get the [default].    │
  467. │                                                                entered
  468. │  Specify filename to save Keyboard Input [seqdir] : 5step5 <----------
  469. │  The filename for saving Keyboard input is to be : 5step5.lim      │
  470. │                                                                    │
  471. │  Specify filename for Summary Output [5step5.out] : <---Default    │
  472. │  The SeqDir Output Save file is to be: 5step5.out       Accepted   │
  473. │                                                                    │
  474. │  Save Detailed Output in filename = 5step5 ? [N|y] : Y <--This may │
  475. │  The SeqDir Details Save file is to be: 5step5.dtl        create a │
  476. │                                                          VERY LARGE│
  477. │      Press Q to QUIT now...Other Key to Continue...       File!!!  │
  478. └────────────────────────────────────────────────────────────────────┘
  479.  
  480. ┌─────────────────────── SeqDir Parameters ──────────────────────────┐
  481. │                                                                    │
  482. │  What will be the Gamma SHAPE Parameter ? [    1] : 5       <--Entered
  483. │  SHAPE Parameter:     5.                                           │
  484. │                                                                    │
  485. │  What is the Null (low) Exp. REGRET ? [    1.00] : <--Default Accepted
  486. │  NULL Exp.Value:     1.00.                                         │
  487. │                                                                    │
  488. │  What is the Alt. (hi) Exp. REGRET ? [    5.00] :  <--Default Accepted
  489. │  ALT. Exp.Value:     5.00.                                         │
  490. │                                                                    │
  491. │  What is the Producers RISK ? [    0.05] :         <--Default Accepted
  492. │  Producers RISK :     0.05.                                        │
  493. │                                                                    │
  494. │  What is the Consumers RISK ? [    0.05] :         <--Default Accepted
  495. │  Consumers RISK :     0.05.                                        │
  496. └────────────────────────────────────────────────────────────────────┘
  497.  
  498. Wald's approximate limits (lying on a pair of parallel lines) are
  499. computed and displayed by SeqDir; these are the default SeqDir limits.
  500. But, instead of accepting these default limits by simply pressing the
  501. ENTER (or Carriage Return) key in response to each prompt, let us enter
  502. custom boundaries...
  503. ┌──────────────────────── SeqDir Parameters ─────────────────────────┐
  504. │   Respond to the following prompts for Limits...                   │
  505. │   To quit data entry, enter the letter...  Q                       │
  506. │                                                                    │
  507. │           Sequential Step Number:   1                              │
  508. │           Wald Lower Limit =     1.28                              │
  509. │           Enter <CR>, Lower Limit, NA or Q : na <------ Not Applicable
  510. │                                                                    │
  511. │          ┌────────────────────────────────────────────────────┐    │
  512. │          │ NOTE: An NA Lower Bound is equivalent to a -1.     │    │
  513. │          │       An NA Upper Bound is equivalent to a +9,999. │    │
  514. │          └────────────────────────────────────────────────────┘    │
  515. │                                                                    │
  516. │           Sequential Step Number:   1                              │
  517. │           Wald Upper Limit =     2.75                              │
  518. │           Enter <CR>, Upper Limit, NA or Q : 6  <--------------Entered
  519. │                                                                    │
  520. │           Sequential Step Number:   2                              │
  521. │           Wald Lower Limit =     3.29                              │
  522. │           Enter <CR>, Lower Limit, NA or Q : 0  <--------------Entered
  523. │                                                                    │
  524. │           Sequential Step Number:   2                              │
  525. │           Wald Upper Limit =     4.76                              │
  526. │           Enter <CR>, Upper Limit, NA or Q : 8  <--------------Entered
  527. └────────────────────────────────────────────────────────────────────┘
  528. etc.
  529. ┌──────────────────────── SeqDir Parameters ─────────────────────────┐
  530. │                                                                    │
  531. │           Sequential Step Number:   5                              │
  532. │           Wald Lower Limit =     9.32                              │
  533. │           Enter <CR>, Lower Limit, NA or Q : 12.99 <-----------Entered
  534. │                                                                    │
  535. │           Sequential Step Number:   5                              │
  536. │           Wald Upper Limit =    10.80                              │
  537. │           Enter <CR>, Upper Limit, NA or Q : 13 <--------------Entered
  538. │                                                                    │
  539. │           Sequential Step Number:   6                              │
  540. │           Wald Lower Limit =    11.33                              │
  541. │           Enter <CR>, Lower Limit, NA or Q : q <-----------Quit Signal
  542. │                                                                    │
  543. │   Total Number of Sequential Steps =  5                            │
  544. │                                                                    │
  545. │   Data Entry Complete...                                           │
  546. │   Press Q to QUIT now...Other Key to Continue...                   │
  547. └────────────────────────────────────────────────────────────────────┘
  548.  
  549. The corresponding "batch" input file created by SeqDir is formatted as
  550. follows...
  551. ┌───────────────────────────────────────────────────────────────────────┐
  552. │               Format for Batch Input: "FileName.LIM"                  │
  553. ├───────────────────────────────┬───────────────────────────────────────┤
  554. │ assayreg ...Name of Variable  │  Line  1: Name String and Comment     │
  555. │     5    ...Shape Parameter   │  Line  2: Gamma Dist. Peakedness.     │
  556. │     1.00 ...Null Parameter    │  Line  3: Exp. Regret of Null Dist.   │
  557. │     5.00 ...Alt. Parameter    │  Line  4: Exp. Regret of Alternative  │
  558. │     0.05 ...Producers Risk    │  Line  5: Wald Approx. Alpha Level    │
  559. │     0.05 ...Consumers Risk    │  Line  6: Wald Approx. Beta Level     │
  560. │    -1.00     6.00             │  Line  7: Step 1 Lower & Upper Limits │
  561. │     0.00     8.00             │  Line  8: Step 2 Lower & Upper Limits │
  562. │     4.00    10.00             │  - - -                                │
  563. │     8.00    12.00             │  - - -                                │
  564. │    12.99    13.00             │  Next to Last Line: Last Limit Pair   │
  565. │ q                             │  Last Line: Quit (End-of-Data) Signal │
  566. └───────────────────────────────┴───────────────────────────────────────┘
  567.  
  568. NOTES: Limit pairs for Accept / Continue / Reject Boundaries start on
  569.        line 6; the Upper Limit (second value) must equal or exceed the
  570.        Lower Limit (first value.)
  571.  
  572.        The last Lower / Upper Limit pair may, optionally, "Close Off"
  573.        the Continue Region...as illustrated above.  If the Continue
  574.        Region is left "Open" at the last step specified to SeqDir, then
  575.        the value of the Operating Characteristic (Accept Probability)
  576.        plus the Producer's Risk (Rejection Probability) my sum to much
  577.        less than one for some (or all) values of True Expected Regret.
  578.  
  579. The SeqDir MAIN MENU now appears.  You may proceed directly to item "D"
  580. if you are willing to accept SeqDir's default values for Number of Cells
  581. and Range of Integration (with implied Cell Width)...
  582.  
  583. ┌────────────────────────────── SeqDir Main Menu ────────────────────┐
  584. │  ┌──────────────────────────────┐                                  │
  585. │  │  Direct Sequential MENU      │                                  │
  586. │  │      M = set Maximum cells   │                                  │
  587. │  │      D = Direct Analyses     │                                  │
  588. │  │      S = Simulations         │                                  │
  589. │  │      P = Plots: Lims/OC/ASN  │                                  │
  590. │  │      Q = Quit SeqDir         │                                  │
  591. │  │  Choice --> M                │                                  │
  592. │  └──────────────────────────────┘                                  │
  593. └────────────────────────────────────────────────────────────────────┘
  594.  
  595. However, if you press the M key (as illustrated above), the following
  596. screen will appear...
  597. ┌─────────────────────── set Maximum cells ──────────────────────────┐
  598. │                                                                    │
  599. │  SeqDir uses probabilities within cell intervals to approximate    │
  600. │  continuous Gamma distributions (and their convolutions) by        │
  601. │  discrete distributions.  This approximation is fast but           │
  602. │  inaccurate when only a few hundred cell intervals are used.       │
  603. │  You will need to use one or two thousand cells to explore         │
  604. │  numerical sensitivities and confirm simulation results...         │
  605. │                                                                    │
  606. │  The Maximum number of cells that can be defined is 2,500.         │
  607. │                                                                    │
  608. │  The Maximum Rejection Upper Limit is  13.00.                      │
  609. │                                                                    │
  610. │  The Total Regret Range presently covered is [ 0.00, 25.00].       │
  611. │  Specify Maximum Regret Limit [ 25.00] :  <-----------Default Accepted
  612. │  Maximum Regret :    25.00.                                        │
  613. │                                                                    │
  614. │  Specify Total Number of Cells [   200] : 250   <--------------Entered
  615. │  Number of Cells :    250.                                         │
  616. │                                                                    │
  617. │  The implied Regret Cell WIDTH is :   0.1000                       │
  618. │                                                                    │
  619. │  Press any Key to Return to the Main Menu...                       │
  620. └────────────────────────────────────────────────────────────────────┘
  621.  
  622. Once you return to the MAIN MENU, you should press the "D" key to
  623. perform SeqDir Direct Calculations.  Each time you change cell widths
  624. or integration range, you should re-do calculations by pressing "D."
  625. ┌──────────────────────── SeqDir Analyses ───────────────────────────┐
  626. │  Direct Sequential Calculations...                                 │
  627. │  NULL Exp.Value = 1.00                                             │
  628. │  ALT. Exp.Value = 5.00                                             │
  629. │                                                                    │
  630. │  At most 50 Expected Regret Values can be evaluated.               │
  631. │  How many Expected Regret Values ? [5] :   <----------Default Accepted
  632. │  Number of Expected Regret Values = 5.                             │
  633. │                                                                    │
  634. │   Calculations for Expected Regret =     1.00.                     │
  635. │   ================   Accept   LowLim   Contin   UprLim   Reject    │
  636. │   At Seq. Step  1:  0.00000    -1.00  1.00000     6.00  0.00000    │
  637. │   At Seq. Step  2:  0.00000     0.00  1.00000     8.00  0.00000    │
  638. │   At Seq. Step  3:  0.92822     4.00  0.07178    10.00  0.00000    │
  639. │   At Seq. Step  4:  0.99876     8.00  0.00124    12.00  0.00000    │
  640. │   At Seq. Step  5:  0.99998    12.99  0.00000    13.00  0.00002    │
  641. │   Performance Statistics...                                        │
  642. │           Operating Characteristic =  1.00000                      │
  643. │           Producers Rejection Risk =  0.00000                      │
  644. │           Average Sample Number    =     3.07                      │
  645. │           ASN Standard Error       =     0.26                      │
  646. │                                                                    │
  647. └────────────────────────────────────────────────────────────────────┘
  648. NOTE: In SeqDir screen displays, the Accept, Continue, and Reject
  649. probabilities are normalized so that
  650.                                             A(N) + C(N) + R(N) = 1 .
  651.  
  652. Internal calculations in SeqDir use this normalization to preserve
  653. numerical precision, i.e. to prevent ALL of these probabilities from
  654. being small.  However, before results are written to the SeqDir output
  655. file, the correct normalization is imposed:
  656.  
  657.                                         A(N) + C(N) + R(N) = C(N-1).
  658.  
  659. For example, the analysis from the above screen for Exp.Regret=1 is
  660. written to the output file as:
  661.  
  662.          Step ===   Accept   LowLim   Contin   UprLim   Reject
  663.          Step  1:  0.00000    -1.00  1.00000     6.00  0.00000
  664.          Step  2:  0.00000     0.00  1.00000     8.00  0.00000
  665.          Step  3:  0.92822     4.00  0.07178    10.00  0.00000
  666.          Step  4:  0.07169     8.00  0.00009    12.00  0.00000
  667.          Step  5:  0.00009    12.99  0.00000    13.00  0.00000
  668.           1.00000 ...Operating Characteristic
  669.           0.00000 ...Producers Rejection Risk
  670.              3.07 ...Average Sample Number
  671.              0.26 ...ASN Standard Error
  672.  
  673. Similar calculations for Exp.Regret= 2, 3, 4, and 5 will be displayed as
  674. the screen scrolls upward within the window...
  675. ┌───────────────────────── Direct Analyses ──────────────────────────┐
  676. │                                                                    │
  677. │   Calculations for Expected Regret =     5.00.                     │
  678. │   ================   Accept   LowLim   Contin   UprLim   Reject    │
  679. │   At Seq. Step  1:  0.00000    -1.00  0.71494     6.00  0.28506    │
  680. │   At Seq. Step  2:  0.00000     0.00  0.40090     8.00  0.59910    │
  681. │   At Seq. Step  3:  0.00012     4.00  0.29734    10.00  0.70254    │
  682. │   At Seq. Step  4:  0.00419     8.00  0.25264    12.00  0.74318    │
  683. │   At Seq. Step  5:  0.09905    12.99  0.00000    13.00  0.90095    │
  684. │   Performance Statistics...                                        │
  685. │           Operating Characteristic =  0.00252                      │
  686. │           Producers Rejection Risk =  0.99748                      │
  687. │           Average Sample Number    =     2.11                      │
  688. │           ASN Standard Error       =     0.96                      │
  689. │                                                                    │
  690. │   Direct Sequential Calculations Complete...                       │
  691. │                                                                    │
  692. │   Press a KEY to return to the SeqDir Main MENU.                   │
  693. └────────────────────────────────────────────────────────────────────┘
  694.  
  695. Once you return to the MAIN MENU, you could press the "P" key to view
  696. medium-resolution (CGA) graphical display of the MOST RECENT results you
  697. calculated using item "D" (or items "M" and "P").  Item "P" will NOT
  698. OPERATE until you have selected "D" at least once.
  699.  
  700. However, let us choose option "S" next...
  701. ┌────────────────────────────── SeqDir Main Menu ────────────────────┐
  702. │  ┌──────────────────────────────┐                                  │
  703. │  │  Direct Sequential MENU      │                                  │
  704. │  │      M = set Maximum cells   │                                  │
  705. │  │      D = Direct Analyses     │                                  │
  706. │  │      S = Simulations         │                                  │
  707. │  │      P = Plots: Lims/OC/ASN  │                                  │
  708. │  │      Q = Quit SeqDir         │                                  │
  709. │  │  Choice --> S                │                                  │
  710. │  └──────────────────────────────┘                                  │
  711. └────────────────────────────────────────────────────────────────────┘
  712.  
  713. SeqDir can confirm the results it calculated using Aroian's direct
  714. method using Monte-Carlo simulation.  Furthermore, the graphical
  715. simulation display provided by SeqDir can give us a very good "visual
  716. impression" of what Sample Paths can be expected to "look like..."
  717. ┌──────────────────────────── Simulation ────────────────────────────┐
  718. │                                                                    │
  719. │   Sequential Simulations...                                        │
  720. │   NULL Exp.Value =     1.00                                        │
  721. │   ALT. Exp.Value =     5.00                                        │
  722. │                                                                    │
  723. │   Number of Expected Regret Values = 5                             │
  724. │                                                                    │
  725. │   Maximum Number of Simulation Replications = 25,000.              │
  726. │   Desired Number of Replications ? [500] :   <----------Accept Default
  727. │   Number of Replications = 500.                                    │
  728. │                                                                    │
  729. │   Input Start-up Seed ( 0 means use your Clock ): 123456  <------Enter
  730. │   Startup Seed  = -7616                                            │
  731. │                                                                    │
  732. │   Press a key to Start Simulations...                              │
  733. └────────────────────────────────────────────────────────────────────┘
  734.  
  735. If you enter a non-zero seed value, as illustrated above, this exact
  736. same "starting point" in SeqDir's pseudo-random sequence will be used
  737. for each distinct value of Expected Regret that is simulated.  The
  738. (linear) correlation between OC and ASN estimates at different values of
  739. Expected Regret will then be plus one; as highly correlated as possible!
  740.  
  741. On the other hand, zero is the default seed value (i.e. what you would
  742. get by simply pressing the ENTER key in response to the above prompt)
  743. and using that seed value has two implications.
  744.  
  745.     First of all, SeqDir will get a seed value from your system clock in
  746.     this case (and write that value to the output file for simulation
  747.     documentation.)
  748.  
  749.     Furthermore, SeqDir will NOT now reset its pseudo-random sequence to
  750.     the same starting point for each different Expected Regret value it
  751.     simulates.  In other words, the OC and ASN estimates for different
  752.     Expected Regrets will then be statistically independent.
  753.  
  754.   Usage of COLOR on SeqDir Simulation Displays:
  755.  
  756.        Cyan Box  => An observed Rsum(N) value in the Continue Region.
  757.        Cyan Line => Connects pairs of Cyan Boxes in the Continue Region.
  758.  
  759.     Magenta Box  => An observed Rsum(N) value in the Reject Region.
  760.     Magenta Line => Connects Cyan Continue Box to a Magenta Reject Box.
  761.  
  762.       White Box  => An observed Rsum(N) value in the Accept Region.
  763.       White Line => Connects Cyan Continue Box to a White   Accept Box.
  764.  
  765. ************************************************************************
  766. WARNING:  Do not press ANY KEY while Monte-Carlo Simulation is underway
  767. unless you desire EARLY TERMINATION for the Expected Regret value
  768. currently being simulated.  If you do press key(s), SeqDir will clear
  769. out the keyboard buffer and go on to the next Expected Regret value as
  770. soon as at least 10 replications have been completed.
  771. ************************************************************************
  772.  
  773. Once Direct Calculations and Simulations have both been performed, it is
  774. definitely time to "plot" results using item "P" on the Main Menu...
  775. ┌────────────────────────────── SeqDir Main Menu ────────────────────┐
  776. │  ┌──────────────────────────────┐                                  │
  777. │  │  Direct Sequential MENU      │                                  │
  778. │  │      M = set Maximum cells   │                                  │
  779. │  │      D = Direct Analyses     │                                  │
  780. │  │      S = Simulations         │                                  │
  781. │  │      P = Plots: Lims/OC/ASN  │                                  │
  782. │  │      Q = Quit SeqDir         │                                  │
  783. │  │  Choice --> P                │                                  │
  784. │  └──────────────────────────────┘                                  │
  785. └────────────────────────────────────────────────────────────────────┘
  786.  
  787. Note that item "P" is separate from items "D" and "S" on the Main Menu
  788. because you may wish to cycle through the graphical displays (the
  789. Accept/Continue/Reject limits and the OC and ASN Curves) several times
  790. for a single set of Calculated or Simulated Results.  Simply select item
  791. "P" several times.  If no simulations have been performed, SeqDir plots
  792. will start appearing as soon as you choose item P in the Main Menu.
  793.  
  794. If both "D"irect Calculations and "S"imulations have been performed, the
  795. following sub-menu will appear...
  796. ┌────────────────────────────── SeqDir Plotting ─────────────────────┐
  797. │                                                                    │
  798. │        Critical Region, Operating Characteristic,                  │
  799. │        and Average Sample Number Plots...                          │
  800. │                                                                    │
  801. │        From the NULL Exp.Value =     1.00 on the Left,             │
  802. │        To  ALTERNATE Exp.Value =     5.00 on the Right.            │
  803. │        5 = No. of Expected Regret Values per Plot.                 │
  804. │                     ┌──────────────────────────────┐               │
  805. │                     │Which Type of Plot ?          │               │
  806. │                     │                              │               │
  807. │                     │      R = Crit. Region        │               │
  808. │                     │      D = Direct Calc.        │               │
  809. │                     │      S = Simulation          │               │
  810. │                     │      Q = Quit                │               │
  811. │                     │                              │               │
  812. │                     │  Choice -->                  │               │
  813. │                     └──────────────────────────────┘               │
  814. └────────────────────────────────────────────────────────────────────┘
  815. At this point, choose the type of plot you wish to view (R, D, or S) or
  816. else return to the Main Menu by pressing Q.
  817.  
  818. Once a graphics screen is displayed by SeqDir, you may interactively
  819. annotate it.  For example, you may move an on-screen cursor to read
  820. numerical values off of the plot.  Simply, press the Space Bar or
  821. Function Key F1 for on-line HELP on interacting with graphics screens!
  822.  
  823.          ┌─────────────────────────────────────────────┐
  824.          │   This HELP screen .... Space Bar or F1.    │
  825.          │                                             │
  826.          │   ERASE PLOT......press ENTER or ESCape.    │
  827.          │     Note: 2nd KeyPress sometimes needed.    │
  828.          │                                             │
  829.          │   On-Screen Cursor & VALUES ... press V.    │
  830.          │     Move Cursor Right with Right Arrow.     │
  831.          │     Move Cursor Left  with Left  Arrow.     │
  832.          │                                             │
  833.          │   Screen PRINT/SAVE Keys:  First Press S    │
  834.          │   and then press a Second Special Key...    │
  835.          │    L or F10 dumps to HP LaserJet/DeskJet    │
  836.          │    I or F9  dumps to IBM Graphics Matrix    │
  837.          │    E or F8  dumps to Epson FX, JX, or LQ    │
  838.          │    S saves screen to disk in PCX format.    │
  839.          │                                             │
  840.          │   SeqDir, ver9109.........Press any key.    │
  841.          └─────────────────────────────────────────────┘
  842.  
  843. Note in particular that OPTIONAL screen dumps can be obtained by
  844. pressing first "S" then a second "special" key while the Limits, OC, or
  845. ASN screen is being displayed.  If you have annotated the screen, that
  846. annotation will be part of the screen dump.
  847.           ┌──────────────────────────────────────────────────┐
  848.           │          HP LaserJet, Plus & Series II           │
  849.           │  (press either the L key or function key F10.)   │
  850.           ├──────────────────────────────────────────────────┤
  851.           │    IBM-compatible Graphics Dot Matrix Printer    │
  852.           │   (press either the G key or function key F9)    │
  853.           ├──────────────────────────────────────────────────┤
  854.           │          Epson FX, JX, or LQ Printers            │
  855.           │   (press either the E key or function key F8)    │
  856.           └──────────────────────────────────────────────────┘
  857.  
  858. If you press any key other than one of the six "special" keys listed
  859. above after pressing "S", the Boundary, OC or ASN screen will be erased.
  860. After viewing the ASN curve, you will be returned to the Main Menu.
  861.  
  862. Press the "Q" key to terminate SeqDir execution and return to DOS...
  863. ┌────────────────────────────── SeqDir Main Menu ────────────────────┐
  864. │  ┌──────────────────────────────┐                                  │
  865. │  │  Direct Sequential MENU      │                                  │
  866. │  │      M = set Maximum cells   │                                  │
  867. │  │      D = Direct Analyses     │                                  │
  868. │  │      S = Simulations         │                                  │
  869. │  │      P = Plots: Lims/OC/ASN  │                                  │
  870. │  │      Q = Quit SeqDir         │                                  │
  871. │  │  Choice --> Q                │                                  │
  872. │  └──────────────────────────────┘                                  │
  873. └────────────────────────────────────────────────────────────────────┘
  874.  
  875. SeqDir will write "reminders" on your screen as it terminates...
  876.  
  877. REMINDER(S) :
  878.  
  879. SeqDir created a Batch History Input file... 5step5.lim
  880.  
  881.         You can invoke SeqDir and specify 5step5 [.lim]
  882.         as Batch History Input file to replay the present session.
  883.  
  884. SeqDir created an Output File named... 5step5.out
  885.  
  886.         Use the DOS invocation... LIST 5step5.out
  887.         to review summary statistics from this run.
  888.  
  889. SeqDir created a Details File named... 5step5.dtl
  890.                                                                    
  891.         Use the DOS invocation... LIST 5step5.dtl
  892.         to review detailed computational results.                  
  893.  
  894.  
  895.          ┌────────────────────────────────────────────────────┐
  896.          │  Section 4 - Effects of Changing SeqDir Parameters │
  897.          └────────────────────────────────────────────────────┘
  898.  
  899. This section of the SeqDir documentation discusses the effects of
  900. changing the gamma Shape parameter and the (numerical integration) cell
  901. width.
  902.  
  903.                      *** gamma Shape parameter ***
  904.  
  905. You must specify a numerical value of the gamma distribution Shape
  906. parameter, p, in response to the following SeqDir prompt...
  907.  
  908.            What will be the Gamma SHAPE Parameter ? [  1] :
  909.  
  910. Shape p=1 (an Exponential distribution) is the SeqDir default because
  911. calculations are very simple in this case.  For example, the right-hand
  912. tail probability of regret exceeding a value X when the Scale parameter
  913. is R would then be Pr[ r > X ] = exp( - X / R ), i.e. e = 2.71828...
  914. raised to the power - X / R.
  915.  
  916. Consider what would happen if the gamma distribution Shape parameter, p,
  917. were to increase as the gamma Scale parameter, R, decreases...leaving
  918. the expected regret value, E=p*R, constant.  The standard deviation of
  919. regret, R*sqrt(p)=E/sprt(p), would then decrease and the mode regret,
  920. max[ 0, E*(p-1)/p], will increase from 0 [for p<=1] toward its limiting
  921. value of E.
  922.  
  923. The slope of the Wald(1947) approximate accept / reject boundaries for
  924. Rsum(N) would be unchanged as p increases with E=p*R fixed, but the
  925. spacing between these boundaries would decrease (assuming that Alpha and
  926. Beta remain unchanged.)  In other words, it becomes easier and easier to
  927. distinguish between Scaling differences, R0 and R1, as the Shape
  928. parameter increases (i.e. small regrets become relatively less likely in
  929. the R1 scaling, and large regrets become relatively less likely at R0.)
  930.  
  931. Using those same sorts of arguments, if accept / reject boundaries are
  932. held fixed as the Shape increases, then the Operating Characteristic
  933. curve will increase near R0 (reduced producers risk) and decrease near
  934. R1 (reduced consumers risk.)  This point is illustrated in the following
  935. tabulation for the 5STEP1.LIM and 5STEP5.LIM boundary examples that use
  936. 2,500 cells over regret range [0,25]...
  937.                  ┌─────────────────────────────────────────────────────┐
  938.                  │ ExpR= 1    ExpR= 2    ExpR= 3    ExpR= 4    ExpR= 5 │
  939.                  │ (NULL)                                      (ALT.)  │
  940. ┌────────────────┼─────────────────────────────────────────────────────┤
  941. │ Shape = 1 (Exponential)                                              │
  942. │ Op. Char.      │ 0.99227    0.75959    0.44273    0.25156    0.15122 │
  943. │ ASN            │ 3.26       3.58       3.26       2.85       2.52    │
  944. │ ASN Std. Error │ 0.52       1.04       1.30       1.37       1.34    │
  945. ├────────────────┼─────────────────────────────────────────────────────┤
  946. │ Shape = 5      │                                                     │
  947. │ Op. Char.      │ 1.00000    0.92428    0.26564    0.02677    0.00210 │
  948. │ ASN            │ 3.10       4.33       3.96       2.79       2.10    │
  949. │ ASN Std. Error │ 0.30       0.67       1.17       1.19       0.95    │
  950. └────────────────┴─────────────────────────────────────────────────────┘
  951.  
  952.                      *** Range and Number of Cells ***
  953.  
  954. The following tabulation shows (again, for the 5STEP5.LIM boundary
  955. example) that OC and ASN calculations are somewhat MORE sensitive to the
  956. "cell width" used to represent definite integrals with finite sums of
  957. cell probabilities than they are to the number of replications used in
  958. Monte-Carlo simulation!
  959.  
  960.                    ┌────────────────────┬┬────────────────────┐
  961.                    │    Direct Method   ││    Monte-Carlo     │
  962.                    │    Calculations    ││    Simulations     │
  963.                    ├────────────────────┼┼────────────────────┤
  964.         Range:  0.0 to 25.00      40.00 ││       0            Startup
  965.         No. Intervals    250       2000 ││  -25012      -7616 Seed
  966.         Interval Width  0.10       0.02 ││     500      10000 Replics
  967. ┌──────────────────┼────────────────────┼┼────────────────────┤
  968. │  Expected Regret │    1.00       1.00 ││    1.00       1.00 │
  969. │  Operating Char. │ 1.00000    1.00000 ││ 0.99800    0.99990 │
  970. │  Producers Risk  │ 0.00000    0.00000 ││ 0.00000    0.00000 │
  971. │  Aver.Samp.No.   │    3.07       3.10 ││    3.11       3.10 │
  972. │  ASN Std. Error  │    0.26       0.30 ││    0.31       0.31 │
  973. ├──────────────────┼────────────────────┼┼────────────────────┤
  974. │  Expected Regret │    2.00       2.00 ││    2.00       2.00 │
  975. │  Operating Char. │ 0.93415    0.92544 ││ 0.90619    0.92341 │
  976. │  Producers Risk  │ 0.06585    0.07456 ││ 0.09182    0.07609 │
  977. │  Aver.Samp.No.   │    4.26       4.32 ││    4.31       4.34 │
  978. │  ASN Std. Error  │    0.68       0.67 ││    0.69       0.67 │
  979. ├──────────────────┼────────────────────┼┼────────────────────┤
  980. │  Expected Regret │    3.00       3.00 ││    3.00       3.00 │
  981. │  Operating Char. │ 0.28768    0.26805 ││ 0.25549    0.26307 │
  982. │  Producers Risk  │ 0.71232    0.73195 ││ 0.74251    0.73603 │
  983. │  Aver.Samp.No.   │    3.98       3.96 ││    3.96       3.95 │
  984. │  ASN Std. Error  │    1.16       1.17 ││    1.20       1.18 │
  985. ├──────────────────┼────────────────────┼┼────────────────────┤
  986. │  Expected Regret │    4.00       4.00 ││    4.00       4.00 │
  987. │  Operating Char. │ 0.03081    0.02719 ││ 0.02794    0.02770 │
  988. │  Producers Risk  │ 0.96919    0.97281 ││ 0.97006    0.97210 │
  989. │  Aver.Samp.No.   │    2.81       2.79 ││    2.81       2.78 │
  990. │  ASN Std. Error  │    1.21       1.19 ││    1.23       1.20 │
  991. ├──────────────────┼────────────────────┼┼────────────────────┤
  992. │  Expected Regret │    5.00       5.00 ││    5.00       5.00 │
  993. │  Operating Char. │ 0.00252    0.00214 ││ 0.00000    0.00280 │
  994. │  Producers Risk  │ 0.99748    0.99786 ││ 0.99800    0.99710 │
  995. │  Aver.Samp.No.   │    2.11       2.10 ││    2.10       2.09 │
  996. │  ASN Std. Error  │    0.96       0.95 ││    0.92       0.95 │
  997. └──────────────────┴────────────────────┴┴────────────────────┘
  998.                                                              
  999. A somewhat surprising observation from the above table is the closeness
  1000. of agreement between the simulation results with 500 and 10,000
  1001. replications, respectively.  And direct calculations with 2,000
  1002. intervals over the [0,40] range also agree closely with the simulation
  1003. results.  In fact, direct calculations with only 250 cells over [0,25]
  1004. appear to be relatively less accurate than simulations with only 500
  1005. replications!
  1006.  
  1007. Of course, SeqDir direct calculations can be performed much more
  1008. quickly with fewer cells (200 to 500) than with many (say, 2000 to
  1009. 2500.)  But relatively "wide" cell widths (say, 0.1 to 0.25 regret
  1010. units) are recommended only for preliminary, exploratory SeqDir
  1011. runs.
  1012.  
  1013. As your sequential test design process approaches its final
  1014. stages, you will need to make SeqDir runs with (much) smaller cell
  1015. widths to investigate numerical sensitivity in your computed OC
  1016. and ASN curves.
  1017.  
  1018. McWilliams(1991) has done some independent numerical calculations
  1019. and simulations that seem to agree well not only with the SeqDir
  1020. direct calculations (at least, those using a couple thousand cells)
  1021. but also with SeqDir simulations.
  1022.  
  1023.  
  1024.                              REFERENCES
  1025.  
  1026. AROIAN, L. A. (1968).  "Sequential Analysis, Direct Method."
  1027.         Technometrics 10, 125-132.
  1028.  
  1029. AROIAN, L. A. (1976).  "Applications of the Direct Method in Sequential
  1030.         Analysis."  Technometrics 18, 301-306.
  1031.  
  1032. McWILLIAMS, T. P. (1989).  How To Use Sequential Statistical Methods.
  1033.         Volume 13 of "The ASQC Basic References in Quality Control:
  1034.         Statistical Techniques."  American Society for Quality Control,
  1035.         Milwaukee, WI 53203.
  1036.  
  1037. McWILLIAMS, T. P. (1991).  Computer programs DRCONT and GAMSIM.
  1038.         Personal Communication.
  1039.  
  1040. PRESS, et.al. (1988). "Numerical Recipes in C: The Art of Scientific
  1041.         Computing."  Cambridge University Press.  C-source code Copr.
  1042.         (C) 1985, 1987 by Numerical Recipes Software, P.O. Box 243,
  1043.         Cambridge, MA 02238. (Gamma & pseudo-random number functions.)
  1044.  
  1045. WALD, A. (1947).  Sequential Analysis.  John Wiley & Sons, New York.
  1046.  
  1047.  
  1048.  
  1049.  ┌─────────────────────────────────────────────────────────────────────┐
  1050.  │ SeqDir was compiled using Microsoft C, ver6.00AX, using the default │
  1051.  │ mode that will automatically detect and utilize a 8087 numeric math │
  1052.  │ coprocessor if your PC has this type of chip.                       │
  1053.  └─────────────────────────────────────────────────────────────────────┘
  1054.  
  1055.  
  1056.  
  1057.  SeqDir Software Update History:
  1058.  =================================
  1059.  
  1060.  Version 9107 ...Beta Test Version, Exponential Distributions Only
  1061.  
  1062.  Version 9108 ...Handle Gamma & Exponential Distributions
  1063.  
  1064.  Version 9109 ...Add graphical Simulation Module
  1065.