1.2.3-SNAPSHOT Arrow_down_16x16
  • (sd x)

Returns the sample standard deviation of the data, x. Equivalent to
R's sd function.

Examples:
(sd (sample-normal 100))

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/stat/tdouble/DoubleDescriptive.html
http://en.wikipedia.org/wiki/Standard_deviation

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/stats.clj:1508 top

(defn sd
"
  Returns the sample standard deviation of the data, x. Equivalent to
  R's sd function.

  Examples:
    (sd (sample-normal 100))

  References:
    http://incanter.org/docs/parallelcolt/api/cern/jet/stat/tdouble/DoubleDescriptive.html
    http://en.wikipedia.org/wiki/Standard_deviation
"
  ([x]
    ;; population sd, not the sample sd
    ;(DoubleDescriptive/sampleStandardDeviation (length x) (variance x))))
    ;; return the sample standard deviation
    (sqrt (variance x))))
Vars in incanter.stats/sd: defn
Used in 0 other vars

Comments top

No comments for sd. Log in to add a comment.