Join us for
RADAR: AI Edition

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: Pr(X=x)=1ba+1 for x{a,a+1,,b1,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