Learn R Programming

npsm (version 2.0.0)

rlaplace: Random Laplace.

Description

Random generation for the Laplace (double exponential) data with location 0 and scale 1.

Usage

rlaplace(n)

Value

A vector of length n is returned containing the random data.

Arguments

n

scalar. number of random draws.

Author

John Kloke, Joseph McKean

Details

A Laplace or double expoential distribution has heavier tails than a normal distribution and so a sample will tend to have additional outliers.

References

Hogg, Robert V.; McKean, Joseph; and Craig, Allen T., "Introduction to Mathematical Statistics (6th Edition)" (2005).

Examples

Run this code
x <- rlaplace(100)
qqnorm(x)

Run the code above in your browser using DataLab