Learn R Programming

Distributacalcul (version 0.2.2)

E_unifD: Expected value of the (discrete) Uniform distribution

Description

Expected value of the (discrete) Uniform distribution with min \(a\) and max \(b\).

Usage

E_unifD(min = 0, max = 1)

Arguments

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: V_unifD(), d_unifD(), p_unifD()

Examples

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

# }

Run the code above in your browser using DataLab