• incanter

cdf-exp

incanter.stats

• (cdf-exp x & options)
Returns the Exponential cdf of the given value of x. It will return a sequence
of values, if x is a sequence. Same as R's pexp

Options:
:rate (default 1)

pdf-exp and sample-exp

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/Exponential.html
http://en.wikipedia.org/wiki/Exponential_distribution
http://en.wikipedia.org/wiki/Cumulative_distribution_function

Example:
(cdf-exp 2.0 :rate 1/2)

Source incanter/stats.clj:890 top

```(defn cdf-exp
" Returns the Exponential cdf of the given value of x. It will return a sequence
of values, if x is a sequence. Same as R's pexp

Options:
:rate (default 1)

pdf-exp and sample-exp

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/Exponential.html
http://en.wikipedia.org/wiki/Exponential_distribution
http://en.wikipedia.org/wiki/Cumulative_distribution_function

Example:
(cdf-exp 2.0 :rate 1/2)
"
([x & options]
(let [opts (when options (apply assoc {} options))
rate (or (:rate opts) 1)
dist (Exponential. rate (DoubleMersenneTwister.))]
(if (coll? x)
(map #(.cdf dist %) x)
(.cdf dist x)))))```
Vars in incanter.stats/cdf-exp: coll? defn let map
Used in 0 other vars