home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / educ / pstat1.zip / PROB111.DOC < prev    next >
Text File  |  1986-12-17  |  7KB  |  220 lines

  1.  
  2.  
  3.  
  4.  
  5.                                  PROB.BAS v1.11
  6.  
  7.                                 Joseph C. Hudson
  8.  
  9.  
  10.      PROB.BAS computes probabilities for the Binomial, Negative Binomial,
  11. Hypergeometric and Poisson distributions. It computes probabilities and percent-
  12. age points for the Standard Normal, Student's T, Chi-Square and F distributions.
  13. The program is menu driven. PROB.BAS is designed to compute probabilities to 4
  14. decimal places and percentage points to 4 significant figures. It meets these
  15. goals, except perhaps for extremely large or small parameter values.
  16.      PROB.BAS uses finite series expansions to compute T, F and Chi-Square
  17. probabilities. A combination of MacLauren series and continued fraction
  18. expansion is used to compute standard normal probabilities. Percentage points
  19. for the continuous distributions are computed using a one dimensional search
  20. with nonlinear interpolation.
  21.      PROB can be invoked by typing PROB111 at the DOS prompt. This executes the
  22.  file PROB111.EXE. The screens PROB presents are described below. To stop the
  23. program, type Q when this option appears on the screen. If you want to stop
  24. execution when this option does not appear on screen, the control-break
  25. combination will work. Control-C will not work.
  26.      You can also run PROB by using the source code file PROB111.BAS with the
  27. basic interpreter BASICA or GWBASIC. This is quite a bit slower than using the
  28. executable file.
  29.      The headings used by PROB.BAS for each distribution are listed below,
  30. together with sample output and a brief description of the parameters.
  31.  
  32.  
  33.      This menu appears when the program starts:
  34.  
  35.  
  36. SELECT A DISTRIBUTION:
  37.  
  38.                 1 BINOMIAL         2 NEGATIVE BINOMIAL
  39.                 3 POISSON          4 HYPERGEOMETRIC
  40.                 5 STD NORMAL       6 STD NORMAL  INVERSE
  41.                 7 STUDENT'S T      8 STUDENT'S T INVERSE
  42.                 9 CHI SQUARE      10 CHI SQUARE  INVERSE
  43.                11 F               12 F           INVERSE
  44.  
  45.  
  46.  
  47.      The individual displays follow. X, Z, T, X² and F are random variables with
  48. the distribution in question. Lower case equivalents are values of these random
  49. variables.
  50.  
  51.  
  52.  
  53.  BINOMIAL DISTRIBUTION
  54.  
  55.     N      P       x        Pr( X = x )     Pr( X <= x )
  56.    15    .3120      5         0.2110           0.6855
  57.  
  58.         N - sample size, number of trials
  59.         p - the probability of success on any trial
  60.  
  61.  
  62.  
  63.  
  64. PROB.BAS                                                        PAGE 2
  65.  
  66.  
  67. NEGATIVE BINOMIAL DISTRIBUTION
  68.  
  69.     N      P       x        Pr( X = x )     Pr( X <= x )
  70.     4    .5600      7         0.1675           0.6294
  71.  
  72.         N - The number of successes required before stopping
  73.         p - The probability of success on any trial
  74.  
  75.  
  76.  
  77. POISSON DISTRIBUTION
  78.  
  79.     Mu        x        Pr( X = x )      Pr( X <= x )
  80.     1.25       3         0.0933            0.9617
  81.  
  82.         Mu - The mean of the distribution
  83.  
  84.  
  85.  
  86. HYPERGEOMETRIC DISTRIBUTION
  87.  
  88.   N    n    k     Min   Max    x    Pr( X = x )     PR( X <= x )
  89.   25   12   15      2    12     8     0.2599           0.8558
  90.  
  91.         N - Population size
  92.         n - Sample size
  93.         k - The number of possible successes in the population
  94.  
  95.         Min and Max are the extreme values that X can take on. They are computed
  96. by the program. x must be between these values.
  97.  
  98.  
  99.  
  100. STANDARD NORMAL DISTRIBUTION
  101.  
  102.    z       Pr( Z < z )      Pr( Z > z )      Pr( |Z| > |z| )
  103.   1.230      0.8907           0.1093             0.2187
  104.  
  105.  
  106.  
  107. PERCENTAGE POINTS OF THE STANDARD NORMAL DISTRIBUTION
  108.  
  109. Enter PROB, program returns z, where Pr( Z > z ) = PROB
  110.  
  111.   PROB        z
  112.  0.1000      1.282
  113.  
  114.  
  115.  
  116. STUDENT'S T DISTRIBUTION
  117.  
  118.     DF      t       Pr( T < t )   Pr( T > t )   Pr( |T| > |t| )
  119.     57     2.140      0.9817        0.0183          0.0366
  120.  
  121.         DF - degrees of freedom
  122.  
  123.  
  124.  
  125.  
  126. PROB.BAS                                                        PAGE 3
  127.  
  128.  
  129. PERCENTAGE POINTS OF THE STUDENT'S T DISTRIBUTION
  130.  
  131. Enter PROB, program returns t, where Pr( T > t ) = PROB
  132.  
  133.     DF     PROB       t
  134.     67    0.1000     1.294
  135.  
  136.  
  137.  
  138. CHI - SQUARE DISTRIBUTION
  139.  
  140.     DF      x²     Pr( X² < x² )    Pr( X² > x² )
  141.     23    30.400      0.8617           0.1383
  142.  
  143.         DF - Degrees of freedom
  144.  
  145.  
  146.  
  147. PERCENTAGE POINTS OF THE CHI - SQUARE DISTRIBUTION
  148.  
  149. Enter PROB, program returns x², where Pr( X² > x² ) = PROB
  150.  
  151.     DF     PROB       x²
  152.     23    0.0100    41.638
  153.  
  154.  
  155.  
  156. F DISTRIBUTION
  157.  
  158.   DF1   DF2     f       Pr( F < f )     Pr( F > f )
  159.    12    35    2.610      0.9865          0.0135
  160.  
  161.         DF1 - Numerator degrees of freedom
  162.         DF2 - Denominator degrees of freedom
  163.  
  164.  
  165.  
  166. PERCENTAGE POINTS OF THE F DISTRIBUTION
  167.  
  168. Enter PROB, program returns f, where Pr( F > f ) = PROB
  169.  
  170.   DF1    DF2      PROB       f
  171.    17     12     0.0500     2.583
  172.  
  173.  
  174.      Suggestions and problem reports would be appreciated. Comments may be sent
  175. to the author at the Department of Science and Mathematics, GMI Engineering and
  176. Management Institute, 1700 W. Third Ave, Flint, MI 48504
  177.  
  178.  
  179.  
  180. PROB.BAS                                                        PAGE 4
  181.  
  182.  
  183. References
  184.  
  185. Dudewicz, E. J. and S. R. Dalal, 1972, On approximations to the t-distribution.
  186. Journal of Quality Technology, Vol 4 no 4.
  187.  
  188.      Presents the finite cosine series expansion of the T CDF.
  189.  
  190. Koo, J. O., 1984, Algorithm to evaluate incomplete beta function ratio,
  191. Proceedings of the Statistical Computing Section, American Statistical Associ-
  192. ation, Washington, DC.
  193.  
  194.      Presents formulas relevant to the F distribution, not used in PROB.BAS,
  195. though a feasible alternative.
  196.  
  197. Moran, P. A. P., 1984, An Introduction to Probability Theory, Oxford University
  198. Press, New York.
  199.  
  200.      Generally good discussion of distributions.
  201.  
  202. Nonweiler, T. R. F., 1984, Computational Mathematics, an Introduction to Numr-
  203. ical Approximation, Halstead Press, New York.
  204.  
  205.      Discusses interpolation and continued fractions.
  206.  
  207. Volk, William, 1982, Engineering Statistics with a Programmable Calculator,
  208. McGraw-Hill, New York.
  209.  
  210.      Presents an understandable discussion of the finite series expansion of the
  211. F CDF.
  212.  
  213. Zelen, M. and N. C. Severo, 1970, Probability Functions, chapter 26 in
  214. Abramowitz, M. and I. A. Stegun (eds), Handbook of Mathematical Functions,
  215. National Bureau of Standards Applied Mathematics Series, No. 55.
  216.  
  217.      Has a wealth of material, but there have been a lot of corrections from the
  218. 1965 edition. I suspect more corrections are in order. Still, an important
  219. reference. The recurrence relation on page 941 was used for X² in PROB.BAS.
  220.