Learn R Programming

Distributacalcul (version 0.2.2)

d_unifD: Probability mass function of the (discrete) Uniform Distribution

Description

Probability mass function of the (discrete) Uniform distribution with min \(a\) and max \(b\).

Usage

d_unifD(x, min = 0, max = 1)

Arguments

x

quantile. By definition, it has no impact on the uniform distribution. Set to 1 by default.

min, max

lower and upper limits of the distribution. Must be finite.

Value

Function :

  • E_unifD gives the expected value.

  • V_unifD gives the variance.

  • d_unifD gives the density function.

  • d_unifD gives the cumulative density function.

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

Details

The (discrete) uniform distribution with min and max parameters \(a\) and \(b\) respectively has density: $$\textrm{Pr}\left(X = x \right) = \frac{1}{b - a + 1}$$ for \(x \in \{a, a + 1, \dots, b - 1, b\}\).

See Also

Other Discrete Uniform Distribution: E_unifD(), V_unifD(), p_unifD()

Examples

Run this code
# NOT RUN {
# With scale parameter
d_unifD(x = 2, min = 2, max = 5)

# }

Run the code above in your browser using DataLab