rvmeanunif: The distribution of the mean of uniform random variables

Description Usage Arguments Details Value Author(s) Examples

Description

The distribution of the mean of uniform random variables with each of them in the interval (-1, 1), then scaled and shifted.

Usage

1
2

Arguments

n

Length of the vector to output

mode

Mode (center) of the distribution

scale

Scale (half-width) of the distribution around the mode

df

“degrees of freedom”: number of independent components to average

Details

Assuming that all inputs are constants, each generated variable has a mode (center) at mode, constrained between (-scale, scale).

The shape becomes more and more bell-shaped (Normal) as the number of the independent variables in the sum (mean) increases.

The case of df=2 (mean of two variables) is the special case of the symmetric triangular distribution in the range

Value

A random vector of length n.

Author(s)

J Kerman

Examples

1
2
  x <- rvtriang(1)
  y <- rvmeanunif(df=2) ## same distribution as that of x


Search within the rv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.