Description Usage Arguments Value Examples
This function returns a positive number following exponential distribution. Using the inverse transform method, it can be proven that if variable x in the interval of (0,1) follows uniform distribution , -1/λ *lnx follows exponential distribution with parameter λ. So it simply uses cugen to generate a number between 0 and 1, and returns 1/ λ * logarithm of that number.
1 | expgen(x)
|
'λ' (the exponential distribution's parameter) is the function's argument,
Returns a positive number following exponential distribution
1 2 3 | a <- expgen(250)
a
visualexpgen(a)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.