UniformSupp: Moments and Moment Generating Function of the Uniform Distribution
Description
Raw moments, limited moments and moment generating function for the
Uniform distribution from min to max.
Usage
munif(order, min = 0, max = 1)
levunif(limit, min = 0, max =1, order = 1)
mgfunif(x, min = 0, max = 1, log = FALSE)
Arguments
order
order of the moment.
min, max
lower and upper limits of the distribution. Must be finite.
limit
limit of the random variable.
x
numeric vector.
log
logical; if TRUE, the cumulant generating function
is returned.
Value
munif gives the $k$th raw moment,
levunif gives the $k$th moment of the limited random
variable, and
mgfunif gives the moment generating function in x.
Invalid arguments will result in return value NaN, with a warning.
Details
The $k$th raw moment of the random variable $X$ is
$E[X^k]$, the $k$th limited moment at some limit
$d$ is $E[\min(X, d)^k]$ and the moment
generating function is $E[e^{xX}]$.