home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
engineer
/
ksprob21.zip
/
KSDOCS.EXE
/
KS.DOC
< prev
next >
Wrap
Text File
|
1993-05-24
|
18KB
|
462 lines
ks Probability and Statistics Programs
Version 2.10
Joseph C. Hudson
4903 Algonquin
Clarkston, MI 48348
There are 6 ks probability and statistics programs:
ksclt illustrates the central limit theorem.
kscor lets you explore the meaning of correlation.
kspdat generates probability data.
kspsim simulates samples from probability distributions
ksprob does probability calculations.
ksstat produces histograms, scatterplots, regressions,
crosstabs, summary statistics and normality tests.
There are document files for kspdat, ksprob and ksstat. kscor and
ksclt and kspsim are self documenting. Descriptions of other files:
ksmisc.exe self extracting archive containing miscellaneous
programs and related files.
ksprdist.exe self extracting archive containing ksprdist.wp, a
WordPerfect document containing a chart of prob-
ability distributions, a table summarizing the
distributions and ksprbas.bas.
ksdocs.exe self extracting archive containing
kspdat.doc manual for kspdat
ksprob.doc manual for ksprob
ksstat.doc manual for ksstat
ks.doc general reference
which are paginated ascii files. type or copy them
to prn to get hard copy: type file.doc > prn
ksdocs.exe also contains:
kssample.cod codebook file for example data. see ksstat.doc.
kssample.dat example data
kssample.L01 example of lilliefor output. Print on an Epson
printer with the command copy kssample.L01 prn /b
kspdns.exe Student's t vrs normal \ self extracting archives
kspdbn.exe binomial vrs normal | giving examples of the use
kspdwe.exe Weibull / of kspdat's output.
ks probability and statistics programs page 2
IMPORTANT GRAPHICS NOTE: All programs except ksprob allow you to
choose your graphics mode, resolution, and normal or white on
black video. NEVER CHOOSE A MODE NOT SUPPORTED BY THE HARDWARE. I
cannot predict, or be responsible for, what might happen. To be
safe, stick with the mode the program comes up in.
If you run these programs on an LCD screen, you may have to
switch from normal to white on black to be able to see some of
the graphs.
The families of random variables available in ksprob and kspdat
and their parameterizations are listed below. For a more detailed
listing, see ksprdist.wp. There is no essential information in
ksprdist.wp, but it does list the densities, CDFs, expected val-
ues and variances of the distributions listed below. Looking at
these might clear up any uncertainties in the list here. I apolo-
gize for giving you this doc as a wordperfect 5.1 file, but the
formulas are too involved to list in an ascii file.
In the listing below, Z is the set of integers, Z+ the set of
positive integers, and R the set of reals. ^ represents
exponentiation.
The support of a random variable is the set of values for which
the density or probability function takes on nonzero values.
Name Parameters and Support Comments
restrictions
Beta a > 0 0 < x < 1 E(X) = a / (a + b)
b > 0
Binomial n ε Z+ 0 ≤ x ≤ n E(X) = np
0 < p < 1 x ε Z Var(X) = np(1 - p)
Cauchy a > 0 x ε R f(x) = b/(π[(x-a)²+b²])
the standard Cauchy has
a = 0, b = 1
Chi-square df ε Z+ x > 0 E(X) = df, Var(X) = 2df
Noncentral df ε Z+ x > 0 E(X) = df + nc
Chi-square nc ≥ 0 nc is noncentrality param
Discrete 0 < p < 1 x ε Z+ F(x) = 1 - p^(x^ß)
Weibull ß > 0
Largest a ε R x ε R mode is a, E(X) = a+τb
Extreme b > 0 Var(X) = b²π²/6
Value τ is Euler's constant
ks probability and statistics programs page 3
Name Parameters and Support Comments
restrictions
Smallest a ε R x ε R mode is a, E(X) = a-τb
Extreme b > 0 Var(X) = b²π²/6
Value τ is Euler's constant
Exponential µ > 0 x > 0 E(X) = µ, Var(X) = µ²
F df1 ε Z+ x > 0 df1 is numerator d.f.
df2 ε Z+ df2 is denominator d.f.
Noncentral df1 ε Z+ x > 0 df1 is numerator d.f.
F df2 ε Z+ df2 is denominator d.f.
nc > 0 nc is noncentrality param
Gamma a > 0 x > 0 E(X) = aΘ, Var(X) = aΘ²
Θ > 0
Hyper- N > 0 max{0,k+n-N} N,n,k,x all integer
geometric 0 < n < N ≤ x ≤
0 < k < N min{k,n}
Inverse µ > 0 x > 0 E(X) = µ
Gaussian lambda > 0 Var(X) = (µ^3)/lambda
Laplace a > 0 x ε R E(X) = (b-a)/(ab)
b > 0 Var(X) = (a²+b²)/(a²b²)
Logistic µ ε R x ε R E(X) = µ Var(X) = σ²
σ > 0
Lognormal µ ε R x > 0 F(x) = Φ[(Ln(x)-µ)/σ]
σ > 0 where Φ is the standard
normal CDF.
Negative n ε Z+ x ≥ n E(X) = n/p
Binomial 0 < p < 1 x ε Z var(X) = n(1-p)/p²
(Pascal)
Normal µ ε R x ε R E(X) = µ Var(X) = σ²
σ > 0
Pareto b > 0 x > 1 F(x) = 1 - x^(-b)
Poisson µ > 0 x ≥ 0 E(X) = µ
x ε Z Var(X) = µ
Rayleigh b > 0 x > 0 E(X) = b√(π/2)
Var(X) = b²(4-π)/2
Student's t df ε Z+ x ε R E(X) = 0
Var(X) = df/(df-2), df > 2
ks probability and statistics programs page 4
Noncentral t df ε Z+ x ε R
nc ε R nc is noncentrality param
Triangular a ε R a-b < x < a+b E(X) = a, Var(X) = b²/6
b > 0
Continuous min < max min < x < max E(X) = (min + max) / 2
Uniform both in R x ε R Var(X) = (max-min)²/12
Discrete min < max min ≤ x ≤ max E(X) = (min + max) / 2
Uniform both in Z x ε Z Var(x)=[(max-min+1)²-1]/12
Weibull Θ > 0 x > δ E(X) = δ + ΘΓ(1+1/ß)
ß > 0 Var=Θ²[Γ(1+2/ß)-Γ²(1+1/ß)]
δ ε R
Version History
version date comments
1.00 3/14/90 original release at MACUL
1.01 5/29/90 minor bug fix - sent to psl, pc-sig, ncs
1.02 8/30/90 fixed bug in kspdat ind var routine. sent to RH
1.03 9/08/90 fixed another bug in kspdat ind var routine;
added df as ind var in kspdat; changed logic in
savedata so if number of tables is one but
there are only two columns of data, output is
same as if number of tables were many; extensive
rewrite of kspdat doc, minor changes in other
docs.
1.04 12/15/90 numerous small changes in ksstat, especially
kscfit, where a better forms help screen was
written. Corrected error in add confidence
limits to data that produced garbage for data
files longer than 43 lines. Skewness and
kurtosis tests were added to the Lilliefors
goodness of fit test.
1.05 2/04/91 added code to properly capture text from
monochrome (Hercules text) screens. corrected
several minor errors. Made Weibull parameter-
ization consistent.
2.00 8/15/92 Complete revision. Added screen and hpgl
graphics, added programs kscor and ksclt.
ks probability and statistics programs page 5
2.01 9/10/92 Corrected error in kscor, refined histogram
axis labeling.
2.10 5/20/93 Added noncentral distributions to ksprob and
kspdat. Generalized triangular dist. Rewrote
ksprob's menu to be more like other programs.
Added ksprdist.wp and expanded ks.doc to inc-
lude a version of the former ksprdist.doc. Added
kspsim, corrected file name problem in kscor.
References for all ks programs and documents.
Ali Khan, M.S., A. Khalique and A.M. Abouammoh, 1989, On
Estimating Parameters in a Discrete Weibull Distribution, IEEE
Transactions on Reliability, Vol 38, No 3.
the type I discrete Weibull distribution is implemented in ks
programs.
Beyer, W.H. (ed.), 1968, CRC Handbook of tables for Probability
and Statistics, Second Edition, Chemical Rubber Co. Cleveland OH
has Euler's constant, various tables used to check computations.
Bowman, K.O. and L.R. Shenton, 1988, Properties of Estimators for
the Gamma Distribution, Marcel Decker, New York.
gives series and continued fraction expansions for the
complementary incomplete gamma function.
Bowman, K.O. and L.R. Shenton, 1989, Continued Fractions in
Statistical Applications, Marcel Decker, New York.
presents Euler's psi function, polygamma functions.
Chhikara, R. S. and J. L Folks, 1988 The Inverse Gaussian
Distribution. Marcel Decker, New York
A nice expansion of the 1978 paper. Do not really address
computational issues.
Dallal, G.E. and L. Wilkinson, 1986, An Analytic Approximation to
the Distribution of Lilliefors's Test Statistic for Normality,
The American Statistician, Vol 40, No 4.
gives corrected critical values for Lilliefors' test.
ks probability and statistics programs page 6
Dudewicz, E. J. and S. R. Dalal, 1972, On Approximations to the
T-Distribution. Journal of Quality Technology, Vol 4 no 4.
presents a finite cosine series expansion of the t cdf.
Folks, J. L. and R. S. Chhikara, 1978, The Inverse Gaussian
Distribution and its Statistical Application - A Review. Journal
of the Royal Statistical Society, Series B, Vol 40, No. 3.
Nice summary of the Inverse Gaussian - particularly good
discussion following the paper.
Harter, L. H., 1964, New Tables of the Incomplete Gamma-Function
Ratio and of Percentage Points of the Chi-Square and Beta
Distributions, U.S. Government Printing Office, Washington, D.C.
tables were used to check the beta distribution computations.
Hastings, N. A. J., and J. B. Peacock, 1975, Statistical
Distributions, Butterworths, London
information about many of the distributions used here.
Jones, W. B. and W. J. Thron, 1980, Continued Fractions, Analytic
Theory and Applications, Volume 11 of Rota, G-C, ed, Encyclopedia
of Mathematics and its Applications, Addison-Wesley, Reading MA.
gives continued fraction expansion of the incomplete beta
function.
Kahila, J., 1985, Two Fast Methods for Computing ERF(x), ACCESS,
Nov/Dec.
Kapur, K. C. and L. R. Lamberson, 1977, Reliability in Engineering
Design, John Wiley & Sons, New York.
good source for distributions related to engineering.
Leemis, L. M., Relationships Among Common Univariate
Distributions, The American Statistician, Vol 40, No 2, May
1986.
excellent chart. ksprchrt is partially based on this.
Lindgren, B. W., 1976, Statistical Theory, Third Edition,
Macmillan, New York.
used as general reference.
ks probability and statistics programs page 7
Moran, P. A. P., 1984, An Introduction to Probability Theory,
Oxford University Press, New York.
generally good discussion of distributions.
Nakagawa, T. and H. Yoda, 1977, Relationships Among
Distributions, IEEE Transactions on Reliability, Vol R-26, No 5.
ksprchrt is patially based on this.
Nonweiler, T. R. F., 1984, Computational Mathematics, an
Introduction to Numrical Approximation, Halstead Press, New
York.
discusses interpolation and continued fractions. Clearly presents
the continued fraction expansion of the complementary error
function.
Owen, D.B., 1956, Tables for computing Bivariate Normal
Probabilities, Ann. Math Statist., Vol 27, pp 1075-1090.
presents the T(h,a) function necessary for computing noncentral t
cdf values.
Owen, D.B., 1968, A Survey of Properties and Applications of the
Noncentral t-Distribution, Technometrics, Vol 10, No 3.
contains a very nice discussion of the noncentral t. The formulas
on pp 464-5 were used here for the cdf.
Posten, H.O., 1989, An Effective Algorithm for the Noncentral
Chi-Squared Distribution Function, The American Statistician, Vol
43, No 4, November.
This is an effecitve algorithm and is the basis for the one
implemented here.
Thisted, R.A., 1988, Elements of Statistical Computing, Chapman
and Hall, New York.
presents the approximations used in ksprbas for the Student's t,
F and Chi-Square tail areas.
Volk, William, 1982, Engineering Statistics with a Programmable
Calculator, McGraw-Hill, New York.
presents an understandable discussion of the finite series
expansion of the F CDF.
ks probability and statistics programs page 8
Zelen, M. and N. C. Severo, 1970, Probability Functions, chapter
26 in Abramowitz, M. and I. A. Stegun (eds), Handbook of
Mathematical Functions, National Bureau of Standards Applied
Mathematics Series, No. 55.
has a wealth of material. There have been a lot of corrections
from the 1965 edition. I suspect more corrections are in order.
Still, an important reference. The recurrence relation on page
941 is used in X² computations.
Wallace, D.L, 1959, Bounds on Normal Approximations to Student's
and Chi-Square Distributions, Annals of Mathematical Statistics,
Vol 30, pp 1121-1130.
gives the approximation used for the normal tail area in
ksprbas.bas.
Walpole, R. E. and R. H. Myers, Probability and Statistics for
Engineers and Scientists, Third Edition, 1985, MacMillan, New
York.
many of the parameterizations follow Walpole and Myers.
If you find the ks probability and statistics programs
useful, your payment of $10.00 is appreciated.
ks Probability and Statistics Programs
Invoice
Make checks Payable to Joseph C. Hudson
4903 Algonquin
Clarkston, MI 48348
Quantity Item Total
________ Copies of ks Probability and
Statistics programs @ $10 each ______________
Name and address of sender:
____________________________________________
____________________________________________
____________________________________________
Your comments and suggestions are appreciated. Thanks for your
support.