• incanter

# cdf-normal

## incanter.stats

• (cdf-normal x & options)
Returns the Normal cdf of the given value, x. It will return a sequence
of values, if x is a sequence. This is equivalent to R's pnorm function.

Options:
:mean (default 0)
:sd (default 1)

pdf-normal, quantile-normal, sample-normal

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

Example:
(cdf-normal 1.96 :mean -2 :sd (sqrt 0.5))

### Source incanter/stats.clj:192 top

```(defn cdf-normal
" Returns the Normal cdf of the given value, x. It will return a sequence
of values, if x is a sequence. This is equivalent to R's pnorm function.

Options:
:mean (default 0)
:sd (default 1)

pdf-normal, quantile-normal, sample-normal

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

Example:
(cdf-normal 1.96 :mean -2 :sd (sqrt 0.5))
"
([x & options]
(let [opts (when options (apply assoc {} options))
mean (or (:mean opts) 0)
sd (or (:sd opts) 1)
dist (Normal. mean sd (DoubleMersenneTwister.))]
(if (coll? x)
(map #(.cdf dist %) x)
(.cdf dist x)))))```
Vars in incanter.stats/cdf-normal: coll? defn let map
Used in 0 other vars