Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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(t, 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.

t

numeric vector.

log

logical; if TRUE, the cumulant generating function is returned.

Details

The kth raw moment of the random variable X is E[X^k], the kth limited moment at some limit d is E[min(X, d)^k] and the moment generating function is E[e^{tX}].

Value

munif gives the kth raw moment, levunif gives the kth moment of the limited random variable, and mgfunif gives the moment generating function in t.

Invalid arguments will result in return value NaN, with a warning.

Author(s)

Vincent Goulet vincent.goulet@act.ulaval.ca, Christophe Dutang

References

See Also

Examples

munif(-1)
munif(1:5)
levunif(3, order=1:5)
levunif(3, 2, 4)
mgfunif(1, 1, 2)

actuar

Actuarial Functions and Heavy Tailed Distributions

v3.1-2
GPL (>= 2)
Authors
Vincent Goulet [cre, aut], Sébastien Auclair [ctb], Christophe Dutang [aut], Nicholas Langevin [ctb], Xavier Milhaud [ctb], Tommy Ouellet [ctb], Alexandre Parent [ctb], Mathieu Pigeon [aut], Louis-Philippe Pouliot [ctb], Jeffrey A. Ryan [aut] (Package API), Robert Gentleman [aut] (Parts of the R to C interface), Ross Ihaka [aut] (Parts of the R to C interface), R Core Team [aut] (Parts of the R to C interface), R Foundation [aut] (Parts of the R to C interface)
Initial release
2021-03-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.