# unifDiscr: Discrete Uniform Distribution In Distributacalcul: Probability Distribution Functions

## Description

Discrete uniform distribution with min a and max b.

## Usage

 ```1 2 3 4 5 6 7``` ```pUnifD(q, min = 0, max = 1) dUnifD(x, min = 0, max = 1) varUnifD(min = 0, max = 1) expValUnifD(min = 0, max = 1) ```

## Arguments

 `q` vector of quantiles. `min` lower and upper limits of the distribution. Must be finite. `max` lower and upper limits of the distribution. Must be finite. `x` vector of quantiles.

## Details

The (discrete) uniform distribution with min and max parameters a and b respectively has density:

Pr(X = x) = 1 / (b - a + 1)

for x = a, a + 1, ..., b - 1, b.

## Value

Function :

• `dUnifD` gives the probability density function (PDF).

• `pUnifD` gives the cumulative density function (CDF).

• `expValUnifD` gives the expected value.

• `varUnifD` gives the variance.

Invalid parameter values will return an error detailing which parameter is problematic.

## Examples

 ```1 2 3 4 5 6 7``` ```pUnifD(q = 0.2, min = 0, max = 1) dUnifD(min = 0, max = 1) varUnifD(min = 0, max = 1) expValUnifD(min = 0, max = 1) ```

Distributacalcul documentation built on Sept. 13, 2020, 5:19 p.m.