Previous: Functions and Variables for continuous distributions, Up: distrib [Contents][Index]
Returns the value at x of the probability function of a general finite discrete random variable, with vector probabilities v, such that Pr(X=i) = v_i
. Vector v can be a list of nonnegative expressions, whose components will be normalized to get a vector of probabilities. To make use of this function, write first load("distrib")
.
(%i1) load ("distrib")$ (%i2) pdf_general_finite_discrete(2, [1/7, 4/7, 2/7]); 4 (%o2) - 7 (%i3) pdf_general_finite_discrete(2, [1, 4, 2]); 4 (%o3) - 7
Returns the value at x of the distribution function of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
(%i1) load ("distrib")$ (%i2) cdf_general_finite_discrete(2, [1/7, 4/7, 2/7]); 5 (%o2) - 7 (%i3) cdf_general_finite_discrete(2, [1, 4, 2]); 5 (%o3) - 7 (%i4) cdf_general_finite_discrete(2+1/2, [1, 4, 2]); 5 (%o4) - 7
Returns the q-quantile of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
Returns the mean of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
Returns the variance of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
Returns the standard deviation of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
Returns the skewness coefficient of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
Returns the kurtosis coefficient of a general finite discrete random variable, with vector probabilities v.
See pdf_general_finite_discrete
for more details.
Returns a general finite discrete random variate, with vector probabilities v. Calling random_general_finite_discrete
with a second argument m, a random sample of size m will be simulated.
See pdf_general_finite_discrete
for more details.
(%i1) load ("distrib")$ (%i2) random_general_finite_discrete([1,3,1,5]); (%o2) 4 (%i3) random_general_finite_discrete([1,3,1,5], 10); (%o3) [4, 2, 2, 3, 2, 4, 4, 1, 2, 2]
Returns the value at x of the probability function of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer. To make use of this function, write first load("distrib")
.
Returns the value at x of the distribution function of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer.
(%i1) load ("distrib")$ (%i2) cdf_binomial(5,7,1/6); 7775 (%o2) ---- 7776 (%i3) float(%); (%o3) .9998713991769548
Returns the q-quantile of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer; in other words, this is the inverse of cdf_binomial
. Argument q must be an element of [0,1]. To make use of this function, write first load("distrib")
.
Returns the mean of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer. To make use of this function, write first load("distrib")
.
Returns the variance of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer. To make use of this function, write first load("distrib")
.
Returns the standard deviation of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer. To make use of this function, write first load("distrib")
.
Returns the skewness coefficient of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer. To make use of this function, write first load("distrib")
.
Returns the kurtosis coefficient of a Binomial(n,p) random variable, with 0 \leq p \leq 1 and n a positive integer. To make use of this function, write first load("distrib")
.
Returns a Binomial(n,p) random variate, with 0 \leq p \leq 1 and n a positive integer. Calling random_binomial
with a third argument m, a random sample of size m will be simulated.
The implemented algorithm is based on the one described in Kachitvichyanukul, V. and Schmeiser, B.W. (1988) Binomial Random Variate Generation. Communications of the ACM, 31, Feb., 216.
To make use of this function, write first load("distrib")
.
Returns the value at x of the probability function of a Poisson(m) random variable, with m>0. To make use of this function, write first load("distrib")
.
Returns the value at x of the distribution function of a Poisson(m) random variable, with m>0.
(%i1) load ("distrib")$ (%i2) cdf_poisson(3,5); (%o2) gamma_incomplete_regularized(4, 5) (%i3) float(%); (%o3) .2650259152973623
Returns the q-quantile of a Poisson(m) random variable, with m>0; in other words, this is the inverse of cdf_poisson
. Argument q must be an element of [0,1]. To make use of this function, write first load("distrib")
.
Returns the mean of a Poisson(m) random variable, with m>0. To make use of this function, write first load("distrib")
.
Returns the variance of a Poisson(m) random variable, with m>0. To make use of this function, write first load("distrib")
.
Returns the standard deviation of a Poisson(m) random variable, with m>0. To make use of this function, write first load("distrib")
.
Returns the skewness coefficient of a Poisson(m) random variable, with m>0. To make use of this function, write first load("distrib")
.
Returns the kurtosis coefficient of a Poisson random variable Poi(m), with m>0. To make use of this function, write first load("distrib")
.
Returns a Poisson(m) random variate, with m>0. Calling random_poisson
with a second argument n, a random sample of size n will be simulated.
The implemented algorithm is the one described in Ahrens, J.H. and Dieter, U. (1982) Computer Generation of Poisson Deviates From Modified Normal Distributions. ACM Trans. Math. Software, 8, 2, June,163-179.
To make use of this function, write first load("distrib")
.
Returns the value at x of the probability function of a Bernoulli(p) random variable, with 0 \leq p \leq 1.
The Bernoulli(p) random variable is equivalent to the Binomial(1,p).
(%i1) load ("distrib")$ (%i2) pdf_bernoulli(1,p); (%o2) p
Returns the value at x of the distribution function of a Bernoulli(p) random variable, with 0 \leq p \leq 1. To make use of this function, write first load("distrib")
.
Returns the q-quantile of a Bernoulli(p) random variable, with 0 \leq p \leq 1; in other words, this is the inverse of cdf_bernoulli
. Argument q must be an element of [0,1]. To make use of this function, write first load("distrib")
.
Returns the mean of a Bernoulli(p) random variable, with 0 \leq p \leq 1.
The Bernoulli(p) random variable is equivalent to the Binomial(1,p).
(%i1) load ("distrib")$ (%i2) mean_bernoulli(p); (%o2) p
Returns the variance of a Bernoulli(p) random variable, with 0 \leq p \leq 1.
The Bernoulli(p) random variable is equivalent to the Binomial(1,p).
(%i1) load ("distrib")$ (%i2) var_bernoulli(p); (%o2) (1 - p) p
Returns the standard deviation of a Bernoulli(p) random variable, with 0 \leq p \leq 1.
The Bernoulli(p) random variable is equivalent to the Binomial(1,p).
(%i1) load ("distrib")$ (%i2) std_bernoulli(p); (%o2) sqrt((1 - p) p)
Returns the skewness coefficient of a Bernoulli(p) random variable, with 0 \leq p \leq 1.
The Bernoulli(p) random variable is equivalent to the Binomial(1,p).
(%i1) load ("distrib")$ (%i2) skewness_bernoulli(p); 1 - 2 p (%o2) --------------- sqrt((1 - p) p)
Returns the kurtosis coefficient of a Bernoulli(p) random variable, with 0 \leq p \leq 1.
The Bernoulli(p) random variable is equivalent to the Binomial(1,p).
(%i1) load ("distrib")$ (%i2) kurtosis_bernoulli(p); 1 - 6 (1 - p) p (%o2) --------------- (1 - p) p
Returns a Bernoulli(p) random variate, with 0 \leq p \leq 1. Calling random_bernoulli
with a second argument n, a random sample of size n will be simulated.
This is a direct application of the random
built-in Maxima function.
See also random
. To make use of this function, write first load("distrib")
.
Returns the value at x of the probability function of a Geometric(p) random variable, with 0 < p <= 1.
The probability function is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the value at x of the distribution function of a Geometric(p) random variable, with 0 < p <= 1.
The probability from which the distribution function is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the q-quantile of a Geometric(p) random variable, with
0 < p <= 1;
in other words, this is the inverse of cdf_geometric
.
Argument q must be an element of [0,1].
The probability from which the quantile is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the mean of a Geometric(p) random variable, with 0 < p <= 1.
The probability from which the mean is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the variance of a Geometric(p) random variable, with 0 < p <= 1.
The probability from which the variance is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the standard deviation of a Geometric(p) random variable, with 0 < p <= 1.
The probability from which the standard deviation is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the skewness coefficient of a Geometric(p) random variable, with 0 < p <= 1.
The probability from which the skewness is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the kurtosis coefficient of a geometric random variable Geometric(p), with 0 < p <= 1.
The probability from which the kurtosis is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
random_geometric(p)
returns one random sample from a Geometric(p) distribution, with
0 < p <= 1.
random_geometric(p, n)
returns a list of n random samples.
The algorithm is based on simulation of Bernoulli trials.
The probability from which the random sample is derived is defined as p (1 - p)^x. This is interpreted as the probability of x failures before the first success.
load("distrib")
loads this function.
Returns the value at x of the probability function of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns the value at x of the distribution function of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns the q-quantile of a Discrete Uniform(n) random variable, with n a strictly positive integer; in other words, this is the inverse of cdf_discrete_uniform
. Argument q must be an element of [0,1]. To make use of this function, write first load("distrib")
.
Returns the mean of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns the variance of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns the standard deviation of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns the skewness coefficient of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns the kurtosis coefficient of a Discrete Uniform(n) random variable, with n a strictly positive integer. To make use of this function, write first load("distrib")
.
Returns a Discrete Uniform(n) random variate, with n a strictly positive integer. Calling random_discrete_uniform
with a second argument m, a random sample of size m will be simulated.
This is a direct application of the random
built-in Maxima function.
See also random
. To make use of this function, write first load("distrib")
.
Returns the value at x of the probability function of a Hypergeometric(n1,n2,n) random variable, with n1, n2 and n non negative integers and n<=n1+n2. Being n1 the number of objects of class A, n2 the number of objects of class B, and n the size of the sample without replacement, this function returns the probability of event "exactly x objects are of class A".
To make use of this function, write first load("distrib")
.
Returns the value at x of the distribution function of a Hypergeometric(n1,n2,n)
random variable, with n1, n2 and n non negative integers and n<=n1+n2.
See pdf_hypergeometric
for a more complete description.
To make use of this function, write first load("distrib")
.
Returns the q-quantile of a Hypergeometric(n1,n2,n) random variable, with n1, n2 and n non negative integers and n<=n1+n2; in other words, this is the inverse of cdf_hypergeometric
. Argument q must be an element of [0,1]. To make use of this function, write first load("distrib")
.
Returns the mean of a discrete uniform random variable Hyp(n1,n2,n), with n1, n2 and n non negative integers and n<=n1+n2. To make use of this function, write first load("distrib")
.
Returns the variance of a hypergeometric random variable Hyp(n1,n2,n), with n1, n2 and n non negative integers and n<=n1+n2. To make use of this function, write first load("distrib")
.
Returns the standard deviation of a Hypergeometric(n1,n2,n) random variable, with n1, n2 and n non negative integers and n<=n1+n2. To make use of this function, write first load("distrib")
.
Returns the skewness coefficient of a Hypergeometric(n1,n2,n) random variable, with n1, n2 and n non negative integers and n<=n1+n2. To make use of this function, write first load("distrib")
.
Returns the kurtosis coefficient of a Hypergeometric(n1,n2,n) random variable, with n1, n2 and n non negative integers and n<=n1+n2. To make use of this function, write first load("distrib")
.
Returns a Hypergeometric(n1,n2,n) random variate, with n1, n2 and n non negative integers and n<=n1+n2. Calling random_hypergeometric
with a fourth argument m, a random sample of size m will be simulated.
Algorithm described in Kachitvichyanukul, V., Schmeiser, B.W. (1985) Computer generation of hypergeometric random variates. Journal of Statistical Computation and Simulation 22, 127-145.
To make use of this function, write first load("distrib")
.
Returns the value at x of the probability function of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number. To make use of this function, write first load("distrib")
.
Returns the value at x of the distribution function of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number.
(%i1) load ("distrib")$ (%i2) cdf_negative_binomial(3,4,1/8); 3271 (%o2) ------ 524288
Returns the q-quantile of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number; in other words, this is the inverse of cdf_negative_binomial
. Argument q must be an element of [0,1]. To make use of this function, write first load("distrib")
.
Returns the mean of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number. To make use of this function, write first load("distrib")
.
Returns the variance of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number. To make use of this function, write first load("distrib")
.
Returns the standard deviation of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number. To make use of this function, write first load("distrib")
.
Returns the skewness coefficient of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number. To make use of this function, write first load("distrib")
.
Returns the kurtosis coefficient of a Negative Binomial(n,p) random variable, with 0 < p \leq 1 and n a positive number. To make use of this function, write first load("distrib")
.
Returns a Negative Binomial(n,p) random variate, with 0 < p \leq 1 and n a positive number. Calling random_negative_binomial
with a third argument m, a random sample of size m will be simulated.
Algorithm described in Devroye, L. (1986) Non-Uniform Random Variate Generation. Springer Verlag, p. 480.
To make use of this function, write first load("distrib")
.
Previous: Functions and Variables for continuous distributions, Up: distrib [Contents][Index]