Next: Binomial Random Variable, Previous: Functions and Variables for discrete distributions, Up: Functions and Variables for discrete distributions [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) [3, 4, 3, 4, 4, 4, 4, 2, 4, 4]