Vorige: Functions and Variables for continuous distributions, Nach oben: Package distrib [Inhalt][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")
.
Examples:
(%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.
Examples:
(%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.
Examples:
(%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<p<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<p<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<p<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<p<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<p<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<p<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<p<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<p<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<p<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<p<1\).
The \(Bernoulli(p)\) random variable is equivalent to the \(Binomial(1,p)\), therefore when Maxima has not enough information to get the result, a noun form based on the binomial probability function is returned.
(%i1) load ("distrib")$ (%i2) pdf_bernoulli(1,p); (%o2) pdf_binomial(1, 1, p) (%i3) assume(0<p,p<1)$ pdf_bernoulli(1,p); (%o4) p
Returns the value at x of the distribution function of a
\(Bernoulli(p)\) random variable, with \(0<p<1\). To make use of this
function, write first load("distrib")
.
Returns the q-quantile of a \(Bernoulli(p)\) random variable, with
\(0<p<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<p<1\).
The \(Bernoulli(p)\) random variable is equivalent to the \(Binomial(1,p)\), therefore when Maxima has not enough information to get the result, a noun form based on the binomial mean is returned.
(%i1) load ("distrib")$ (%i2) mean_bernoulli(p); (%o2) mean_binomial(1, p) (%i3) assume(0<p,p<1)$ mean_bernoulli(p); (%o4) p
Returns the variance of a \(Bernoulli(p)\) random variable, with \(0<p<1\).
The \(Bernoulli(p)\) random variable is equivalent to the \(Binomial(1,p)\), therefore when Maxima has not enough information to get the result, a noun form based on the binomial variance is returned.
(%i1) load ("distrib")$ (%i2) var_bernoulli(p); (%o2) var_binomial(1, p) (%i3) assume(0<p,p<1)$ var_bernoulli(p); (%o4) (1 - p) p
Returns the standard deviation of a \(Bernoulli(p)\) random variable, with \(0<p<1\).
The \(Bernoulli(p)\) random variable is equivalent to the \(Binomial(1,p)\), therefore when Maxima has not enough information to get the result, a noun form based on the binomial standard deviation is returned.
(%i1) load ("distrib")$ (%i2) std_bernoulli(p); (%o2) std_binomial(1, p) (%i3) assume(0<p,p<1)$ std_bernoulli(p); (%o4) sqrt(1 - p) sqrt(p)
Returns the skewness coefficient of a \(Bernoulli(p)\) random variable, with \(0<p<1\).
The \(Bernoulli(p)\) random variable is equivalent to the \(Binomial(1,p)\), therefore when Maxima has not enough information to get the result, a noun form based on the binomial skewness coefficient is returned.
(%i1) load ("distrib")$ (%i2) skewness_bernoulli(p); (%o2) skewness_binomial(1, p) (%i3) assume(0<p,p<1)$ skewness_bernoulli(p); 1 - 2 p (%o4) ------------------- sqrt(1 - p) sqrt(p)
Returns the kurtosis coefficient of a \(Bernoulli(p)\) random variable, with \(0<p<1\).
The \(Bernoulli(p)\) random variable is equivalent to the \(Binomial(1,p)\), therefore when Maxima has not enough information to get the result, a noun form based on the binomial kurtosis coefficient is returned.
(%i1) load ("distrib")$ (%i2) kurtosis_bernoulli(p); (%o2) kurtosis_binomial(1, p) (%i3) assume(0<p,p<1)$ kurtosis_bernoulli(p); 1 - 6 (1 - p) p (%o4) --------------- (1 - p) p
Returns a \(Bernoulli(p)\) random variate, with \(0<p<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\). To make use of this
function, write first load("distrib")
.
Returns the value at x of the distribution function of a
\(Geometric(p)\) random variable, with \(0<p<1\). To make use of this
function, write first load("distrib")
.
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]\). To make use of this
function, write first load("distrib")
.
Returns the mean of a \(Geometric(p)\) random variable, with \(0<p<1\).
To make use of this function, write first load("distrib")
.
Returns the variance of a \(Geometric(p)\) random variable, with
\(0<p<1\). To make use of this function, write first load("distrib")
.
Returns the standard deviation of a \(Geometric(p)\) random variable, with
\(0<p<1\). To make use of this function, write first load("distrib")
.
Returns the skewness coefficient of a \(Geometric(p)\) random variable, with
\(0<p<1\). To make use of this function, write first load("distrib")
.
Returns the kurtosis coefficient of a geometric random variable \(Geo(p)\),
with \(0<p<1\). To make use of this function, write first
load("distrib")
.
Returns a \(Geometric(p)\) random variate, with \(0<p<1\). Calling
random_geometric
with a second argument n, a random sample of size
n will be simulated.
The algorithm is based on simulation of Bernoulli trials.
To make use of this function, write first load("distrib")
.
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<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 \(Negative Binomial(n,p)\) random variable, with \(0<p<1\) and \(n\) a positive integer.
(%i1) load ("distrib")$ (%i2) cdf_negative_binomial(3,4,1/8); 3271 (%o2) ------ 524288 (%i3) float(%); (%o3) .006238937377929687
Returns the q-quantile of a \(Negative Binomial(n,p)\) random variable,
with \(0<p<1\) and \(n\) a positive integer; 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<1\) and \(n\) a positive integer. To make use of this function,
write first load("distrib")
.
Returns the variance of a \(Negative Binomial(n,p)\) random variable, with
\(0<p<1\) and \(n\) a positive integer. 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<1\) and \(n\) a positive integer. 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<1\) and \(n\) a positive integer. 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<1\) and \(n\) a positive integer. To make use of
this function, write first load("distrib")
.
Returns a \(Negative Binomial(n,p)\) random variate, with \(0<p<1\) and
\(n\) a positive integer. 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")
.
Vorige: Functions and Variables for continuous distributions, Nach oben: Package distrib [Inhalt][Index]