1.2.3-SNAPSHOT Arrow_down_16x16

variance

incanter.stats

  • (variance x)

Returns the sample variance of the data, x. Equivalent to R's var function.

Examples:
(variance (sample-normal 100))

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

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:1460 top

(defn variance
"
  Returns the sample variance of the data, x. Equivalent to R's var function.

  Examples:
    (variance (sample-normal 100))

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

"
  ([x] (DoubleDescriptive/sampleVariance (length x) (sum x) (sum-of-squares x))))
Vars in incanter.stats/variance: defn
Used in 0 other vars

Comments top

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