home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
engineer
/
ksprob21.zip
/
KSDOCS.EXE
/
KSPROB.DOC
< prev
next >
Wrap
Text File
|
1993-05-23
|
7KB
|
152 lines
ksprob 2.10
Joseph C. Hudson
4903 Algonquin
Clarkston, MI 48348
introduction
ksprob computes probabilities and quantiles for a number of
distributions. One somewhat novel feature is that quantiles are
computed for discrete distributions.
I do not offer a warranty or guarantee of any kind for this
program. I've tried hard to make the output correct, but using
it with new data sets and different machines may reveal errors
I'm not aware of. Follow the advice of Gerard E. Dallal
(Statistical Microcomputing - Like It Is, American Statistician,
V42 N3 Aug 1988): assume that this program does everything wrong
until you put it through its paces with difficult input and
conclude otherwise. Above all, enjoy. If you care to send me a
brief report about what you like and don't like about this
program, it would be very much appreciated.
ksprob is copyright (C) 1990-93 Joseph C. Hudson 4903 Algonquin
Clarkston MI 48348. All rights are reserved.
running ksprob
When ksprob starts, the main menu appears:
┌──────────────────────────────────────────────────────────────┐
│ ksprob 2.10 │
│ │
│ exit help dir viewfile compute: │
│ │
│ file name: │
│ │
│ binomial beta inverse Gaussian │
│ discrete Weibull Cauchy Laplace │
│ hypergeometric chi-square lognormal │
│ negative binomial noncen chi-square logistic │
│ Poisson largest extr value normal (Gaussian) │
│ smallst extr value Pareto │
│ exponential Rayleigh │
│ F Student`s t │
│ noncentral F noncentral t │
│ gamma (Erlang) triangular │
│ Weibull │
│ │
└──────────────────────────────────────────────────────────────┘
Hitting the <Home> key anywhere in the main menu or the <Esc>
key below the file name: line will move the cursor to <exit>.
With the cursor on <exit>, hit the x key to exit the program.
ksprob page 2
Output can be written to screen, file or printer. The default
is to write to screen. To select file or printer, move to <file
name:> and press <enter>. You will be asked to enter a file name
or one of LPT1, LPT2 or LPT3. If you enter the name of a file
that already exists, output will be appended to the end of the
file. If you enter LPT1,2 or 3, output will be sent to that
printer port. Most computers with one printer use LPT1 as the
printer port. You can view the contents of the output file using
the <viewfile> selection in the main menu.
<dir> will show a disk directory.
ksprob will compute either probabilities (pdf,cdf,rel,haz) or
inverse cdfs (percentiles, quantiles). You can toggle between
these at the <compute:> entry in the first menu row. You
can also toggle between these by hitting the t key while
in the main body of the menu.
Use the arrow keys to move below the <file name:> selection into
the distributions area. By putting the cursor on the name of the
distribution you want and pressing <enter>, you bring up a screen
that allows you to enter parameters for the distribution and a
value of the random variable. If the program is set to compute
probabilities, the default, values of the pdf, cdf, reliability
and hazard functions are computed. For example, selecting normal
in the main menu will bring up the heading
normal (Gaussian) distribution
mu sigma x f(x) F(x) R(x) h(x)
0.000000 1.000000 1.000000 0.241971 0.841345 0.158655 1.525135
Entering the values shown for mu, sigma and x, the program will
compute the other numbers. the cursor will go to the next line,
ready for another computation. The display will scroll when the
last line used above the help box is reached. The help box gives
a brief description of the parameters and restrictions on them
and on x. Hit the Esc key to return to the main menu.
If inverse cdfs is selected, the selecting the normal
distribution brings up
percentage points of the normal (Gaussian) distribution
mu sigma cdf x
0.000000 1.000000 0.950000 1.644854
If you enter mu, sigma and cdf, the program computes x.
ksprob page 3
With inverse cdfs, selecting binomial brings up
percentage points of the binomial distribution
n p cdf x F(x) F(x+1)
20 0.300000 0.950000 8 0.886669 0.952038
11 0.500000 0.500000 5 0.500000 0.725586
entering 20, .3 and .95, the program finds the largest x for
which the cdf is less than or equal to .95, in this case 8. The
cdf values for 8 and 9 are then shown. Sometines there will be
an exact match, as in the second line of output.
With probabilities selected, the same quantities are computed for
discrete distributions as for continuous:
binomial distribution
n p x f(x) F(x) R(x) h(x)
20 0.300000 8 0.114397 0.886669 0.113331 0.576800
computational notes
The distributions available in ksprob are described in two doc-
uments: ksprdist.wp and ks.doc. ks.doc gives parameterizations,
and ksprdist.wp is a wordperfect document giving pdfs, cdfs, mean
and variance.
For discrete distributions, the hazard function is
h(x) = f(x+1)/ R(x).
The 80x87 chip is used if present, and is simulated if not
present. All computations are done with 64 bit reals. If a
computation cannot be carried out, a missing value is reported.
For reals, the missing value is the 8087 'infinity'. For any
other variable type, the missing value is the largest value that
the type can assume, i.e. 255 for bytes, 32767 for integers,
65535 for words, 2147483647 for longints.
For references, see ks.doc.