DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T p

⟦fd9f3ca07⟧ TextFile

    Length: 6247 (0x1867)
    Types: TextFile
    Names: »probdist.1«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/stat-5.3/eu/stat/man/probdist.1« 

TextFile

.TH PROBDIST 1 "December 22, 1986" "\(co 1986 Gary Perlman" "|STAT" "UNIX User's Manual"
.SH NAME
.nf
probdist \- probability distribution functions, random number generation
.fi
.SH SYNOPSIS
.B probdist
[-v] [-s seed] [ function distribution [parameters] value ]
.SH DESCRIPTION
.I probdist
is a family of probability distribution functions.
.I functions
include:
.nf
	probability of obtained statistic (prob);
	critical statistic for specific probability level (crit or quantile);
	random samples of distribution values (rand).
.fi
.I distributions
include the uniform, normal-z,
binomial,
.if t chi-square (\(*x\u2\d),
.if n chi-square
F, and t.
Applicable distribution parameters,
such as degrees of freedom,
should follow the
name of the distribution.
For example, you can request the probability of an F-ratio:
.nf
	probdist  prob  F  2  12  3.46
.fi
or a random sample of normal-z values:
.nf
	probdist  rand  n  100
.fi
.PP
A single request can be supplied on the command line:
.nf
	probdist  rand  z  20
.fi
or several can be supplied to the standard input.
Blank input lines are ignored.
.nf
	> probdist
	prob binomial 20 3/4 18
	0.091260
	critical t 8 .05
	2.306004
.fi
.PP
Functions and distributions can be abbreviated with single letters;
only the first letter is used,
and case does not matter.
The normal-z distribution can be requested with z or n.
The chi-square distribution can be requested with c or x.
.PP
Probabilities are between 0 and 1,
usually not including those values.
When supplying probabilities to the program,
they can be input in decimal form (e.g.,\ .05),
or as a ratio of two integers (e.g.,\ 1/20).
The ratio form must be used to specify the probability of a success
in the binomial distribution.
.SH OPTIONS
.de OP
.TP
.B -\\$1 \\$2
..
.OP s seed
Supply the integer random seed for random number generation.
This value should be from 1 to the maximum integer for a system.
Otherwise, the first random seed is taken from the system clock and process
number.
This option allows the replication of random samples;
the same requests with the same seed always produce the same result.
.OP v
Verbose output.
By default, only the requested values are printed
(e.g., you ask for the probability of a t statistic
and that probability is printed,
or you ask for a uniform random sample of 10 numbers
and ten numbers are printed).
With the verbose option,
the output from the program contains lines with
the distribution name, parameters, value, and probability, in order.
.SH EXAMPLES
.PP
.I dm
is useful for converting the output from
.I probdist.
.ta .5i +1i +1i +1i +1i
.nf
Normal sample with mean 20 and standard deviation 10:
	probdist  random  z  100  |  dm  x1*10+20
Uniform random integers between 20 and 29 (inclusive):
	probdist  random  u  100  |  dm  floor(x1*10+20)
.fi
.br
.ne 1.5i
.br
.SH "DISTRIBUTIONS
.nf
.if t .ds Ge \(*e
.if n .ds Ge e
\*(Ge = epsilon (a very small number), \(if = infinity, p = a/b, *one-tailed test
.ta 1i +1i +1i +1i +1i +1i +1i +1i
.if n .ta 12n +12n +12n +12n +12n +12n +12n +12n +12n +12n
	params	mean	min	max	prob
Uniform		0.5	0+\*(Ge	1-\*(Ge	x..1
Binomial	N  p	Np	0	N	x..N*
Normal Z		0	-\(if	+\(if	-\(if..x*
t	df	see F	0	+\(if	x..\(if
Chi-Square	df	df	0	+\(if	x..\(if
F	df1  df2	df2/(df2-2)	0	+\(if	x..\(if
.fi
.PP
The critical value functions use an inversion of the probability functions
that refine their approximations until the computed distribution value
produces a probability within .000001 of the requested value.
The random samples are based on uniform random numbers between 0.0 and 1.0
(but not including those extreme values);
the uniform random numbers are used as input to the critical statistic
calculation.
.SS "Uniform: u
The uniform probability and critical value calculations both return
1 minus the value.
.SS "Binomial: b N p
The binomial distribution returns the cumulative probability from a
given value r (number of successes) up to N (the number of trials).
The value of p, the probability of a success must be specified as
a ratio of integers (e.g., 1/2, not .5).
To compute the lower tail of the binomial distribution,
that is, the probability of getting r or less successes,
the following rule can be used:
.ce
.\" \(<= and \(>= do not print properly on soft terminals under nroff
.if t prob ( B(N,p) \(<= r )  =  prob ( B(N,1-p) \(>= N-r )
.if n prob ( B(N,p) <= r )  =  prob ( B(N,1-p) >= N-r )
For a specified significance level, such as the .05 level,
there may be no critical statistic with exactly the desired probability.
In most cases, the probability of the statistic will be less than that
requested.
In some cases, there may be no critical statistic with less than the requested
probability (e.g., the probability of 5 successes in 5 binomial trials
with p=1/2 is 0.03125), so the computed value would be one greater than
the maximum possible (e.g., for the B(5,1/2) example: 6).
To compute random binomial numbers,
N uniform random numbers are generated and the count of those less than
p is the random statistic;
with this algorithm,
under the verbose option,
the probability reported
with the random statistic is not meaningful.
Probability calculations are based on a logarithmic approximation
of sums of products of powers of primes, thought to be accurate
to over ten decimal places for N up to 1000.
.SS "Normal-Z: n
The normal-z probability function computes values for the one-tailed
cumulative probability from -\(if up to the given value.
The function is accurate to six decimal places
(z values with absolute values up to 6).
Probability of Normal Z value computed with
CACM Algorithm 209.
.\" from a polynomial approximation in
.\" 	Ibbetson D.
.\" 	Collected Algorithms of the CACM, 1963 p. 616.
.SS "Student's t: t df
The probability of Student's t-value computed from the relation:
t(n)*t(n)\ =\ F(1,n)
so, the probability reported for a t statistic is
the two-tailed probability of |t| exceeding the obtained value.
.SS "F: f df1 df2
Probability of F-ratio computed with
CACM Algorithm 322.
.\" 	Dorrer, E.
.\" 	Collected Algorithms for the CACM.
.SS "Chi-Square: c df
Probability of Chi-square computed with
CACM Algorithm 299.
.\" 	Hill, I. D. and Pike, M. C.,
.\" 	Collected Algorithms for the CACM, 1967 p. 243.