Next: Binomial Random Variable, Previous: Functions and Variables for discrete distributions, Up: Functions and Variables for discrete distributions [Contents][Index]

#### 52.3.1 General Finite Discrete Random Variable

Function: pdf_general_finite_discrete (x,v)

  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

  Categories:Package distrib ·

Function: cdf_general_finite_discrete (x,v)

  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

  Categories:Package distrib ·

Function: quantile_general_finite_discrete (q,v)

  Returns the q-quantile of a general finite discrete random variable, with vector probabilities v.

  See `pdf_general_finite_discrete` for more details.

  Categories:Package distrib ·

Function: mean_general_finite_discrete (v)

  Returns the mean of a general finite discrete random variable, with vector probabilities v.

  See `pdf_general_finite_discrete` for more details.

  Categories:Package distrib ·

Function: var_general_finite_discrete (v)

  Returns the variance of a general finite discrete random variable, with vector probabilities v.

  See `pdf_general_finite_discrete` for more details.

  Categories:Package distrib ·

Function: std_general_finite_discrete (v)

  Returns the standard deviation of a general finite discrete random variable, with vector probabilities v.

  See `pdf_general_finite_discrete` for more details.

  Categories:Package distrib ·

Function: skewness_general_finite_discrete (v)

  Returns the skewness coefficient of a general finite discrete random variable, with vector probabilities v.

  See `pdf_general_finite_discrete` for more details.

  Categories:Package distrib ·

Function: kurtosis_general_finite_discrete (v)

  Returns the kurtosis coefficient of a general finite discrete random variable, with vector probabilities v.

  See `pdf_general_finite_discrete` for more details.

  Categories:Package distrib ·

Function: random_general_finite_discrete (v)
`random_general_finite_discrete` (v,m)

  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]

  Categories:Package distrib ·Random numbers ·

Next: Binomial Random Variable, Previous: Functions and Variables for discrete distributions, Up: Functions and Variables for discrete distributions [Contents][Index]