Maxima 5.47.0 Manual: Discrete Uniform Random Variable

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

#### 52.3.6 Discrete Uniform Random Variable

The Discrete uniform distribution is a discrete probablity distribution where a finite number of values are equally likely to occur. The values are 1,2,3,...,n.

For example throwing a fair die of 6 sides numbered 1 through 6 follows a \({\it DiscreteUniform}(1/6)\) distribution.

Function: pdf_discrete_uniform (x,n)

  Returns the value at x of the probability function of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The pdf is $$ f(x,n) = {1\over n} $$

  Categories:Package distrib ·

Function: cdf_discrete_uniform (x,n)

  Returns the value at x of the distribution function of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The cdf is $$ F(x; n) = {\lfloor x \rfloor \over n} $$

  Categories:Package distrib ·

Function: quantile_discrete_uniform (q,n)

  Returns the q-quantile of a \({\it DiscreteUniform}(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")`.

  Categories:Package distrib ·

Function: mean_discrete_uniform (n)

  Returns the mean of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The mean is $$ E[X] = {n+1\over 2} $$

  Categories:Package distrib ·

Function: var_discrete_uniform (n)

  Returns the variance of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The variance is $$ V[X] = {n^2-1 \over 12} $$

  Categories:Package distrib ·

Function: std_discrete_uniform (n)

  Returns the standard deviation of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The standard deviation is $$ D[X] = {\sqrt{n^2-1} \over 2\sqrt{3}} $$

  Categories:Package distrib ·

Function: skewness_discrete_uniform (n)

  Returns the skewness coefficient of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The skewness coefficient is $$ SK[X] = 0 $$

  Categories:Package distrib ·

Function: kurtosis_discrete_uniform (n)

  Returns the kurtosis coefficient of a \({\it DiscreteUniform}(n)\) random variable, with n a strictly positive integer. To make use of this function, write first `load("distrib")`.

  The kurtosis coefficient is $$ KU[X] = - {6(n^2+1)\over 5 (n^2-1)} $$

  Categories:Package distrib ·

Function: random_discrete_uniform (n)
`random_discrete_uniform` (n,m)

  Returns a \({\it DiscreteUniform}(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")`.

  Categories:Package distrib ·Random numbers ·

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